From 504eec0287ac0b091cbbb354582314cb87bd9e1d Mon Sep 17 00:00:00 2001 From: Nivedita Sarkar Date: Wed, 26 Jun 2024 14:04:56 -0400 Subject: [PATCH] Remove queued presets from Thermostats --- .../air-purifier-app.matter | 10 - .../all-clusters-app.matter | 11 - .../all-clusters-minimal-app.matter | 10 - ...umiditysensor_thermostat_56de3d5f45.matter | 10 - ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 10 - ...tnode_roomairconditioner_9cf3607804.matter | 10 - .../rootnode_thermostat_bm3fb8dhYi.matter | 10 - .../placeholder/linux/apps/app1/config.matter | 20 - .../placeholder/linux/apps/app2/config.matter | 20 - .../nxp/zap/thermostat_matter_thread.matter | 10 - .../nxp/zap/thermostat_matter_wifi.matter | 10 - .../qpg/zap/thermostaticRadiatorValve.matter | 10 - .../thermostat-common/thermostat.matter | 10 - .../app-templates/endpoint_config.h | 78 ++-- .../thermostat-server/thermostat-server.cpp | 16 - .../data-model/chip/thermostat-cluster.xml | 14 - .../zcl/zcl-with-test-extensions.json | 1 - src/app/zap-templates/zcl/zcl.json | 1 - .../data_model/controller-clusters.matter | 10 - .../chip/devicecontroller/ChipClusters.java | 57 +-- .../chip/devicecontroller/ChipStructs.java | 61 --- .../devicecontroller/ClusterIDMapping.java | 4 +- .../devicecontroller/ClusterInfoMapping.java | 38 -- ...olClusterAccessControlEntryChangedEvent.kt | 99 ++-- ...usterAccessControlExtensionChangedEvent.kt | 99 ++-- .../AccountLoginClusterLoggedOutEvent.kt | 31 +- .../ActionsClusterActionFailedEvent.kt | 21 +- .../ActionsClusterStateChangedEvent.kt | 15 +- .../BasicInformationClusterLeaveEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 13 +- .../BasicInformationClusterStartUpEvent.kt | 13 +- .../BooleanStateClusterStateChangeEvent.kt | 13 +- ...igurationClusterAlarmsStateChangedEvent.kt | 38 +- ...ateConfigurationClusterSensorFaultEvent.kt | 16 +- ...InformationClusterReachableChangedEvent.kt | 16 +- ...viceBasicInformationClusterStartUpEvent.kt | 16 +- ...lusterLoadControlEventStatusChangeEvent.kt | 281 +++++------- ...rgyManagementClusterPowerAdjustEndEvent.kt | 22 +- ...viceEnergyManagementClusterResumedEvent.kt | 13 +- .../DishwasherAlarmClusterNotifyEvent.kt | 21 +- .../DoorLockClusterDoorLockAlarmEvent.kt | 13 +- .../DoorLockClusterDoorStateChangeEvent.kt | 13 +- .../DoorLockClusterLockOperationErrorEvent.kt | 161 +++---- .../DoorLockClusterLockOperationEvent.kt | 158 +++---- .../DoorLockClusterLockUserChangeEvent.kt | 121 +++-- ...entClusterCumulativeEnergyMeasuredEvent.kt | 74 ++- ...ementClusterPeriodicEnergyMeasuredEvent.kt | 74 ++- ...mentClusterMeasurementPeriodRangesEvent.kt | 41 +- .../EnergyEvseClusterEVConnectedEvent.kt | 13 +- .../EnergyEvseClusterEVNotDetectedEvent.kt | 49 +- ...gyEvseClusterEnergyTransferStartedEvent.kt | 19 +- ...gyEvseClusterEnergyTransferStoppedEvent.kt | 28 +- .../EnergyEvseClusterFaultEvent.kt | 55 +-- .../EnergyEvseClusterRFIDEvent.kt | 13 +- ...eneralDiagnosticsClusterBootReasonEvent.kt | 13 +- ...gnosticsClusterHardwareFaultChangeEvent.kt | 49 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 49 +- ...DiagnosticsClusterRadioFaultChangeEvent.kt | 46 +- .../MediaPlaybackClusterStateChangedEvent.kt | 68 ++- .../MessagesClusterMessageCompleteEvent.kt | 120 +++-- .../MessagesClusterMessagePresentedEvent.kt | 13 +- .../MessagesClusterMessageQueuedEvent.kt | 13 +- ...nalStateClusterOperationCompletionEvent.kt | 99 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- ...pdateRequestorClusterDownloadErrorEvent.kt | 73 ++- ...ateRequestorClusterStateTransitionEvent.kt | 52 +-- ...dateRequestorClusterVersionAppliedEvent.kt | 20 +- ...nalStateClusterOperationCompletionEvent.kt | 99 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 23 +- ...rSourceClusterBatChargeFaultChangeEvent.kt | 46 +- .../PowerSourceClusterBatFaultChangeEvent.kt | 43 +- ...PowerSourceClusterWiredFaultChangeEvent.kt | 43 +- .../RefrigeratorAlarmClusterNotifyEvent.kt | 21 +- ...nalStateClusterOperationCompletionEvent.kt | 99 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 24 +- .../SampleMeiClusterPingCountEventEvent.kt | 14 +- .../SmokeCoAlarmClusterCOAlarmEvent.kt | 13 +- ...eCoAlarmClusterInterconnectCOAlarmEvent.kt | 13 +- ...AlarmClusterInterconnectSmokeAlarmEvent.kt | 13 +- .../SmokeCoAlarmClusterLowBatteryEvent.kt | 13 +- .../SmokeCoAlarmClusterSmokeAlarmEvent.kt | 13 +- ...areDiagnosticsClusterSoftwareFaultEvent.kt | 54 +-- .../SwitchClusterInitialPressEvent.kt | 13 +- .../SwitchClusterLongPressEvent.kt | 13 +- .../SwitchClusterLongReleaseEvent.kt | 13 +- .../SwitchClusterMultiPressCompleteEvent.kt | 20 +- .../SwitchClusterMultiPressOngoingEvent.kt | 20 +- .../SwitchClusterShortReleaseEvent.kt | 13 +- .../SwitchClusterSwitchLatchedEvent.kt | 13 +- ...argetNavigatorClusterTargetUpdatedEvent.kt | 39 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 49 +- ...workDirectoryClusterNetworkChangedEvent.kt | 16 +- ...imeSynchronizationClusterDSTStatusEvent.kt | 13 +- ...nchronizationClusterTimeZoneStatusEvent.kt | 32 +- ...ClusterTestDifferentVendorMeiEventEvent.kt | 16 +- .../UnitTestingClusterTestEventEvent.kt | 65 ++- ...estingClusterTestFabricScopedEventEvent.kt | 13 +- ...urationAndControlClusterValveFaultEvent.kt | 16 +- ...AndControlClusterValveStateChangedEvent.kt | 38 +- ...agnosticsClusterAssociationFailureEvent.kt | 23 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...orkDiagnosticsClusterDisconnectionEvent.kt | 16 +- .../chip/devicecontroller/cluster/files.gni | 1 - ...sControlClusterAccessControlEntryStruct.kt | 108 ++--- ...trolClusterAccessControlExtensionStruct.kt | 17 +- ...ControlClusterAccessControlTargetStruct.kt | 82 ++-- .../structs/ActionsClusterActionStruct.kt | 34 +- .../ActionsClusterEndpointListStruct.kt | 35 +- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...pplicationBasicClusterApplicationStruct.kt | 17 +- ...ationLauncherClusterApplicationEPStruct.kt | 41 +- ...icationLauncherClusterApplicationStruct.kt | 17 +- .../AudioOutputClusterOutputInfoStruct.kt | 15 +- ...nformationClusterCapabilityMinimaStruct.kt | 28 +- ...formationClusterProductAppearanceStruct.kt | 35 +- .../structs/BindingClusterTargetStruct.kt | 92 ++-- ...formationClusterProductAppearanceStruct.kt | 41 +- .../ChannelClusterAdditionalInfoStruct.kt | 14 +- .../ChannelClusterChannelInfoStruct.kt | 123 +++-- .../ChannelClusterChannelPagingStruct.kt | 95 ++-- .../structs/ChannelClusterLineupInfoStruct.kt | 56 +-- .../structs/ChannelClusterPageTokenStruct.kt | 71 ++- .../ChannelClusterProgramCastStruct.kt | 14 +- .../ChannelClusterProgramCategoryStruct.kt | 32 +- .../structs/ChannelClusterProgramStruct.kt | 434 ++++++++---------- .../structs/ChannelClusterSeriesInfoStruct.kt | 14 +- .../ContentControlClusterRatingNameStruct.kt | 35 +- ...tentLauncherClusterAdditionalInfoStruct.kt | 14 +- ...auncherClusterBrandingInformationStruct.kt | 148 +++--- ...ntentLauncherClusterContentSearchStruct.kt | 29 +- .../ContentLauncherClusterDimensionStruct.kt | 19 +- .../ContentLauncherClusterParameterStruct.kt | 56 ++- ...auncherClusterPlaybackPreferencesStruct.kt | 71 ++- ...ntLauncherClusterStyleInformationStruct.kt | 73 ++- ...entLauncherClusterTrackPreferenceStruct.kt | 62 ++- ...dControlClusterAverageLoadControlStruct.kt | 16 +- ...oadControlClusterDutyCycleControlStruct.kt | 16 +- ...ontrolClusterHeatingSourceControlStruct.kt | 16 +- ...oadControlClusterLoadControlEventStruct.kt | 122 ++--- ...ClusterLoadControlEventTransitionStruct.kt | 151 +++--- ...dControlClusterLoadControlProgramStruct.kt | 97 ++-- ...ControlClusterPowerSavingsControlStruct.kt | 16 +- ...dControlClusterTemperatureControlStruct.kt | 172 ++++--- .../DescriptorClusterDeviceTypeStruct.kt | 14 +- .../DescriptorClusterSemanticTagStruct.kt | 78 ++-- ...nergyManagementClusterConstraintsStruct.kt | 83 ++-- ...DeviceEnergyManagementClusterCostStruct.kt | 39 +- ...ceEnergyManagementClusterForecastStruct.kt | 131 +++--- ...ementClusterPowerAdjustCapabilityStruct.kt | 58 ++- ...nergyManagementClusterPowerAdjustStruct.kt | 28 +- ...gyManagementClusterSlotAdjustmentStruct.kt | 40 +- ...DeviceEnergyManagementClusterSlotStruct.kt | 311 ++++++------- ...gyManagementModeClusterModeOptionStruct.kt | 36 +- ...nergyManagementModeClusterModeTagStruct.kt | 32 +- .../DishwasherModeClusterModeOptionStruct.kt | 33 +- .../DishwasherModeClusterModeTagStruct.kt | 32 +- .../DoorLockClusterCredentialStruct.kt | 14 +- ...ementClusterCumulativeEnergyResetStruct.kt | 172 ++++--- ...asurementClusterEnergyMeasurementStruct.kt | 103 ++--- ...ntClusterMeasurementAccuracyRangeStruct.kt | 146 +++--- ...urementClusterMeasurementAccuracyStruct.kt | 53 +-- ...urementClusterHarmonicMeasurementStruct.kt | 41 +- ...ntClusterMeasurementAccuracyRangeStruct.kt | 146 +++--- ...urementClusterMeasurementAccuracyStruct.kt | 53 +-- ...easurementClusterMeasurementRangeStruct.kt | 189 ++++---- ...EvseClusterChargingTargetScheduleStruct.kt | 31 +- .../EnergyEvseClusterChargingTargetStruct.kt | 63 ++- .../EnergyEvseModeClusterModeOptionStruct.kt | 33 +- .../EnergyEvseModeClusterModeTagStruct.kt | 32 +- .../EnergyPreferenceClusterBalanceStruct.kt | 32 +- .../structs/FixedLabelClusterLabelStruct.kt | 14 +- ...missioningClusterBasicCommissioningInfo.kt | 31 +- ...neralDiagnosticsClusterNetworkInterface.kt | 117 ++--- ...pKeyManagementClusterGroupInfoMapStruct.kt | 53 ++- ...upKeyManagementClusterGroupKeyMapStruct.kt | 19 +- ...upKeyManagementClusterGroupKeySetStruct.kt | 169 ++++--- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...mentClusterMonitoringRegistrationStruct.kt | 28 +- ...aundryWasherModeClusterModeOptionStruct.kt | 33 +- .../LaundryWasherModeClusterModeTagStruct.kt | 32 +- .../MediaInputClusterInputInfoStruct.kt | 21 +- ...iaPlaybackClusterPlaybackPositionStruct.kt | 35 +- ...diaPlaybackClusterTrackAttributesStruct.kt | 53 +-- .../MediaPlaybackClusterTrackStruct.kt | 41 +- ...sagesClusterMessageResponseOptionStruct.kt | 52 +-- .../structs/MessagesClusterMessageStruct.kt | 116 +++-- ...icrowaveOvenModeClusterModeOptionStruct.kt | 33 +- .../MicrowaveOvenModeClusterModeTagStruct.kt | 32 +- .../ModeSelectClusterModeOptionStruct.kt | 33 +- .../ModeSelectClusterSemanticTagStruct.kt | 14 +- ...rkCommissioningClusterNetworkInfoStruct.kt | 99 ++-- ...gClusterThreadInterfaceScanResultStruct.kt | 43 +- ...ingClusterWiFiInterfaceScanResultStruct.kt | 37 +- ...redentialsClusterFabricDescriptorStruct.kt | 37 +- .../OperationalCredentialsClusterNOCStruct.kt | 40 +- ...OperationalStateClusterErrorStateStruct.kt | 60 ++- ...ionalStateClusterOperationalStateStruct.kt | 40 +- ...eUpdateRequestorClusterProviderLocation.kt | 28 +- ...OperationalStateClusterErrorStateStruct.kt | 63 ++- ...ionalStateClusterOperationalStateStruct.kt | 43 +- .../OvenModeClusterModeOptionStruct.kt | 33 +- .../structs/OvenModeClusterModeTagStruct.kt | 32 +- ...erSourceClusterBatChargeFaultChangeType.kt | 46 +- .../PowerSourceClusterBatFaultChangeType.kt | 43 +- .../PowerSourceClusterWiredFaultChangeType.kt | 43 +- ...olledCabinetModeClusterModeOptionStruct.kt | 47 +- ...ntrolledCabinetModeClusterModeTagStruct.kt | 38 +- .../RvcCleanModeClusterModeOptionStruct.kt | 33 +- .../RvcCleanModeClusterModeTagStruct.kt | 32 +- ...OperationalStateClusterErrorStateStruct.kt | 60 ++- ...ionalStateClusterOperationalStateStruct.kt | 43 +- .../RvcRunModeClusterModeOptionStruct.kt | 33 +- .../structs/RvcRunModeClusterModeTagStruct.kt | 32 +- ...enesManagementClusterAttributeValuePair.kt | 14 +- ...cenesManagementClusterExtensionFieldSet.kt | 31 +- .../ScenesManagementClusterSceneInfoStruct.kt | 34 +- .../ServiceAreaClusterHomeLocationStruct.kt | 61 +-- .../ServiceAreaClusterLocationInfoStruct.kt | 115 +++-- .../ServiceAreaClusterLocationStruct.kt | 46 +- .../structs/ServiceAreaClusterMapStruct.kt | 14 +- .../ServiceAreaClusterProgressStruct.kt | 99 ++-- ...reDiagnosticsClusterThreadMetricsStruct.kt | 100 ++-- .../TargetNavigatorClusterTargetInfoStruct.kt | 14 +- .../structs/ThermostatClusterPresetStruct.kt | 146 +++--- .../ThermostatClusterPresetTypeStruct.kt | 19 +- .../ThermostatClusterScheduleStruct.kt | 139 +++--- ...ermostatClusterScheduleTransitionStruct.kt | 103 ++--- .../ThermostatClusterScheduleTypeStruct.kt | 25 +- ...atClusterWeeklyScheduleTransitionStruct.kt | 70 ++- ...rkDiagnosticsClusterNeighborTableStruct.kt | 103 ++--- ...ticsClusterOperationalDatasetComponents.kt | 70 ++- ...tworkDiagnosticsClusterRouteTableStruct.kt | 49 +- ...NetworkDiagnosticsClusterSecurityPolicy.kt | 14 +- ...workDirectoryClusterThreadNetworkStruct.kt | 22 +- ...meSynchronizationClusterDSTOffsetStruct.kt | 40 +- ...sterFabricScopedTrustedTimeSourceStruct.kt | 20 +- ...imeSynchronizationClusterTimeZoneStruct.kt | 37 +- ...onizationClusterTrustedTimeSourceStruct.kt | 22 +- ...nitTestingClusterDoubleNestedStructList.kt | 27 +- .../structs/UnitTestingClusterNestedStruct.kt | 19 +- .../UnitTestingClusterNestedStructList.kt | 86 ++-- ...stingClusterNullablesAndOptionalsStruct.kt | 412 ++++++++--------- .../structs/UnitTestingClusterSimpleStruct.kt | 29 +- .../UnitTestingClusterTestFabricScoped.kt | 147 +++--- .../UnitTestingClusterTestListStructOctet.kt | 14 +- .../structs/UserLabelClusterLabelStruct.kt | 14 +- .../cluster/clusters/ThermostatCluster.kt | 134 ------ .../java/matter/controller/cluster/files.gni | 1 - .../CHIPAttributeTLVValueDecoder.cpp | 67 --- .../python/chip/clusters/CHIPClusters.py | 13 - .../python/chip/clusters/Objects.py | 47 -- .../MTRAttributeSpecifiedCheck.mm | 3 - .../MTRAttributeTLVValueDecoder.mm | 25 - .../CHIP/zap-generated/MTRBaseClusters.h | 15 - .../CHIP/zap-generated/MTRBaseClusters.mm | 64 --- .../CHIP/zap-generated/MTRClusterConstants.h | 2 - .../CHIP/zap-generated/MTRClusterNames.mm | 4 - .../CHIP/zap-generated/MTRClusters.h | 5 - .../CHIP/zap-generated/MTRClusters.mm | 36 -- .../zap-generated/MTRCommandPayloadsObjc.h | 30 -- .../zap-generated/MTRCommandPayloadsObjc.mm | 84 +--- .../MTRCommandPayloads_Internal.h | 6 - .../CHIP/zap-generated/MTRStructsObjc.h | 6 - .../CHIP/zap-generated/MTRStructsObjc.mm | 30 -- .../app-common/zap-generated/callback.h | 6 - .../app-common/zap-generated/cluster-enums.h | 1 - .../zap-generated/cluster-objects.cpp | 68 --- .../zap-generated/cluster-objects.h | 74 --- .../app-common/zap-generated/ids/Attributes.h | 4 - .../app-common/zap-generated/ids/Commands.h | 4 - .../zap-generated/cluster/Commands.h | 46 -- .../cluster/ComplexArgumentParser.cpp | 32 -- .../cluster/ComplexArgumentParser.h | 5 - .../cluster/logging/DataModelLogger.cpp | 30 -- .../cluster/logging/DataModelLogger.h | 3 - .../zap-generated/cluster/Commands.h | 150 ------ 277 files changed, 5701 insertions(+), 7631 deletions(-) diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index a43824252c78c1..540057d778903c 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -1344,7 +1344,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1442,11 +1441,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1521,7 +1515,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1559,7 +1552,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -1588,8 +1580,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } 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 5400a81d0fb902..5bf0a0366a1f5e 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 @@ -5063,7 +5063,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5161,11 +5160,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -5240,7 +5234,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5278,7 +5271,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -5307,8 +5299,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } @@ -8565,7 +8555,6 @@ endpoint 1 { ram attribute presetsSchedulesEditable; ram attribute temperatureSetpointHoldPolicy default = 0; ram attribute setpointHoldExpiryTimestamp; - callback attribute queuedPreset; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 962eed946b905a..7f9499ad8eef9d 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -3611,7 +3611,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -3709,11 +3708,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -3788,7 +3782,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3826,7 +3819,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -3855,8 +3847,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 4f6fa7b242fc48..42babc2004f14f 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -1267,7 +1267,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1365,11 +1364,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1444,7 +1438,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1482,7 +1475,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -1511,8 +1503,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 20f10bcaaa3a86..0a2d5638a805cf 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1624,7 +1624,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1722,11 +1721,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1801,7 +1795,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1839,7 +1832,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -1868,8 +1860,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 6c37c883be1909..86e9a3b8fa3b99 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1207,7 +1207,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1305,11 +1304,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1384,7 +1378,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1422,7 +1415,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -1451,8 +1443,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 2e8e81f7fd3d45..ba8535986be72c 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1427,7 +1427,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1525,11 +1524,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1604,7 +1598,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1642,7 +1635,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -1671,8 +1663,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 39f6a4b3894475..1060d5b8c85c93 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -4857,7 +4857,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -4955,11 +4954,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -5034,7 +5028,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5072,7 +5065,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -5101,8 +5093,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } @@ -5228,7 +5218,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5326,11 +5315,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -5405,7 +5389,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5443,7 +5426,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -5472,8 +5454,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index d3ec0ea0e26723..db902045cd19a6 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -4814,7 +4814,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -4912,11 +4911,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -4991,7 +4985,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5029,7 +5022,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -5058,8 +5050,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } @@ -5185,7 +5175,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5283,11 +5272,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -5362,7 +5346,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5400,7 +5383,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -5429,8 +5411,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 0d702b5e3e291d..6ebdf6f7e2936d 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -2011,7 +2011,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -2109,11 +2108,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -2188,7 +2182,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2226,7 +2219,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -2255,8 +2247,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 3db5e3fc306e4c..772c5c9bb81bc2 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1922,7 +1922,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -2020,11 +2019,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -2099,7 +2093,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2137,7 +2130,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -2166,8 +2158,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index ff8ca04ecd4a89..08540be8b24683 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -1626,7 +1626,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1724,11 +1723,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1803,7 +1797,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1841,7 +1834,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -1870,8 +1862,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 039eda02a21854..c0f4d0b8cae9d6 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1806,7 +1806,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1904,11 +1903,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -1983,7 +1977,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2021,7 +2014,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -2050,8 +2042,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 8289394bce6d89..7d9091358b9499 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -351,7 +351,7 @@ } // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 1057 +#define GENERATED_ATTRIBUTE_COUNT 1056 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1398,11 +1398,9 @@ { ZAP_EMPTY_DEFAULT(), 0x00000052, 1, ZAP_TYPE(BOOLEAN), 0 }, /* PresetsSchedulesEditable */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00000053, 1, ZAP_TYPE(BITMAP8), 0 }, /* TemperatureSetpointHoldPolicy */ \ { ZAP_EMPTY_DEFAULT(), 0x00000054, 4, ZAP_TYPE(EPOCH_S), \ - ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SetpointHoldExpiryTimestamp */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000055, 0, ZAP_TYPE(STRUCT), \ - ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* QueuedPreset */ \ - { ZAP_SIMPLE_DEFAULT(0x0023), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SetpointHoldExpiryTimestamp */ \ + { ZAP_SIMPLE_DEFAULT(0x0023), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x00000000, 1, ZAP_TYPE(ENUM8), \ @@ -3747,7 +3745,7 @@ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ .attributes = ZAP_ATTRIBUTE_INDEX(616), \ - .attributeCount = 29, \ + .attributeCount = 28, \ .clusterSize = 74, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ @@ -3759,7 +3757,7 @@ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(645), \ + .attributes = ZAP_ATTRIBUTE_INDEX(644), \ .attributeCount = 14, \ .clusterSize = 18, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3772,7 +3770,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(659), \ + .attributes = ZAP_ATTRIBUTE_INDEX(658), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3785,7 +3783,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(664), \ + .attributes = ZAP_ATTRIBUTE_INDEX(663), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -3798,7 +3796,7 @@ { \ /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ .clusterId = 0x00000301, \ - .attributes = ZAP_ATTRIBUTE_INDEX(718), \ + .attributes = ZAP_ATTRIBUTE_INDEX(717), \ .attributeCount = 16, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3811,7 +3809,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(734), \ + .attributes = ZAP_ATTRIBUTE_INDEX(733), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3824,7 +3822,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(741), \ + .attributes = ZAP_ATTRIBUTE_INDEX(740), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3837,7 +3835,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(747), \ + .attributes = ZAP_ATTRIBUTE_INDEX(746), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3850,7 +3848,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(752), \ + .attributes = ZAP_ATTRIBUTE_INDEX(751), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3863,7 +3861,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(758), \ + .attributes = ZAP_ATTRIBUTE_INDEX(757), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3876,7 +3874,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(764), \ + .attributes = ZAP_ATTRIBUTE_INDEX(763), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3889,7 +3887,7 @@ { \ /* Endpoint: 1, Cluster: Carbon Monoxide Concentration Measurement (server) */ \ .clusterId = 0x0000040C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(769), \ + .attributes = ZAP_ATTRIBUTE_INDEX(768), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3902,7 +3900,7 @@ { \ /* Endpoint: 1, Cluster: Carbon Dioxide Concentration Measurement (server) */ \ .clusterId = 0x0000040D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(782), \ + .attributes = ZAP_ATTRIBUTE_INDEX(781), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3915,7 +3913,7 @@ { \ /* Endpoint: 1, Cluster: Nitrogen Dioxide Concentration Measurement (server) */ \ .clusterId = 0x00000413, \ - .attributes = ZAP_ATTRIBUTE_INDEX(795), \ + .attributes = ZAP_ATTRIBUTE_INDEX(794), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3928,7 +3926,7 @@ { \ /* Endpoint: 1, Cluster: Ozone Concentration Measurement (server) */ \ .clusterId = 0x00000415, \ - .attributes = ZAP_ATTRIBUTE_INDEX(808), \ + .attributes = ZAP_ATTRIBUTE_INDEX(807), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3941,7 +3939,7 @@ { \ /* Endpoint: 1, Cluster: PM2.5 Concentration Measurement (server) */ \ .clusterId = 0x0000042A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(821), \ + .attributes = ZAP_ATTRIBUTE_INDEX(820), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3954,7 +3952,7 @@ { \ /* Endpoint: 1, Cluster: Formaldehyde Concentration Measurement (server) */ \ .clusterId = 0x0000042B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(834), \ + .attributes = ZAP_ATTRIBUTE_INDEX(833), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3967,7 +3965,7 @@ { \ /* Endpoint: 1, Cluster: PM1 Concentration Measurement (server) */ \ .clusterId = 0x0000042C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(847), \ + .attributes = ZAP_ATTRIBUTE_INDEX(846), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3980,7 +3978,7 @@ { \ /* Endpoint: 1, Cluster: PM10 Concentration Measurement (server) */ \ .clusterId = 0x0000042D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(860), \ + .attributes = ZAP_ATTRIBUTE_INDEX(859), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3993,7 +3991,7 @@ { \ /* Endpoint: 1, Cluster: Total Volatile Organic Compounds Concentration Measurement (server) */ \ .clusterId = 0x0000042E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(873), \ + .attributes = ZAP_ATTRIBUTE_INDEX(872), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4006,7 +4004,7 @@ { \ /* Endpoint: 1, Cluster: Radon Concentration Measurement (server) */ \ .clusterId = 0x0000042F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(886), \ + .attributes = ZAP_ATTRIBUTE_INDEX(885), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4019,7 +4017,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(899), \ + .attributes = ZAP_ATTRIBUTE_INDEX(898), \ .attributeCount = 3, \ .clusterSize = 19, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4032,7 +4030,7 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(902), \ + .attributes = ZAP_ATTRIBUTE_INDEX(901), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4045,7 +4043,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(904), \ + .attributes = ZAP_ATTRIBUTE_INDEX(903), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4058,7 +4056,7 @@ { \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(917), \ + .attributes = ZAP_ATTRIBUTE_INDEX(916), \ .attributeCount = 84, \ .clusterSize = 2290, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4071,7 +4069,7 @@ { \ /* Endpoint: 2, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1001), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1000), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -4084,7 +4082,7 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1005), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1004), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -4097,7 +4095,7 @@ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1008), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1007), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -4110,7 +4108,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1015), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1014), \ .attributeCount = 7, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4123,7 +4121,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1022), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1021), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4136,7 +4134,7 @@ { \ /* Endpoint: 2, Cluster: Scenes Management (server) */ \ .clusterId = 0x00000062, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1031), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1030), \ .attributeCount = 5, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -4149,7 +4147,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1036), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1035), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -4162,7 +4160,7 @@ { \ /* Endpoint: 65534, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1041), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1040), \ .attributeCount = 6, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4175,7 +4173,7 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1047), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1046), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 214594667b9eb8..c650a30c871989 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -122,10 +122,6 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { return CHIP_NO_ERROR; }); } break; - case QueuedPreset::Id: { - DataModel::Nullable value; - return aEncoder.Encode(value); - } default: // return CHIP_NO_ERROR and just read from the attribute store in default break; } @@ -166,10 +162,6 @@ CHIP_ERROR ThermostatAttrAccess::Write(const ConcreteDataAttributePath & aPath, return CHIP_ERROR_NOT_IMPLEMENTED; } break; - case QueuedPreset::Id: { - return CHIP_ERROR_NOT_IMPLEMENTED; - } - break; default: // return CHIP_NO_ERROR and just write to the attribute store in default break; } @@ -532,14 +524,6 @@ bool emberAfThermostatClusterCommitPresetsSchedulesRequestCallback( return false; } -bool emberAfThermostatClusterCancelSetActivePresetRequestCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::DecodableType & commandData) -{ - // TODO - return false; -} - bool emberAfThermostatClusterSetTemperatureSetpointHoldPolicyCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::DecodableType & commandData) diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index 62e9a6d883516d..91a89497d7c8cc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -224,11 +224,6 @@ limitations under the License. - - - - - @@ -323,9 +318,6 @@ limitations under the License. - - - @@ -469,7 +461,6 @@ limitations under the License. PresetsSchedulesEditable TemperatureSetpointHoldPolicy SetpointHoldExpiryTimestamp - QueuedPreset @@ -508,7 +499,6 @@ limitations under the License. This command is used to set the active preset. - This command is used to start editing the presets and schedules. @@ -523,10 +513,6 @@ limitations under the License. This command is used to notify the server that all edits are done and should be committed. - - This command is sent to cancel a queued preset. - - This command sets the set point hold policy. diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index b253dd55e72831..a53e028c172cbf 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -605,7 +605,6 @@ "FeatureMap" ], "Air Quality": ["AirQuality", "FeatureMap"], - "Thermostat": ["QueuedPreset"], "Electrical Energy Measurement": [ "Accuracy", "CumulativeEnergyImported", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 6b361e507a3cf3..4d64e09a9a7e35 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -603,7 +603,6 @@ "FeatureMap" ], "Air Quality": ["AirQuality", "FeatureMap"], - "Thermostat": ["QueuedPreset"], "Electrical Energy Measurement": [ "Accuracy", "CumulativeEnergyImported", diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cb858ffdcd8802..8cce14ab45a9d3 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6529,7 +6529,6 @@ cluster Thermostat = 513 { kMatterScheduleConfiguration = 0x80; kPresets = 0x100; kSetpoints = 0x200; - kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -6627,11 +6626,6 @@ cluster Thermostat = 513 { PresetTypeFeaturesBitmap presetTypeFeatures = 2; } - struct QueuedPresetStruct { - nullable octet_string<16> presetHandle = 0; - nullable epoch_s transitionTimestamp = 1; - } - struct ScheduleTypeStruct { SystemModeEnum systemMode = 0; int8u numberOfSchedules = 1; @@ -6706,7 +6700,6 @@ cluster Thermostat = 513 { readonly attribute optional boolean presetsSchedulesEditable = 82; readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; - readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6744,7 +6737,6 @@ cluster Thermostat = 513 { request struct SetActivePresetRequestRequest { octet_string<16> presetHandle = 0; - optional int16u delayMinutes = 1; } request struct StartPresetsSchedulesEditRequestRequest { @@ -6773,8 +6765,6 @@ cluster Thermostat = 513 { command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; /** This command is used to notify the server that all edits are done and should be committed. */ command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; - /** This command is sent to cancel a queued preset. */ - command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; /** This command sets the set point hold policy. */ command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 80491515bc57d3..fa7feb28b2e483 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -39397,7 +39397,6 @@ public static class ThermostatCluster extends BaseChipCluster { private static final long PRESETS_SCHEDULES_EDITABLE_ATTRIBUTE_ID = 82L; private static final long TEMPERATURE_SETPOINT_HOLD_POLICY_ATTRIBUTE_ID = 83L; private static final long SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID = 84L; - private static final long QUEUED_PRESET_ATTRIBUTE_ID = 85L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -39562,11 +39561,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void setActivePresetRequest(DefaultClusterCallback callback, byte[] presetHandle, Optional delayMinutes) { - setActivePresetRequest(callback, presetHandle, delayMinutes, 0); + public void setActivePresetRequest(DefaultClusterCallback callback, byte[] presetHandle) { + setActivePresetRequest(callback, presetHandle, 0); } - public void setActivePresetRequest(DefaultClusterCallback callback, byte[] presetHandle, Optional delayMinutes, int timedInvokeTimeoutMs) { + public void setActivePresetRequest(DefaultClusterCallback callback, byte[] presetHandle, int timedInvokeTimeoutMs) { final long commandId = 6L; ArrayList elements = new ArrayList<>(); @@ -39574,10 +39573,6 @@ public void setActivePresetRequest(DefaultClusterCallback callback, byte[] prese BaseTLVType presetHandletlvValue = new ByteArrayType(presetHandle); elements.add(new StructElement(presetHandleFieldID, presetHandletlvValue)); - final long delayMinutesFieldID = 1L; - BaseTLVType delayMinutestlvValue = delayMinutes.map((nonOptionaldelayMinutes) -> new UIntType(nonOptionaldelayMinutes)).orElse(new EmptyType()); - elements.add(new StructElement(delayMinutesFieldID, delayMinutestlvValue)); - StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -39638,22 +39633,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void cancelSetActivePresetRequest(DefaultClusterCallback callback) { - cancelSetActivePresetRequest(callback, 0); - } - - public void cancelSetActivePresetRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 10L; - - ArrayList elements = new ArrayList<>(); - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - public void setTemperatureSetpointHoldPolicy(DefaultClusterCallback callback, Integer temperatureSetpointHoldPolicy) { setTemperatureSetpointHoldPolicy(callback, temperatureSetpointHoldPolicy, 0); } @@ -39754,10 +39733,6 @@ public interface SetpointHoldExpiryTimestampAttributeCallback extends BaseAttrib void onSuccess(@Nullable Long value); } - public interface QueuedPresetAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -41647,32 +41622,6 @@ public void onSuccess(byte[] tlv) { }, SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readQueuedPresetAttribute( - QueuedPresetAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, QUEUED_PRESET_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, QUEUED_PRESET_ATTRIBUTE_ID, true); - } - - public void subscribeQueuedPresetAttribute( - QueuedPresetAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, QUEUED_PRESET_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, QUEUED_PRESET_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index c22d3593b9e87e..ae2b52d3b5b26e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -9520,67 +9520,6 @@ public String toString() { return output.toString(); } } -public static class ThermostatClusterQueuedPresetStruct { - public @Nullable byte[] presetHandle; - public @Nullable Long transitionTimestamp; - private static final long PRESET_HANDLE_ID = 0L; - private static final long TRANSITION_TIMESTAMP_ID = 1L; - - public ThermostatClusterQueuedPresetStruct( - @Nullable byte[] presetHandle, - @Nullable Long transitionTimestamp - ) { - this.presetHandle = presetHandle; - this.transitionTimestamp = transitionTimestamp; - } - - public StructType encodeTlv() { - ArrayList values = new ArrayList<>(); - values.add(new StructElement(PRESET_HANDLE_ID, presetHandle != null ? new ByteArrayType(presetHandle) : new NullType())); - values.add(new StructElement(TRANSITION_TIMESTAMP_ID, transitionTimestamp != null ? new UIntType(transitionTimestamp) : new NullType())); - - return new StructType(values); - } - - public static ThermostatClusterQueuedPresetStruct decodeTlv(BaseTLVType tlvValue) { - if (tlvValue == null || tlvValue.type() != TLVType.Struct) { - return null; - } - @Nullable byte[] presetHandle = null; - @Nullable Long transitionTimestamp = null; - for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == PRESET_HANDLE_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - presetHandle = castingValue.value(byte[].class); - } - } else if (element.contextTagNum() == TRANSITION_TIMESTAMP_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - transitionTimestamp = castingValue.value(Long.class); - } - } - } - return new ThermostatClusterQueuedPresetStruct( - presetHandle, - transitionTimestamp - ); - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ThermostatClusterQueuedPresetStruct {\n"); - output.append("\tpresetHandle: "); - output.append(Arrays.toString(presetHandle)); - output.append("\n"); - output.append("\ttransitionTimestamp: "); - output.append(transitionTimestamp); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} public static class ThermostatClusterScheduleTypeStruct { public Integer systemMode; public Integer numberOfSchedules; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 06f9941b772c21..54acc059e82a28 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -11637,7 +11637,6 @@ public enum Attribute { PresetsSchedulesEditable(82L), TemperatureSetpointHoldPolicy(83L), SetpointHoldExpiryTimestamp(84L), - QueuedPreset(85L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -11693,7 +11692,6 @@ public enum Command { StartPresetsSchedulesEditRequest(7L), CancelPresetsSchedulesEditRequest(8L), CommitPresetsSchedulesRequest(9L), - CancelSetActivePresetRequest(10L), SetTemperatureSetpointHoldPolicy(11L),; private final long id; Command(long id) { @@ -11780,7 +11778,7 @@ public static SetActiveScheduleRequestCommandField value(int id) throws NoSuchFi } throw new NoSuchFieldError(); } - }public enum SetActivePresetRequestCommandField {PresetHandle(0),DelayMinutes(1),; + }public enum SetActivePresetRequestCommandField {PresetHandle(0),; private final int id; SetActivePresetRequestCommandField(int id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index f4830c334b842f..0baf58702abf73 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -13945,27 +13945,6 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterQueuedPresetAttributeCallback implements ChipClusters.ThermostatCluster.QueuedPresetAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ThermostatClusterQueuedPresetStruct"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedThermostatClusterGeneratedCommandListAttributeCallback implements ChipClusters.ThermostatCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -26193,17 +26172,12 @@ public Map> getCommandMap() { CommandParameterInfo thermostatsetActivePresetRequestpresetHandleCommandParameterInfo = new CommandParameterInfo("presetHandle", byte[].class, byte[].class); thermostatsetActivePresetRequestCommandParams.put("presetHandle",thermostatsetActivePresetRequestpresetHandleCommandParameterInfo); - - CommandParameterInfo thermostatsetActivePresetRequestdelayMinutesCommandParameterInfo = new CommandParameterInfo("delayMinutes", Optional.class, Integer.class); - thermostatsetActivePresetRequestCommandParams.put("delayMinutes",thermostatsetActivePresetRequestdelayMinutesCommandParameterInfo); InteractionInfo thermostatsetActivePresetRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ThermostatCluster) cluster) .setActivePresetRequest((DefaultClusterCallback) callback , (byte[]) commandArguments.get("presetHandle") - , (Optional) - commandArguments.get("delayMinutes") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -26252,18 +26226,6 @@ public Map> getCommandMap() { ); thermostatClusterInteractionInfoMap.put("commitPresetsSchedulesRequest", thermostatcommitPresetsSchedulesRequestInteractionInfo); - Map thermostatcancelSetActivePresetRequestCommandParams = new LinkedHashMap(); - InteractionInfo thermostatcancelSetActivePresetRequestInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ThermostatCluster) cluster) - .cancelSetActivePresetRequest((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), - thermostatcancelSetActivePresetRequestCommandParams - ); - thermostatClusterInteractionInfoMap.put("cancelSetActivePresetRequest", thermostatcancelSetActivePresetRequestInteractionInfo); - Map thermostatsetTemperatureSetpointHoldPolicyCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatsetTemperatureSetpointHoldPolicytemperatureSetpointHoldPolicyCommandParameterInfo = new CommandParameterInfo("temperatureSetpointHoldPolicy", Integer.class, Integer.class); 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 2fb1d2221393f9..75edd8da4997e5 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,20 +17,22 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessControlEntryChangedEvent( - val adminNodeID: ULong?, - val adminPasscodeID: UInt?, - val changeType: UInt, - val latestValue: - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlEntryChangedEvent ( + val adminNodeID: ULong?, + val adminPasscodeID: UInt?, + val changeType: UInt, + val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlEntryChangedEvent( tlvWriter.apply { startStructure(tlvTag) 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() } @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlEntryChangedEvent( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessControlEntryChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent { tlvReader.enterStructure(tlvTag) - val adminNodeID = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = - if (!tlvReader.isNull()) { - 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.getUInt(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 66a3ec9dd07d0e..31aad754e04833 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,20 +17,22 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionChangedEvent( - val adminNodeID: ULong?, - val adminPasscodeID: UInt?, - val changeType: UInt, - val latestValue: - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlExtensionChangedEvent ( + val adminNodeID: ULong?, + val adminPasscodeID: UInt?, + val changeType: UInt, + val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent( tlvWriter.apply { startStructure(tlvTag) 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() } @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlExtensionChangedEvent( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessControlExtensionChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent { tlvReader.enterStructure(tlvTag) - val adminNodeID = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = - if (!tlvReader.isNull()) { - 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.getUInt(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/AccountLoginClusterLoggedOutEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt index 5c1bf98d9c4f79..b608b8499d5445 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt @@ -17,14 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccountLoginClusterLoggedOutEvent(val node: Optional) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccountLoginClusterLoggedOutEvent ( + val node: Optional) { + override fun toString(): String = buildString { append("AccountLoginClusterLoggedOutEvent {\n") append("\tnode : $node\n") append("}\n") @@ -34,9 +38,9 @@ class AccountLoginClusterLoggedOutEvent(val node: Optional) { tlvWriter.apply { startStructure(tlvTag) if (node.isPresent) { - val optnode = node.get() - put(ContextSpecificTag(TAG_NODE), optnode) - } + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } endStructure() } } @@ -44,15 +48,14 @@ class AccountLoginClusterLoggedOutEvent(val node: Optional) { companion object { private const val TAG_NODE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccountLoginClusterLoggedOutEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccountLoginClusterLoggedOutEvent { tlvReader.enterStructure(tlvTag) - val node = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - + val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return AccountLoginClusterLoggedOutEvent(node) 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 ac1929f9697af5..59405162837cd8 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,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ActionsClusterActionFailedEvent( - val actionID: UInt, - val invokeID: ULong, - val newState: UInt, - val error: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterActionFailedEvent ( + val actionID: UInt, + val invokeID: ULong, + val newState: UInt, + val error: UInt) { + override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -54,13 +57,13 @@ class ActionsClusterActionFailedEvent( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent { tlvReader.enterStructure(tlvTag) val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) val error = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR)) - + tlvReader.exitContainer() 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 d95c5e9d66480b..868fbace2ac50e 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,13 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ActionsClusterStateChangedEvent(val actionID: UInt, val invokeID: ULong, val newState: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterStateChangedEvent ( + val actionID: UInt, + val invokeID: ULong, + val newState: UInt) { + override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -46,12 +53,12 @@ class ActionsClusterStateChangedEvent(val actionID: UInt, val invokeID: ULong, v private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterStateChangedEvent { tlvReader.enterStructure(tlvTag) val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) - + tlvReader.exitContainer() 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 6d2c068c849afb..8ca5a2a0195e9c 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BasicInformationClusterLeaveEvent(val fabricIndex: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterLeaveEvent ( + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("BasicInformationClusterLeaveEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterLeaveEvent(val fabricIndex: UInt) { companion object { private const val TAG_FABRIC_INDEX = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterLeaveEvent { tlvReader.enterStructure(tlvTag) val fabricIndex = tlvReader.getUInt(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 4e6cb20e13c5e0..4a6bf00b468e48 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterReachableChangedEvent ( + val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolea companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tlvTag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt index 5ba3a8d3591e9a..b87f7ebee81d72 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BasicInformationClusterStartUpEvent(val softwareVersion: ULong) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterStartUpEvent ( + val softwareVersion: ULong) { + override fun toString(): String = buildString { append("BasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterStartUpEvent(val softwareVersion: ULong) { companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterStartUpEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(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 f133fd21988180..632226d00db082 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class BooleanStateClusterStateChangeEvent ( + val stateValue: Boolean) { + override fun toString(): String = buildString { append("BooleanStateClusterStateChangeEvent {\n") append("\tstateValue : $stateValue\n") append("}\n") @@ -40,10 +45,10 @@ class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { companion object { private const val TAG_STATE_VALUE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BooleanStateClusterStateChangeEvent { tlvReader.enterStructure(tlvTag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) - + tlvReader.exitContainer() return BooleanStateClusterStateChangeEvent(stateValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt index 0a7e894a576b58..81fa108828d662 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterAlarmsStateChangedEvent.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanStateConfigurationClusterAlarmsStateChangedEvent( - val alarmsActive: UInt, - val alarmsSuppressed: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BooleanStateConfigurationClusterAlarmsStateChangedEvent ( + val alarmsActive: UInt, + val alarmsSuppressed: Optional) { + override fun toString(): String = buildString { append("BooleanStateConfigurationClusterAlarmsStateChangedEvent {\n") append("\talarmsActive : $alarmsActive\n") append("\talarmsSuppressed : $alarmsSuppressed\n") @@ -39,9 +41,9 @@ class BooleanStateConfigurationClusterAlarmsStateChangedEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARMS_ACTIVE), alarmsActive) if (alarmsSuppressed.isPresent) { - val optalarmsSuppressed = alarmsSuppressed.get() - put(ContextSpecificTag(TAG_ALARMS_SUPPRESSED), optalarmsSuppressed) - } + val optalarmsSuppressed = alarmsSuppressed.get() + put(ContextSpecificTag(TAG_ALARMS_SUPPRESSED), optalarmsSuppressed) + } endStructure() } } @@ -50,19 +52,15 @@ class BooleanStateConfigurationClusterAlarmsStateChangedEvent( private const val TAG_ALARMS_ACTIVE = 0 private const val TAG_ALARMS_SUPPRESSED = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): BooleanStateConfigurationClusterAlarmsStateChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BooleanStateConfigurationClusterAlarmsStateChangedEvent { tlvReader.enterStructure(tlvTag) val alarmsActive = tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_ACTIVE)) - val alarmsSuppressed = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) - } else { - Optional.empty() - } - + val alarmsSuppressed = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return BooleanStateConfigurationClusterAlarmsStateChangedEvent(alarmsActive, alarmsSuppressed) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt index 67b087d38fa15c..8349bb8fd86151 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateConfigurationClusterSensorFaultEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class BooleanStateConfigurationClusterSensorFaultEvent ( + val sensorFault: UInt) { + override fun toString(): String = buildString { append("BooleanStateConfigurationClusterSensorFaultEvent {\n") append("\tsensorFault : $sensorFault\n") append("}\n") @@ -40,13 +45,10 @@ class BooleanStateConfigurationClusterSensorFaultEvent(val sensorFault: UInt) { companion object { private const val TAG_SENSOR_FAULT = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): BooleanStateConfigurationClusterSensorFaultEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BooleanStateConfigurationClusterSensorFaultEvent { tlvReader.enterStructure(tlvTag) val sensorFault = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_FAULT)) - + tlvReader.exitContainer() return BooleanStateConfigurationClusterSensorFaultEvent(sensorFault) 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 3c243781acc941..b5bbae742887b3 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterReachableChangedEvent ( + val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -40,13 +45,10 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNew companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): BridgedDeviceBasicInformationClusterReachableChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tlvTag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt index 87f19e7bc0be6c..ac2c49d2929233 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: ULong) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterStartUpEvent ( + val softwareVersion: ULong) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -40,13 +45,10 @@ class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: ULon companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): BridgedDeviceBasicInformationClusterStartUpEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterStartUpEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt index 7c277de07bd584..788512180453b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt @@ -17,40 +17,27 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent( - val eventID: ByteArray, - val transitionIndex: UInt?, - val status: UInt, - val criticality: UInt, - val control: UInt, - val temperatureControl: - Optional< - chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterTemperatureControlStruct - >?, - val averageLoadControl: - Optional< - chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterAverageLoadControlStruct - >?, - val dutyCycleControl: - Optional< - chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterDutyCycleControlStruct - >?, - val powerSavingsControl: - Optional< - chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterPowerSavingsControlStruct - >?, - val heatingSourceControl: - Optional< - chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterHeatingSourceControlStruct - >?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent ( + val eventID: ByteArray, + val transitionIndex: UInt?, + val status: UInt, + val criticality: UInt, + val control: UInt, + val temperatureControl: Optional?, + val averageLoadControl: Optional?, + val dutyCycleControl: Optional?, + val powerSavingsControl: Optional?, + val heatingSourceControl: Optional?) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {\n") append("\teventID : $eventID\n") append("\ttransitionIndex : $transitionIndex\n") @@ -70,53 +57,53 @@ class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_EVENT_I_D), eventID) if (transitionIndex != null) { - put(ContextSpecificTag(TAG_TRANSITION_INDEX), transitionIndex) - } else { - putNull(ContextSpecificTag(TAG_TRANSITION_INDEX)) - } + put(ContextSpecificTag(TAG_TRANSITION_INDEX), transitionIndex) + } else { + putNull(ContextSpecificTag(TAG_TRANSITION_INDEX)) + } put(ContextSpecificTag(TAG_STATUS), status) put(ContextSpecificTag(TAG_CRITICALITY), criticality) put(ContextSpecificTag(TAG_CONTROL), control) if (temperatureControl != null) { - if (temperatureControl.isPresent) { - val opttemperatureControl = temperatureControl.get() - opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this) - } - } else { - putNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL)) - } + if (temperatureControl.isPresent) { + val opttemperatureControl = temperatureControl.get() + opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this) + } + } else { + putNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL)) + } if (averageLoadControl != null) { - if (averageLoadControl.isPresent) { - val optaverageLoadControl = averageLoadControl.get() - optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this) - } - } else { - putNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL)) - } + if (averageLoadControl.isPresent) { + val optaverageLoadControl = averageLoadControl.get() + optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this) + } + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL)) + } if (dutyCycleControl != null) { - if (dutyCycleControl.isPresent) { - val optdutyCycleControl = dutyCycleControl.get() - optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this) - } - } else { - putNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL)) - } + if (dutyCycleControl.isPresent) { + val optdutyCycleControl = dutyCycleControl.get() + optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this) + } + } else { + putNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL)) + } if (powerSavingsControl != null) { - if (powerSavingsControl.isPresent) { - val optpowerSavingsControl = powerSavingsControl.get() - optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this) - } - } else { - putNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL)) - } + if (powerSavingsControl.isPresent) { + val optpowerSavingsControl = powerSavingsControl.get() + optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this) + } + } else { + putNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL)) + } if (heatingSourceControl != null) { - if (heatingSourceControl.isPresent) { - val optheatingSourceControl = heatingSourceControl.get() - optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this) - } - } else { - putNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL)) - } + if (heatingSourceControl.isPresent) { + val optheatingSourceControl = heatingSourceControl.get() + optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this) + } + } else { + putNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL)) + } endStructure() } } @@ -133,112 +120,72 @@ class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent( private const val TAG_POWER_SAVINGS_CONTROL = 8 private const val TAG_HEATING_SOURCE_CONTROL = 9 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent { tlvReader.enterStructure(tlvTag) val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D)) - val transitionIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TRANSITION_INDEX)) - null - } + val transitionIndex = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TRANSITION_INDEX)) + null + } val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS)) val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY)) val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL)) - val temperatureControl = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) { - Optional.of( - chip.devicecontroller.cluster.structs - .DemandResponseLoadControlClusterTemperatureControlStruct - .fromTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL)) - null - } - val averageLoadControl = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) { - Optional.of( - chip.devicecontroller.cluster.structs - .DemandResponseLoadControlClusterAverageLoadControlStruct - .fromTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL)) - null - } - val dutyCycleControl = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) { - Optional.of( - chip.devicecontroller.cluster.structs - .DemandResponseLoadControlClusterDutyCycleControlStruct - .fromTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL)) - null - } - val powerSavingsControl = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) { - Optional.of( - chip.devicecontroller.cluster.structs - .DemandResponseLoadControlClusterPowerSavingsControlStruct - .fromTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL)) - null - } - val heatingSourceControl = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) { - Optional.of( - chip.devicecontroller.cluster.structs - .DemandResponseLoadControlClusterHeatingSourceControlStruct - .fromTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL)) - null - } - + val temperatureControl = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) { + Optional.of(chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterTemperatureControlStruct.fromTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TEMPERATURE_CONTROL)) + null + } + val averageLoadControl = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) { + Optional.of(chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterAverageLoadControlStruct.fromTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL)) + null + } + val dutyCycleControl = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) { + Optional.of(chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterDutyCycleControlStruct.fromTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL)) + null + } + val powerSavingsControl = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) { + Optional.of(chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterPowerSavingsControlStruct.fromTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL)) + null + } + val heatingSourceControl = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) { + Optional.of(chip.devicecontroller.cluster.structs.DemandResponseLoadControlClusterHeatingSourceControlStruct.fromTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL)) + null + } + tlvReader.exitContainer() - return DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent( - eventID, - transitionIndex, - status, - criticality, - control, - temperatureControl, - averageLoadControl, - dutyCycleControl, - powerSavingsControl, - heatingSourceControl, - ) + return DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent(eventID, transitionIndex, status, criticality, control, temperatureControl, averageLoadControl, dutyCycleControl, powerSavingsControl, heatingSourceControl) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt index c591c0de976708..80397f205a2435 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterPowerAdjustEndEvent( - val cause: UInt, - val duration: ULong, - val energyUse: Long, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterPowerAdjustEndEvent ( + val cause: UInt, + val duration: ULong, + val energyUse: Long) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterPowerAdjustEndEvent {\n") append("\tcause : $cause\n") append("\tduration : $duration\n") @@ -50,15 +53,12 @@ class DeviceEnergyManagementClusterPowerAdjustEndEvent( private const val TAG_DURATION = 1 private const val TAG_ENERGY_USE = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DeviceEnergyManagementClusterPowerAdjustEndEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterPowerAdjustEndEvent { tlvReader.enterStructure(tlvTag) val cause = tlvReader.getUInt(ContextSpecificTag(TAG_CAUSE)) val duration = tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) val energyUse = tlvReader.getLong(ContextSpecificTag(TAG_ENERGY_USE)) - + tlvReader.exitContainer() return DeviceEnergyManagementClusterPowerAdjustEndEvent(cause, duration, energyUse) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt index 5b4be5cfc2fd55..9d64e16ea5a9fd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterResumedEvent(val cause: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterResumedEvent ( + val cause: UInt) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterResumedEvent {\n") append("\tcause : $cause\n") append("}\n") @@ -40,10 +45,10 @@ class DeviceEnergyManagementClusterResumedEvent(val cause: UInt) { companion object { private const val TAG_CAUSE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterResumedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterResumedEvent { tlvReader.enterStructure(tlvTag) val cause = tlvReader.getUInt(ContextSpecificTag(TAG_CAUSE)) - + tlvReader.exitContainer() return DeviceEnergyManagementClusterResumedEvent(cause) 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 122314baafdfe8..71bdf0da0ad747 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,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DishwasherAlarmClusterNotifyEvent( - val active: ULong, - val inactive: ULong, - val state: ULong, - val mask: ULong, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherAlarmClusterNotifyEvent ( + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong) { + override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -54,13 +57,13 @@ class DishwasherAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DishwasherAlarmClusterNotifyEvent { tlvReader.enterStructure(tlvTag) val active = tlvReader.getULong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getULong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getULong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getULong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt index 918abe443473eb..a64fa042cfcd15 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DoorLockClusterDoorLockAlarmEvent(val alarmCode: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterDoorLockAlarmEvent ( + val alarmCode: UInt) { + override fun toString(): String = buildString { append("DoorLockClusterDoorLockAlarmEvent {\n") append("\talarmCode : $alarmCode\n") append("}\n") @@ -40,10 +45,10 @@ class DoorLockClusterDoorLockAlarmEvent(val alarmCode: UInt) { companion object { private const val TAG_ALARM_CODE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorLockAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmCode = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_CODE)) - + tlvReader.exitContainer() return DoorLockClusterDoorLockAlarmEvent(alarmCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt index 64b69e7e205eb0..bed611cb8674c0 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DoorLockClusterDoorStateChangeEvent(val doorState: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterDoorStateChangeEvent ( + val doorState: UInt) { + override fun toString(): String = buildString { append("DoorLockClusterDoorStateChangeEvent {\n") append("\tdoorState : $doorState\n") append("}\n") @@ -40,10 +45,10 @@ class DoorLockClusterDoorStateChangeEvent(val doorState: UInt) { companion object { private const val TAG_DOOR_STATE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorStateChangeEvent { tlvReader.enterStructure(tlvTag) val doorState = tlvReader.getUInt(ContextSpecificTag(TAG_DOOR_STATE)) - + tlvReader.exitContainer() return DoorLockClusterDoorStateChangeEvent(doorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt index 2ea5f3e9ae4e4a..c57900a30d7946 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 @@ -17,24 +17,24 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DoorLockClusterLockOperationErrorEvent( - val lockOperationType: UInt, - val operationSource: UInt, - val operationError: UInt, - val userIndex: UInt?, - val fabricIndex: UInt?, - val sourceNode: ULong?, - val credentials: - Optional>?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterLockOperationErrorEvent ( + val lockOperationType: UInt, + val operationSource: UInt, + val operationError: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + 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() - startArray(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startArray(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } endStructure() } } @@ -92,68 +92,49 @@ class DoorLockClusterLockOperationErrorEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_CREDENTIALS = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationErrorEvent { tlvReader.enterStructure(tlvTag) val lockOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) val operationError = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_ERROR)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) - while (!tlvReader.isEndOfContainer()) { - this.add( - 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.getUInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) + while(!tlvReader.isEndOfContainer()) { + this.add(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 dc228babf5476e..e86a8e434ee3ae 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 @@ -17,23 +17,23 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DoorLockClusterLockOperationEvent( - val lockOperationType: UInt, - val operationSource: UInt, - val userIndex: UInt?, - val fabricIndex: UInt?, - val sourceNode: ULong?, - val credentials: - Optional>?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterLockOperationEvent ( + val lockOperationType: UInt, + val operationSource: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + 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() - startArray(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startArray(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } endStructure() } } @@ -88,66 +88,48 @@ class DoorLockClusterLockOperationEvent( private const val TAG_SOURCE_NODE = 4 private const val TAG_CREDENTIALS = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationEvent { tlvReader.enterStructure(tlvTag) val lockOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) - while (!tlvReader.isEndOfContainer()) { - this.add( - 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.getUInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) + while(!tlvReader.isEndOfContainer()) { + this.add(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 30127e8a0f4b13..7ef7dc4931b846 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,21 +17,24 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DoorLockClusterLockUserChangeEvent( - val lockDataType: UInt, - val dataOperationType: UInt, - val operationSource: UInt, - val userIndex: UInt?, - val fabricIndex: UInt?, - val sourceNode: ULong?, - val dataIndex: UInt?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterLockUserChangeEvent ( + val lockDataType: UInt, + val dataOperationType: UInt, + val operationSource: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + val dataIndex: UInt?) { + override fun toString(): String = buildString { append("DoorLockClusterLockUserChangeEvent {\n") append("\tlockDataType : $lockDataType\n") append("\tdataOperationType : $dataOperationType\n") @@ -50,25 +53,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() } } @@ -82,51 +85,39 @@ class DoorLockClusterLockUserChangeEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_DATA_INDEX = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterLockUserChangeEvent { tlvReader.enterStructure(tlvTag) val lockDataType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) val dataOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val dataIndex = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_DATA_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = if (!tlvReader.isNull()) { + tlvReader.getUInt(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/ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent.kt index dcc442f2270912..5ffcdf60628cff 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent.kt @@ -17,23 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent( - val energyImported: - Optional< - chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - >, - val energyExported: - Optional< - chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - >, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent ( + val energyImported: Optional, + val energyExported: Optional) { + override fun toString(): String = buildString { append("ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent {\n") append("\tenergyImported : $energyImported\n") append("\tenergyExported : $energyExported\n") @@ -44,13 +40,13 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent( tlvWriter.apply { startStructure(tlvTag) if (energyImported.isPresent) { - val optenergyImported = energyImported.get() - optenergyImported.toTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), this) - } + val optenergyImported = energyImported.get() + optenergyImported.toTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), this) + } if (energyExported.isPresent) { - val optenergyExported = energyExported.get() - optenergyExported.toTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), this) - } + val optenergyExported = energyExported.get() + optenergyExported.toTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), this) + } endStructure() } } @@ -59,38 +55,22 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent( private const val TAG_ENERGY_IMPORTED = 0 private const val TAG_ENERGY_EXPORTED = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent { tlvReader.enterStructure(tlvTag) - val energyImported = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_IMPORTED))) { - Optional.of( - chip.devicecontroller.cluster.structs - .ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - .fromTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), tlvReader) - ) - } else { - Optional.empty() - } - val energyExported = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_EXPORTED))) { - Optional.of( - chip.devicecontroller.cluster.structs - .ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - .fromTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), tlvReader) - ) - } else { - Optional.empty() - } - + val energyImported = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_IMPORTED))) { + Optional.of(chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.fromTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), tlvReader)) + } else { + Optional.empty() + } + val energyExported = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_EXPORTED))) { + Optional.of(chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.fromTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent( - energyImported, - energyExported, - ) + return ElectricalEnergyMeasurementClusterCumulativeEnergyMeasuredEvent(energyImported, energyExported) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent.kt index 06dcba97ea840e..b98ed116089884 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent.kt @@ -17,23 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent( - val energyImported: - Optional< - chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - >, - val energyExported: - Optional< - chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - >, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent ( + val energyImported: Optional, + val energyExported: Optional) { + override fun toString(): String = buildString { append("ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent {\n") append("\tenergyImported : $energyImported\n") append("\tenergyExported : $energyExported\n") @@ -44,13 +40,13 @@ class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent( tlvWriter.apply { startStructure(tlvTag) if (energyImported.isPresent) { - val optenergyImported = energyImported.get() - optenergyImported.toTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), this) - } + val optenergyImported = energyImported.get() + optenergyImported.toTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), this) + } if (energyExported.isPresent) { - val optenergyExported = energyExported.get() - optenergyExported.toTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), this) - } + val optenergyExported = energyExported.get() + optenergyExported.toTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), this) + } endStructure() } } @@ -59,38 +55,22 @@ class ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent( private const val TAG_ENERGY_IMPORTED = 0 private const val TAG_ENERGY_EXPORTED = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent { tlvReader.enterStructure(tlvTag) - val energyImported = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_IMPORTED))) { - Optional.of( - chip.devicecontroller.cluster.structs - .ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - .fromTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), tlvReader) - ) - } else { - Optional.empty() - } - val energyExported = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_EXPORTED))) { - Optional.of( - chip.devicecontroller.cluster.structs - .ElectricalEnergyMeasurementClusterEnergyMeasurementStruct - .fromTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), tlvReader) - ) - } else { - Optional.empty() - } - + val energyImported = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_IMPORTED))) { + Optional.of(chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.fromTlv(ContextSpecificTag(TAG_ENERGY_IMPORTED), tlvReader)) + } else { + Optional.empty() + } + val energyExported = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENERGY_EXPORTED))) { + Optional.of(chip.devicecontroller.cluster.structs.ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.fromTlv(ContextSpecificTag(TAG_ENERGY_EXPORTED), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent( - energyImported, - energyExported, - ) + return ElectricalEnergyMeasurementClusterPeriodicEnergyMeasuredEvent(energyImported, energyExported) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent.kt index a54c0daa265362..44302e41e8fec0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent.kt @@ -20,16 +20,15 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent( - val ranges: - List< - chip.devicecontroller.cluster.structs.ElectricalPowerMeasurementClusterMeasurementRangeStruct - > -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent ( + val ranges: List) { + override fun toString(): String = buildString { append("ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent {\n") append("\tranges : $ranges\n") append("}\n") @@ -50,26 +49,16 @@ class ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent( companion object { private const val TAG_RANGES = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent { tlvReader.enterStructure(tlvTag) - val ranges = - buildList< - chip.devicecontroller.cluster.structs.ElectricalPowerMeasurementClusterMeasurementRangeStruct - > { - tlvReader.enterArray(ContextSpecificTag(TAG_RANGES)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs - .ElectricalPowerMeasurementClusterMeasurementRangeStruct - .fromTlv(AnonymousTag, tlvReader) - ) - } - tlvReader.exitContainer() - } - + val ranges = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_RANGES)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.ElectricalPowerMeasurementClusterMeasurementRangeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ElectricalPowerMeasurementClusterMeasurementPeriodRangesEvent(ranges) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVConnectedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVConnectedEvent.kt index 37d91a3291a9f2..f7cf6196cf4937 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVConnectedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVConnectedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterEVConnectedEvent(val sessionID: ULong) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterEVConnectedEvent ( + val sessionID: ULong) { + override fun toString(): String = buildString { append("EnergyEvseClusterEVConnectedEvent {\n") append("\tsessionID : $sessionID\n") append("}\n") @@ -40,10 +45,10 @@ class EnergyEvseClusterEVConnectedEvent(val sessionID: ULong) { companion object { private const val TAG_SESSION_I_D = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterEVConnectedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterEVConnectedEvent { tlvReader.enterStructure(tlvTag) val sessionID = tlvReader.getULong(ContextSpecificTag(TAG_SESSION_I_D)) - + tlvReader.exitContainer() return EnergyEvseClusterEVConnectedEvent(sessionID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVNotDetectedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVNotDetectedEvent.kt index 17654efa1b8956..f3e95efb7fcbfc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVNotDetectedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEVNotDetectedEvent.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterEVNotDetectedEvent( - val sessionID: ULong, - val state: UInt, - val sessionDuration: ULong, - val sessionEnergyCharged: Long, - val sessionEnergyDischarged: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterEVNotDetectedEvent ( + val sessionID: ULong, + val state: UInt, + val sessionDuration: ULong, + val sessionEnergyCharged: Long, + val sessionEnergyDischarged: Optional) { + override fun toString(): String = buildString { append("EnergyEvseClusterEVNotDetectedEvent {\n") append("\tsessionID : $sessionID\n") append("\tstate : $state\n") @@ -48,9 +50,9 @@ class EnergyEvseClusterEVNotDetectedEvent( put(ContextSpecificTag(TAG_SESSION_DURATION), sessionDuration) put(ContextSpecificTag(TAG_SESSION_ENERGY_CHARGED), sessionEnergyCharged) if (sessionEnergyDischarged.isPresent) { - val optsessionEnergyDischarged = sessionEnergyDischarged.get() - put(ContextSpecificTag(TAG_SESSION_ENERGY_DISCHARGED), optsessionEnergyDischarged) - } + val optsessionEnergyDischarged = sessionEnergyDischarged.get() + put(ContextSpecificTag(TAG_SESSION_ENERGY_DISCHARGED), optsessionEnergyDischarged) + } endStructure() } } @@ -62,28 +64,21 @@ class EnergyEvseClusterEVNotDetectedEvent( private const val TAG_SESSION_ENERGY_CHARGED = 3 private const val TAG_SESSION_ENERGY_DISCHARGED = 4 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterEVNotDetectedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterEVNotDetectedEvent { tlvReader.enterStructure(tlvTag) val sessionID = tlvReader.getULong(ContextSpecificTag(TAG_SESSION_I_D)) val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) val sessionDuration = tlvReader.getULong(ContextSpecificTag(TAG_SESSION_DURATION)) val sessionEnergyCharged = tlvReader.getLong(ContextSpecificTag(TAG_SESSION_ENERGY_CHARGED)) - val sessionEnergyDischarged = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SESSION_ENERGY_DISCHARGED))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_SESSION_ENERGY_DISCHARGED))) - } else { - Optional.empty() - } - + val sessionEnergyDischarged = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SESSION_ENERGY_DISCHARGED))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_SESSION_ENERGY_DISCHARGED))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return EnergyEvseClusterEVNotDetectedEvent( - sessionID, - state, - sessionDuration, - sessionEnergyCharged, - sessionEnergyDischarged, - ) + return EnergyEvseClusterEVNotDetectedEvent(sessionID, state, sessionDuration, sessionEnergyCharged, sessionEnergyDischarged) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStartedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStartedEvent.kt index 1ab0f94916c9c9..29444bb45ec2c8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStartedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStartedEvent.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterEnergyTransferStartedEvent( - val sessionID: ULong, - val state: UInt, - val maximumCurrent: Long, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterEnergyTransferStartedEvent ( + val sessionID: ULong, + val state: UInt, + val maximumCurrent: Long) { + override fun toString(): String = buildString { append("EnergyEvseClusterEnergyTransferStartedEvent {\n") append("\tsessionID : $sessionID\n") append("\tstate : $state\n") @@ -50,12 +53,12 @@ class EnergyEvseClusterEnergyTransferStartedEvent( private const val TAG_STATE = 1 private const val TAG_MAXIMUM_CURRENT = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterEnergyTransferStartedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterEnergyTransferStartedEvent { tlvReader.enterStructure(tlvTag) val sessionID = tlvReader.getULong(ContextSpecificTag(TAG_SESSION_I_D)) val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) val maximumCurrent = tlvReader.getLong(ContextSpecificTag(TAG_MAXIMUM_CURRENT)) - + tlvReader.exitContainer() return EnergyEvseClusterEnergyTransferStartedEvent(sessionID, state, maximumCurrent) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStoppedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStoppedEvent.kt index 405ec933dc91e0..ab277d74545a32 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStoppedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterEnergyTransferStoppedEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterEnergyTransferStoppedEvent( - val sessionID: ULong, - val state: UInt, - val reason: UInt, - val energyTransferred: Long, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterEnergyTransferStoppedEvent ( + val sessionID: ULong, + val state: UInt, + val reason: UInt, + val energyTransferred: Long) { + override fun toString(): String = buildString { append("EnergyEvseClusterEnergyTransferStoppedEvent {\n") append("\tsessionID : $sessionID\n") append("\tstate : $state\n") @@ -54,21 +57,16 @@ class EnergyEvseClusterEnergyTransferStoppedEvent( private const val TAG_REASON = 2 private const val TAG_ENERGY_TRANSFERRED = 4 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterEnergyTransferStoppedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterEnergyTransferStoppedEvent { tlvReader.enterStructure(tlvTag) val sessionID = tlvReader.getULong(ContextSpecificTag(TAG_SESSION_I_D)) val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) val reason = tlvReader.getUInt(ContextSpecificTag(TAG_REASON)) val energyTransferred = tlvReader.getLong(ContextSpecificTag(TAG_ENERGY_TRANSFERRED)) - + tlvReader.exitContainer() - return EnergyEvseClusterEnergyTransferStoppedEvent( - sessionID, - state, - reason, - energyTransferred, - ) + return EnergyEvseClusterEnergyTransferStoppedEvent(sessionID, state, reason, energyTransferred) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterFaultEvent.kt index e3c2019af5693d..d95cc19e30fd92 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterFaultEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterFaultEvent( - val sessionID: ULong?, - val state: UInt, - val faultStatePreviousState: UInt, - val faultStateCurrentState: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterFaultEvent ( + val sessionID: ULong?, + val state: UInt, + val faultStatePreviousState: UInt, + val faultStateCurrentState: UInt) { + override fun toString(): String = buildString { append("EnergyEvseClusterFaultEvent {\n") append("\tsessionID : $sessionID\n") append("\tstate : $state\n") @@ -41,10 +44,10 @@ class EnergyEvseClusterFaultEvent( tlvWriter.apply { startStructure(tlvTag) if (sessionID != null) { - put(ContextSpecificTag(TAG_SESSION_I_D), sessionID) - } else { - putNull(ContextSpecificTag(TAG_SESSION_I_D)) - } + put(ContextSpecificTag(TAG_SESSION_I_D), sessionID) + } else { + putNull(ContextSpecificTag(TAG_SESSION_I_D)) + } put(ContextSpecificTag(TAG_STATE), state) put(ContextSpecificTag(TAG_FAULT_STATE_PREVIOUS_STATE), faultStatePreviousState) put(ContextSpecificTag(TAG_FAULT_STATE_CURRENT_STATE), faultStateCurrentState) @@ -58,29 +61,21 @@ class EnergyEvseClusterFaultEvent( private const val TAG_FAULT_STATE_PREVIOUS_STATE = 2 private const val TAG_FAULT_STATE_CURRENT_STATE = 4 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterFaultEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterFaultEvent { tlvReader.enterStructure(tlvTag) - val sessionID = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SESSION_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SESSION_I_D)) - null - } + val sessionID = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SESSION_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SESSION_I_D)) + null + } val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) - val faultStatePreviousState = - tlvReader.getUInt(ContextSpecificTag(TAG_FAULT_STATE_PREVIOUS_STATE)) - val faultStateCurrentState = - tlvReader.getUInt(ContextSpecificTag(TAG_FAULT_STATE_CURRENT_STATE)) - + val faultStatePreviousState = tlvReader.getUInt(ContextSpecificTag(TAG_FAULT_STATE_PREVIOUS_STATE)) + val faultStateCurrentState = tlvReader.getUInt(ContextSpecificTag(TAG_FAULT_STATE_CURRENT_STATE)) + tlvReader.exitContainer() - return EnergyEvseClusterFaultEvent( - sessionID, - state, - faultStatePreviousState, - faultStateCurrentState, - ) + return EnergyEvseClusterFaultEvent(sessionID, state, faultStatePreviousState, faultStateCurrentState) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterRFIDEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterRFIDEvent.kt index 760bc2cd92b2eb..13834fdaa5eb5b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterRFIDEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/EnergyEvseClusterRFIDEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterRFIDEvent(val uid: ByteArray) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterRFIDEvent ( + val uid: ByteArray) { + override fun toString(): String = buildString { append("EnergyEvseClusterRFIDEvent {\n") append("\tuid : $uid\n") append("}\n") @@ -40,10 +45,10 @@ class EnergyEvseClusterRFIDEvent(val uid: ByteArray) { companion object { private const val TAG_UID = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterRFIDEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterRFIDEvent { tlvReader.enterStructure(tlvTag) val uid = tlvReader.getByteArray(ContextSpecificTag(TAG_UID)) - + tlvReader.exitContainer() return EnergyEvseClusterRFIDEvent(uid) 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 ab8a2c3ad964b4..c3100ce31c6f9b 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterBootReasonEvent ( + val bootReason: UInt) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterBootReasonEvent {\n") append("\tbootReason : $bootReason\n") append("}\n") @@ -40,10 +45,10 @@ class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: UInt) { companion object { private const val TAG_BOOT_REASON = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterBootReasonEvent { tlvReader.enterStructure(tlvTag) val bootReason = tlvReader.getUInt(ContextSpecificTag(TAG_BOOT_REASON)) - + tlvReader.exitContainer() return GeneralDiagnosticsClusterBootReasonEvent(bootReason) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt index fff9dd981cef37..f93896c837f200 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,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GeneralDiagnosticsClusterHardwareFaultChangeEvent( - val current: List, - val previous: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,28 +57,23 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterHardwareFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt index ca2fccd8951b88..ebc04643e795f2 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,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GeneralDiagnosticsClusterNetworkFaultChangeEvent( - val current: List, - val previous: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,28 +57,23 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt index a2cae848f6d091..238e8657f6984b 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,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GeneralDiagnosticsClusterRadioFaultChangeEvent( - val current: List, - val previous: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterRadioFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,25 +57,23 @@ class GeneralDiagnosticsClusterRadioFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterRadioFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt index bb5ffc28b66398..c8127f90ae7b9c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MediaPlaybackClusterStateChangedEvent.kt @@ -17,25 +17,26 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MediaPlaybackClusterStateChangedEvent( - val currentState: UInt, - val startTime: ULong, - val duration: ULong, - val sampledPosition: - chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct, - val playbackSpeed: Float, - val seekRangeEnd: ULong, - val seekRangeStart: ULong, - val data: Optional, - val audioAdvanceUnmuted: Boolean, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaPlaybackClusterStateChangedEvent ( + val currentState: UInt, + val startTime: ULong, + val duration: ULong, + val sampledPosition: chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct, + val playbackSpeed: Float, + val seekRangeEnd: ULong, + val seekRangeStart: ULong, + val data: Optional, + val audioAdvanceUnmuted: Boolean) { + override fun toString(): String = buildString { append("MediaPlaybackClusterStateChangedEvent {\n") append("\tcurrentState : $currentState\n") append("\tstartTime : $startTime\n") @@ -60,9 +61,9 @@ class MediaPlaybackClusterStateChangedEvent( put(ContextSpecificTag(TAG_SEEK_RANGE_END), seekRangeEnd) put(ContextSpecificTag(TAG_SEEK_RANGE_START), seekRangeStart) if (data.isPresent) { - val optdata = data.get() - put(ContextSpecificTag(TAG_DATA), optdata) - } + val optdata = data.get() + put(ContextSpecificTag(TAG_DATA), optdata) + } put(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED), audioAdvanceUnmuted) endStructure() } @@ -79,40 +80,25 @@ class MediaPlaybackClusterStateChangedEvent( private const val TAG_DATA = 7 private const val TAG_AUDIO_ADVANCE_UNMUTED = 8 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterStateChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterStateChangedEvent { tlvReader.enterStructure(tlvTag) val currentState = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_STATE)) val startTime = tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) val duration = tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) - val sampledPosition = - chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct.fromTlv( - ContextSpecificTag(TAG_SAMPLED_POSITION), - tlvReader, - ) + val sampledPosition = chip.devicecontroller.cluster.structs.MediaPlaybackClusterPlaybackPositionStruct.fromTlv(ContextSpecificTag(TAG_SAMPLED_POSITION), tlvReader) val playbackSpeed = tlvReader.getFloat(ContextSpecificTag(TAG_PLAYBACK_SPEED)) val seekRangeEnd = tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_END)) val seekRangeStart = tlvReader.getULong(ContextSpecificTag(TAG_SEEK_RANGE_START)) - val data = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_DATA))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_DATA))) - } else { - Optional.empty() - } + val data = if (tlvReader.isNextTag(ContextSpecificTag(TAG_DATA))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_DATA))) + } else { + Optional.empty() + } val audioAdvanceUnmuted = tlvReader.getBoolean(ContextSpecificTag(TAG_AUDIO_ADVANCE_UNMUTED)) - + tlvReader.exitContainer() - return MediaPlaybackClusterStateChangedEvent( - currentState, - startTime, - duration, - sampledPosition, - playbackSpeed, - seekRangeEnd, - seekRangeStart, - data, - audioAdvanceUnmuted, - ) + return MediaPlaybackClusterStateChangedEvent(currentState, startTime, duration, sampledPosition, playbackSpeed, seekRangeEnd, seekRangeStart, data, audioAdvanceUnmuted) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt index b8524b20183e67..50dda5b2e349c8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MessagesClusterMessageCompleteEvent( - val messageID: ByteArray, - val responseID: Optional?, - val reply: Optional?, - val futureMessagesPreference: UInt?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MessagesClusterMessageCompleteEvent ( + val messageID: ByteArray, + val responseID: Optional?, + val reply: Optional?, + val futureMessagesPreference: UInt?) { + override fun toString(): String = buildString { append("MessagesClusterMessageCompleteEvent {\n") append("\tmessageID : $messageID\n") append("\tresponseID : $responseID\n") @@ -43,26 +45,26 @@ class MessagesClusterMessageCompleteEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_MESSAGE_I_D), messageID) if (responseID != null) { - if (responseID.isPresent) { - val optresponseID = responseID.get() - put(ContextSpecificTag(TAG_RESPONSE_I_D), optresponseID) - } - } else { - putNull(ContextSpecificTag(TAG_RESPONSE_I_D)) - } + if (responseID.isPresent) { + val optresponseID = responseID.get() + put(ContextSpecificTag(TAG_RESPONSE_I_D), optresponseID) + } + } else { + putNull(ContextSpecificTag(TAG_RESPONSE_I_D)) + } if (reply != null) { - if (reply.isPresent) { - val optreply = reply.get() - put(ContextSpecificTag(TAG_REPLY), optreply) - } - } else { - putNull(ContextSpecificTag(TAG_REPLY)) - } + if (reply.isPresent) { + val optreply = reply.get() + put(ContextSpecificTag(TAG_REPLY), optreply) + } + } else { + putNull(ContextSpecificTag(TAG_REPLY)) + } if (futureMessagesPreference != null) { - put(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE), futureMessagesPreference) - } else { - putNull(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE)) - } + put(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE), futureMessagesPreference) + } else { + putNull(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE)) + } endStructure() } } @@ -73,47 +75,39 @@ class MessagesClusterMessageCompleteEvent( private const val TAG_REPLY = 2 private const val TAG_FUTURE_MESSAGES_PREFERENCE = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MessagesClusterMessageCompleteEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MessagesClusterMessageCompleteEvent { tlvReader.enterStructure(tlvTag) val messageID = tlvReader.getByteArray(ContextSpecificTag(TAG_MESSAGE_I_D)) - val responseID = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_RESPONSE_I_D))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_RESPONSE_I_D))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_RESPONSE_I_D)) - null - } - val reply = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_REPLY))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_REPLY))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_REPLY)) - null - } - val futureMessagesPreference = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE)) - null - } - + val responseID = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_RESPONSE_I_D))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_RESPONSE_I_D))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_RESPONSE_I_D)) + null + } + val reply = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_REPLY))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_REPLY))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_REPLY)) + null + } + val futureMessagesPreference = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FUTURE_MESSAGES_PREFERENCE)) + null + } + tlvReader.exitContainer() - return MessagesClusterMessageCompleteEvent( - messageID, - responseID, - reply, - futureMessagesPreference, - ) + return MessagesClusterMessageCompleteEvent(messageID, responseID, reply, futureMessagesPreference) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt index a2e39882f9ab4a..3ba51595b78219 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MessagesClusterMessagePresentedEvent(val messageID: ByteArray) { - override fun toString(): String = buildString { +import java.util.Optional + +class MessagesClusterMessagePresentedEvent ( + val messageID: ByteArray) { + override fun toString(): String = buildString { append("MessagesClusterMessagePresentedEvent {\n") append("\tmessageID : $messageID\n") append("}\n") @@ -40,10 +45,10 @@ class MessagesClusterMessagePresentedEvent(val messageID: ByteArray) { companion object { private const val TAG_MESSAGE_I_D = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MessagesClusterMessagePresentedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MessagesClusterMessagePresentedEvent { tlvReader.enterStructure(tlvTag) val messageID = tlvReader.getByteArray(ContextSpecificTag(TAG_MESSAGE_I_D)) - + tlvReader.exitContainer() return MessagesClusterMessagePresentedEvent(messageID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt index db5ed28fae6de0..5f06909543cfe8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MessagesClusterMessageQueuedEvent(val messageID: ByteArray) { - override fun toString(): String = buildString { +import java.util.Optional + +class MessagesClusterMessageQueuedEvent ( + val messageID: ByteArray) { + override fun toString(): String = buildString { append("MessagesClusterMessageQueuedEvent {\n") append("\tmessageID : $messageID\n") append("}\n") @@ -40,10 +45,10 @@ class MessagesClusterMessageQueuedEvent(val messageID: ByteArray) { companion object { private const val TAG_MESSAGE_I_D = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MessagesClusterMessageQueuedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MessagesClusterMessageQueuedEvent { tlvReader.enterStructure(tlvTag) val messageID = tlvReader.getByteArray(ContextSpecificTag(TAG_MESSAGE_I_D)) - + tlvReader.exitContainer() return MessagesClusterMessageQueuedEvent(messageID) 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 4875a8d188e0f4..bd2f7895bfd1e2 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,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OperationalStateClusterOperationCompletionEvent( - val completionErrorCode: UInt, - val totalOperationalTime: Optional?, - val pausedTime: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class OperationalStateClusterOperationCompletionEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (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() } } @@ -65,42 +67,33 @@ class OperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OperationalStateClusterOperationCompletionEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tlvTag) val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getULong(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.getULong(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.getULong(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.getULong(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 f03aa75e8a32df..f0cd196223d72c 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,15 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OperationalStateClusterOperationalErrorEvent( - val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalStateClusterOperationalErrorEvent ( + val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -42,14 +45,10 @@ class OperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tlvTag) - 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 f687f1857c9439..67e9047f0532a4 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,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( - val softwareVersion: ULong, - val bytesDownloaded: ULong, - val progressPercent: UInt?, - val platformCode: Long?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( + val softwareVersion: ULong, + val bytesDownloaded: ULong, + val progressPercent: UInt?, + val platformCode: Long?) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tbytesDownloaded : $bytesDownloaded\n") @@ -43,15 +46,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() } } @@ -62,36 +65,26 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( private const val TAG_PROGRESS_PERCENT = 2 private const val TAG_PLATFORM_CODE = 3 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val bytesDownloaded = tlvReader.getULong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) - val progressPercent = - if (!tlvReader.isNull()) { - tlvReader.getUInt(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.getUInt(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 80a1f6386d8654..99acba4d90a2dd 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,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( - val previousState: UInt, - val newState: UInt, - val reason: UInt, - val targetSoftwareVersion: ULong?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( + val previousState: UInt, + val newState: UInt, + val reason: UInt, + val targetSoftwareVersion: ULong?) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") append("\tpreviousState : $previousState\n") append("\tnewState : $newState\n") @@ -44,10 +47,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() } } @@ -58,30 +61,21 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( private const val TAG_REASON = 2 private const val TAG_TARGET_SOFTWARE_VERSION = 3 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterStateTransitionEvent { tlvReader.enterStructure(tlvTag) val previousState = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) val reason = tlvReader.getUInt(ContextSpecificTag(TAG_REASON)) - val targetSoftwareVersion = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - null - } - + val targetSoftwareVersion = if (!tlvReader.isNull()) { + tlvReader.getULong(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 17cf46b96d68af..50dda1eeae85db 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,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( - val softwareVersion: ULong, - val productID: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( + val softwareVersion: ULong, + val productID: UInt) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tproductID : $productID\n") @@ -46,14 +49,11 @@ class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( private const val TAG_SOFTWARE_VERSION = 0 private const val TAG_PRODUCT_I_D = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val productID = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_I_D)) - + tlvReader.exitContainer() return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationCompletionEvent.kt index 9953ea0d773fd5..c823fe799eb82b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationCompletionEvent.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OvenCavityOperationalStateClusterOperationCompletionEvent( - val completionErrorCode: UInt, - val totalOperationalTime: Optional?, - val pausedTime: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OvenCavityOperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("OvenCavityOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class OvenCavityOperationalStateClusterOperationCompletionEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (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() } } @@ -65,42 +67,33 @@ class OvenCavityOperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OvenCavityOperationalStateClusterOperationCompletionEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OvenCavityOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tlvTag) val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getULong(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.getULong(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.getULong(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.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return OvenCavityOperationalStateClusterOperationCompletionEvent( - completionErrorCode, - totalOperationalTime, - pausedTime, - ) + return OvenCavityOperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationalErrorEvent.kt index 34453d66e545b3..9ba1604dedd97a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OvenCavityOperationalStateClusterOperationalErrorEvent.kt @@ -17,16 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OvenCavityOperationalStateClusterOperationalErrorEvent( - val errorState: - chip.devicecontroller.cluster.structs.OvenCavityOperationalStateClusterErrorStateStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OvenCavityOperationalStateClusterOperationalErrorEvent ( + val errorState: chip.devicecontroller.cluster.structs.OvenCavityOperationalStateClusterErrorStateStruct) { + override fun toString(): String = buildString { append("OvenCavityOperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -43,15 +45,10 @@ class OvenCavityOperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OvenCavityOperationalStateClusterOperationalErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OvenCavityOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tlvTag) - val errorState = - chip.devicecontroller.cluster.structs.OvenCavityOperationalStateClusterErrorStateStruct - .fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = chip.devicecontroller.cluster.structs.OvenCavityOperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) + tlvReader.exitContainer() return OvenCavityOperationalStateClusterOperationalErrorEvent(errorState) 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 2e9b1d88666c7d..b09829b20efd50 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,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class PowerSourceClusterBatChargeFaultChangeEvent( - val current: List, - val previous: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatChargeFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,25 +57,23 @@ class PowerSourceClusterBatChargeFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt index 7a5d133299cef5..ef4689fff56f84 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,11 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterBatFaultChangeEvent(val current: List, val previou private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt index 1f004191d406f0..5062e14fc47019 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,11 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterWiredFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previ private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt index 79ae9106178572..0d0ec7f29f122c 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,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RefrigeratorAlarmClusterNotifyEvent( - val active: ULong, - val inactive: ULong, - val state: ULong, - val mask: ULong, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAlarmClusterNotifyEvent ( + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong) { + override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -54,13 +57,13 @@ class RefrigeratorAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RefrigeratorAlarmClusterNotifyEvent { tlvReader.enterStructure(tlvTag) val active = tlvReader.getULong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getULong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getULong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getULong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt index df03eb5fbeacf6..a9817567e22677 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,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcOperationalStateClusterOperationCompletionEvent( - val completionErrorCode: UInt, - val totalOperationalTime: Optional?, - val pausedTime: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcOperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class RvcOperationalStateClusterOperationCompletionEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (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() } } @@ -65,42 +67,33 @@ class RvcOperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): RvcOperationalStateClusterOperationCompletionEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tlvTag) val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getULong(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.getULong(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.getULong(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.getULong(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 18e64598cc0400..406ef9431645cd 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,15 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcOperationalStateClusterOperationalErrorEvent( - val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcOperationalStateClusterOperationalErrorEvent ( + val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -42,17 +45,10 @@ class RvcOperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): RvcOperationalStateClusterOperationalErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tlvTag) - 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/SampleMeiClusterPingCountEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SampleMeiClusterPingCountEventEvent.kt index a0588f4ad66d56..03b105c427a397 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SampleMeiClusterPingCountEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SampleMeiClusterPingCountEventEvent.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SampleMeiClusterPingCountEventEvent(val count: ULong, val fabricIndex: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SampleMeiClusterPingCountEventEvent ( + val count: ULong, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("SampleMeiClusterPingCountEventEvent {\n") append("\tcount : $count\n") append("\tfabricIndex : $fabricIndex\n") @@ -43,11 +49,11 @@ class SampleMeiClusterPingCountEventEvent(val count: ULong, val fabricIndex: UIn private const val TAG_COUNT = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SampleMeiClusterPingCountEventEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SampleMeiClusterPingCountEventEvent { tlvReader.enterStructure(tlvTag) val count = tlvReader.getULong(ContextSpecificTag(TAG_COUNT)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return SampleMeiClusterPingCountEventEvent(count, fabricIndex) 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 a34090499ca233..48acd74033fca2 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterCOAlarmEvent ( + val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: UInt) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterCOAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt index c3ec4fbf491c87..685a6ab5fc1059 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( + val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: UInt) companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectCOAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt index 3957d722ade622..1fb60bf24aec59 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( + val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: UIn companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt index e855a9391a7491..91345969b757b4 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterLowBatteryEvent ( + val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterLowBatteryEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: UInt) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterLowBatteryEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt index 5e5ff96385c265..3494dffe4f3d5b 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterSmokeAlarmEvent ( + val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: UInt) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterSmokeAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt index 250fc5b4b33321..b0e0d4844fadca 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,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SoftwareDiagnosticsClusterSoftwareFaultEvent( - val id: ULong, - val name: Optional, - val faultRecording: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SoftwareDiagnosticsClusterSoftwareFaultEvent ( + val id: ULong, + val name: Optional, + val faultRecording: Optional) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -41,13 +43,13 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( startStructure(tlvTag) 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() } } @@ -57,22 +59,20 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterSoftwareFaultEvent { tlvReader.enterStructure(tlvTag) val id = tlvReader.getULong(ContextSpecificTag(TAG_ID)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val faultRecording = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) - } else { - Optional.empty() - } - + 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 965bc1a81af5ac..fa3cf254ebdb96 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterInitialPressEvent(val newPosition: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterInitialPressEvent ( + val newPosition: UInt) { + override fun toString(): String = buildString { append("SwitchClusterInitialPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterInitialPressEvent(val newPosition: UInt) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterInitialPressEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(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 e986ef1d8d97fe..2748e8e6a44449 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterLongPressEvent(val newPosition: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterLongPressEvent ( + val newPosition: UInt) { + override fun toString(): String = buildString { append("SwitchClusterLongPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterLongPressEvent(val newPosition: UInt) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterLongPressEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(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 e99b119d906e8b..f4661d48d8e63e 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterLongReleaseEvent(val previousPosition: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterLongReleaseEvent ( + val previousPosition: UInt) { + override fun toString(): String = buildString { append("SwitchClusterLongReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterLongReleaseEvent(val previousPosition: UInt) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterLongReleaseEvent { tlvReader.enterStructure(tlvTag) val previousPosition = tlvReader.getUInt(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 00d9d0c3c1688e..b5d580a7cf0c55 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,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterMultiPressCompleteEvent( - val previousPosition: UInt, - val totalNumberOfPressesCounted: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterMultiPressCompleteEvent ( + val previousPosition: UInt, + val totalNumberOfPressesCounted: UInt) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressCompleteEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") @@ -46,12 +49,11 @@ class SwitchClusterMultiPressCompleteEvent( private const val TAG_PREVIOUS_POSITION = 0 private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressCompleteEvent { tlvReader.enterStructure(tlvTag) val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - val totalNumberOfPressesCounted = - tlvReader.getUInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) - + val totalNumberOfPressesCounted = tlvReader.getUInt(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 9538e1e63ce0a1..fcaf6c0ca5ef5f 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,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterMultiPressOngoingEvent( - val newPosition: UInt, - val currentNumberOfPressesCounted: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterMultiPressOngoingEvent ( + val newPosition: UInt, + val currentNumberOfPressesCounted: UInt) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressOngoingEvent {\n") append("\tnewPosition : $newPosition\n") append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") @@ -46,12 +49,11 @@ class SwitchClusterMultiPressOngoingEvent( private const val TAG_NEW_POSITION = 0 private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressOngoingEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) - val currentNumberOfPressesCounted = - tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) - + val currentNumberOfPressesCounted = tlvReader.getUInt(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 477dc53e895a2a..91a786b4f78740 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterShortReleaseEvent(val previousPosition: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterShortReleaseEvent ( + val previousPosition: UInt) { + override fun toString(): String = buildString { append("SwitchClusterShortReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterShortReleaseEvent(val previousPosition: UInt) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterShortReleaseEvent { tlvReader.enterStructure(tlvTag) val previousPosition = tlvReader.getUInt(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 6a2ea4883e4f6f..f6537ab66e931a 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SwitchClusterSwitchLatchedEvent(val newPosition: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterSwitchLatchedEvent ( + val newPosition: UInt) { + override fun toString(): String = buildString { append("SwitchClusterSwitchLatchedEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterSwitchLatchedEvent(val newPosition: UInt) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterSwitchLatchedEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterSwitchLatchedEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt index 013087d699c567..e49f93ead0165f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TargetNavigatorClusterTargetUpdatedEvent.kt @@ -20,16 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TargetNavigatorClusterTargetUpdatedEvent( - val targetList: - List, - val currentTarget: UInt, - val data: ByteArray, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TargetNavigatorClusterTargetUpdatedEvent ( + val targetList: List, + val currentTarget: UInt, + val data: ByteArray) { + override fun toString(): String = buildString { append("TargetNavigatorClusterTargetUpdatedEvent {\n") append("\ttargetList : $targetList\n") append("\tcurrentTarget : $currentTarget\n") @@ -56,24 +57,18 @@ class TargetNavigatorClusterTargetUpdatedEvent( private const val TAG_CURRENT_TARGET = 1 private const val TAG_DATA = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetUpdatedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetUpdatedEvent { tlvReader.enterStructure(tlvTag) - val targetList = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TARGET_LIST)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.TargetNavigatorClusterTargetInfoStruct.fromTlv( - AnonymousTag, - tlvReader, - ) - ) - } - tlvReader.exitContainer() - } + val targetList = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TARGET_LIST)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.TargetNavigatorClusterTargetInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } val currentTarget = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_TARGET)) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetUpdatedEvent(targetList, currentTarget, data) 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 8e5743e4d5fde9..7a9290a163f25e 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( + val connectionStatus: UInt) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -40,13 +45,10 @@ class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tlvTag) val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt index a73225b779b60b..384675b471a0d6 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,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( - val current: List, - val previous: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,28 +57,23 @@ class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDirectoryClusterNetworkChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDirectoryClusterNetworkChangedEvent.kt index b90c6e8126260b..e7ad1a95aeab59 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDirectoryClusterNetworkChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDirectoryClusterNetworkChangedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDirectoryClusterNetworkChangedEvent(val extendedPanID: ULong) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDirectoryClusterNetworkChangedEvent ( + val extendedPanID: ULong) { + override fun toString(): String = buildString { append("ThreadNetworkDirectoryClusterNetworkChangedEvent {\n") append("\textendedPanID : $extendedPanID\n") append("}\n") @@ -40,13 +45,10 @@ class ThreadNetworkDirectoryClusterNetworkChangedEvent(val extendedPanID: ULong) companion object { private const val TAG_EXTENDED_PAN_I_D = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDirectoryClusterNetworkChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDirectoryClusterNetworkChangedEvent { tlvReader.enterStructure(tlvTag) val extendedPanID = tlvReader.getULong(ContextSpecificTag(TAG_EXTENDED_PAN_I_D)) - + tlvReader.exitContainer() return ThreadNetworkDirectoryClusterNetworkChangedEvent(extendedPanID) 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 7564293e97be61..d4162a1dd3f5ae 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterDSTStatusEvent ( + val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTStatusEvent {\n") append("\tDSTOffsetActive : $DSTOffsetActive\n") append("}\n") @@ -40,10 +45,10 @@ class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { companion object { private const val TAG_D_S_T_OFFSET_ACTIVE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTStatusEvent { tlvReader.enterStructure(tlvTag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) - + tlvReader.exitContainer() return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt index 9e9d5ef9f1355f..52b2b4fd1e1dfa 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,14 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterTimeZoneStatusEvent ( + val offset: Long, + val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") append("\toffset : $offset\n") append("\tname : $name\n") @@ -36,9 +41,9 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: startStructure(tlvTag) 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() } } @@ -47,16 +52,15 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: private const val TAG_OFFSET = 0 private const val TAG_NAME = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStatusEvent { tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - 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/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt index f434bf40b39ffb..25888f96b384ea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestDifferentVendorMeiEventEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterTestDifferentVendorMeiEventEvent(val arg1: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestDifferentVendorMeiEventEvent ( + val arg1: UInt) { + override fun toString(): String = buildString { append("UnitTestingClusterTestDifferentVendorMeiEventEvent {\n") append("\targ1 : $arg1\n") append("}\n") @@ -40,13 +45,10 @@ class UnitTestingClusterTestDifferentVendorMeiEventEvent(val arg1: UInt) { companion object { private const val TAG_ARG1 = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): UnitTestingClusterTestDifferentVendorMeiEventEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestDifferentVendorMeiEventEvent { tlvReader.enterStructure(tlvTag) val arg1 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG1)) - + tlvReader.exitContainer() return UnitTestingClusterTestDifferentVendorMeiEventEvent(arg1) 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 9dc11eadd9fb0d..89dbdc9593b84e 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,18 +20,20 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterTestEventEvent( - val arg1: UInt, - val arg2: UInt, - val arg3: Boolean, - val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, - val arg5: List, - val arg6: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestEventEvent ( + val arg1: UInt, + val arg2: UInt, + 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") @@ -71,38 +73,27 @@ class UnitTestingClusterTestEventEvent( private const val TAG_ARG5 = 5 private const val TAG_ARG6 = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestEventEvent { tlvReader.enterStructure(tlvTag) val arg1 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG1)) val arg2 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) - val arg4 = - chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_ARG4), - tlvReader, - ) - val arg5 = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ARG5)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( - AnonymousTag, - tlvReader, - ) - ) - } - tlvReader.exitContainer() - } - val arg6 = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ARG6)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_ARG4), tlvReader) + val arg5 = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG5)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val arg6 = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG6)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt index b6cc1c77125923..b71c9c788a3a76 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestFabricScopedEventEvent ( + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScopedEventEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,10 +45,10 @@ class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: UInt) { companion object { private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScopedEventEvent { tlvReader.enterStructure(tlvTag) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt index 3c72f4be39c19f..cead9f186377e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ValveConfigurationAndControlClusterValveFaultEvent(val valveFault: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class ValveConfigurationAndControlClusterValveFaultEvent ( + val valveFault: UInt) { + override fun toString(): String = buildString { append("ValveConfigurationAndControlClusterValveFaultEvent {\n") append("\tvalveFault : $valveFault\n") append("}\n") @@ -40,13 +45,10 @@ class ValveConfigurationAndControlClusterValveFaultEvent(val valveFault: UInt) { companion object { private const val TAG_VALVE_FAULT = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ValveConfigurationAndControlClusterValveFaultEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ValveConfigurationAndControlClusterValveFaultEvent { tlvReader.enterStructure(tlvTag) val valveFault = tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_FAULT)) - + tlvReader.exitContainer() return ValveConfigurationAndControlClusterValveFaultEvent(valveFault) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt index dc0f9d4417feff..d8714935057610 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ValveConfigurationAndControlClusterValveStateChangedEvent( - val valveState: UInt, - val valveLevel: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ValveConfigurationAndControlClusterValveStateChangedEvent ( + val valveState: UInt, + val valveLevel: Optional) { + override fun toString(): String = buildString { append("ValveConfigurationAndControlClusterValveStateChangedEvent {\n") append("\tvalveState : $valveState\n") append("\tvalveLevel : $valveLevel\n") @@ -39,9 +41,9 @@ class ValveConfigurationAndControlClusterValveStateChangedEvent( startStructure(tlvTag) put(ContextSpecificTag(TAG_VALVE_STATE), valveState) if (valveLevel.isPresent) { - val optvalveLevel = valveLevel.get() - put(ContextSpecificTag(TAG_VALVE_LEVEL), optvalveLevel) - } + val optvalveLevel = valveLevel.get() + put(ContextSpecificTag(TAG_VALVE_LEVEL), optvalveLevel) + } endStructure() } } @@ -50,19 +52,15 @@ class ValveConfigurationAndControlClusterValveStateChangedEvent( private const val TAG_VALVE_STATE = 0 private const val TAG_VALVE_LEVEL = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ValveConfigurationAndControlClusterValveStateChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ValveConfigurationAndControlClusterValveStateChangedEvent { tlvReader.enterStructure(tlvTag) val valveState = tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_STATE)) - val valveLevel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_VALVE_LEVEL))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_LEVEL))) - } else { - Optional.empty() - } - + val valveLevel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_VALVE_LEVEL))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_LEVEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ValveConfigurationAndControlClusterValveStateChangedEvent(valveState, valveLevel) 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 6b9deed9e3cfca..353230c4664dc5 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,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( - val associationFailureCause: UInt, - val status: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( + val associationFailureCause: UInt, + val status: UInt) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") append("\tassociationFailureCause : $associationFailureCause\n") append("\tstatus : $status\n") @@ -46,15 +49,11 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( private const val TAG_ASSOCIATION_FAILURE_CAUSE = 0 private const val TAG_STATUS = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tlvTag) - val associationFailureCause = - tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE)) + val associationFailureCause = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE_CAUSE)) val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailureCause, 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 9ced04fa58fcb7..e106ddd9b7498d 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( + val connectionStatus: UInt) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -40,13 +45,10 @@ class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: U companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tlvTag) val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt index 0fc4a524c31841..33cb99c03f48a2 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,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( + val reasonCode: UInt) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") @@ -40,13 +45,10 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: UInt) { companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterDisconnectionEvent { tlvReader.enterStructure(tlvTag) val reasonCode = tlvReader.getUInt(ContextSpecificTag(TAG_REASON_CODE)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index c5c5d5e1adbb0d..8074e45d024f15 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -124,7 +124,6 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt", 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 0f0fc914a82f79..d228ef19fb8e79 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,17 +20,19 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessControlEntryStruct( - val privilege: UInt, - val authMode: UInt, - val subjects: List?, - val targets: List?, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlEntryStruct ( + val privilege: UInt, + val authMode: UInt, + val subjects: List?, + val targets: List?, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryStruct {\n") append("\tprivilege : $privilege\n") append("\tauthMode : $authMode\n") @@ -46,23 +48,23 @@ class AccessControlClusterAccessControlEntryStruct( put(ContextSpecificTag(TAG_PRIVILEGE), privilege) put(ContextSpecificTag(TAG_AUTH_MODE), authMode) if (subjects != null) { - startArray(ContextSpecificTag(TAG_SUBJECTS)) - for (item in subjects.iterator()) { - put(AnonymousTag, item) - } - endArray() - } else { - putNull(ContextSpecificTag(TAG_SUBJECTS)) + startArray(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) } + endArray() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) + } if (targets != null) { - startArray(ContextSpecificTag(TAG_TARGETS)) - for (item in targets.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - } else { - putNull(ContextSpecificTag(TAG_TARGETS)) + startArray(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -75,47 +77,39 @@ class AccessControlClusterAccessControlEntryStruct( private const val TAG_TARGETS = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryStruct { tlvReader.enterStructure(tlvTag) val privilege = tlvReader.getUInt(ContextSpecificTag(TAG_PRIVILEGE)) val authMode = tlvReader.getUInt(ContextSpecificTag(TAG_AUTH_MODE)) - val subjects = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_SUBJECTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getULong(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) - null - } - val targets = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TARGETS)) - while (!tlvReader.isEndOfContainer()) { - add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) - null - } + val subjects = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUBJECTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getULong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TARGETS)) + while(!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } val fabricIndex = tlvReader.getUInt(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 0297d1a51acdcb..b41ebafd9de72a 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlExtensionStruct ( + val data: ByteArray, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") append("\tfabricIndex : $fabricIndex\n") @@ -43,14 +49,11 @@ class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessControlExtensionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionStruct { tlvReader.enterStructure(tlvTag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) val fabricIndex = tlvReader.getUInt(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 e88f2989cf4b26..1eab00f450d8f0 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessControlTargetStruct( - val cluster: ULong?, - val endpoint: UInt?, - val deviceType: ULong?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlTargetStruct ( + val cluster: ULong?, + val endpoint: UInt?, + val deviceType: ULong?) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") append("\tcluster : $cluster\n") append("\tendpoint : $endpoint\n") @@ -39,20 +42,20 @@ class AccessControlClusterAccessControlTargetStruct( tlvWriter.apply { startStructure(tlvTag) 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() } } @@ -62,30 +65,27 @@ class AccessControlClusterAccessControlTargetStruct( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlTargetStruct { tlvReader.enterStructure(tlvTag) - val cluster = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) - null - } - val endpoint = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) - null - } - val deviceType = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - null - } - + val cluster = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = if (!tlvReader.isNull()) { + tlvReader.getULong(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 a20404bb1e0d90..8ae474f8e727db 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,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ActionsClusterActionStruct( - val actionID: UInt, - val name: String, - val type: UInt, - val endpointListID: UInt, - val supportedCommands: UInt, - val state: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterActionStruct ( + val actionID: UInt, + val name: String, + val type: UInt, + val endpointListID: UInt, + val supportedCommands: UInt, + val state: UInt) { + override fun toString(): String = buildString { append("ActionsClusterActionStruct {\n") append("\tactionID : $actionID\n") append("\tname : $name\n") @@ -62,7 +65,7 @@ class ActionsClusterActionStruct( private const val TAG_SUPPORTED_COMMANDS = 4 private const val TAG_STATE = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterActionStruct { tlvReader.enterStructure(tlvTag) val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) @@ -70,17 +73,10 @@ class ActionsClusterActionStruct( val endpointListID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val supportedCommands = tlvReader.getUInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) - + tlvReader.exitContainer() - 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 831224d12cff88..a8f078a4ba75c6 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,16 +20,18 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ActionsClusterEndpointListStruct( - val endpointListID: UInt, - val name: String, - val type: UInt, - val endpoints: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterEndpointListStruct ( + val endpointListID: UInt, + val name: String, + val type: UInt, + val endpoints: List) { + override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") append("\tendpointListID : $endpointListID\n") append("\tname : $name\n") @@ -59,20 +61,19 @@ class ActionsClusterEndpointListStruct( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterEndpointListStruct { tlvReader.enterStructure(tlvTag) val endpointListID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) - val endpoints = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val endpoints = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(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 9f9184e08fbae0..fa41e784da11de 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: UInt, - val productIdentifierValue: String, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( + val productIdentifierType: UInt, + val productIdentifierValue: String) { + override fun toString(): String = buildString { append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -46,21 +49,14 @@ class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tlvTag) val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + 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 566b2efdf3b66b..f052c51f03c144 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ApplicationBasicClusterApplicationStruct( - val catalogVendorID: UInt, - val applicationID: String, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationBasicClusterApplicationStruct ( + val catalogVendorID: UInt, + val applicationID: String) { + override fun toString(): String = buildString { append("ApplicationBasicClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -46,11 +49,11 @@ class ApplicationBasicClusterApplicationStruct( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ApplicationBasicClusterApplicationStruct { tlvReader.enterStructure(tlvTag) val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() 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 cdf656978a1dea..89f372803fe317 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,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ApplicationLauncherClusterApplicationEPStruct( - val application: ApplicationLauncherClusterApplicationStruct, - val endpoint: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationLauncherClusterApplicationEPStruct ( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationEPStruct {\n") append("\tapplication : $application\n") append("\tendpoint : $endpoint\n") @@ -39,9 +41,9 @@ class ApplicationLauncherClusterApplicationEPStruct( startStructure(tlvTag) 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() } } @@ -50,20 +52,15 @@ class ApplicationLauncherClusterApplicationEPStruct( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationEPStruct { tlvReader.enterStructure(tlvTag) - val application = - ApplicationLauncherClusterApplicationStruct.fromTlv( - ContextSpecificTag(TAG_APPLICATION), - tlvReader, - ) - val endpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getUInt(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.getUInt(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 26e76b3c699590..b306cbca62125a 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ApplicationLauncherClusterApplicationStruct( - val catalogVendorID: UInt, - val applicationID: String, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationLauncherClusterApplicationStruct ( + val catalogVendorID: UInt, + val applicationID: String) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -46,11 +49,11 @@ class ApplicationLauncherClusterApplicationStruct( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationStruct { tlvReader.enterStructure(tlvTag) val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() 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 6336549e45a0bc..60726ce82d5c56 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,13 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AudioOutputClusterOutputInfoStruct(val index: UInt, val outputType: UInt, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class AudioOutputClusterOutputInfoStruct ( + val index: UInt, + val outputType: UInt, + val name: String) { + override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") append("\toutputType : $outputType\n") @@ -46,12 +53,12 @@ class AudioOutputClusterOutputInfoStruct(val index: UInt, val outputType: UInt, private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AudioOutputClusterOutputInfoStruct { tlvReader.enterStructure(tlvTag) val index = tlvReader.getUInt(ContextSpecificTag(TAG_INDEX)) val outputType = tlvReader.getUInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() 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 c11fd4f93b3ed1..494c946f40b998 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BasicInformationClusterCapabilityMinimaStruct( - val caseSessionsPerFabric: UInt, - val subscriptionsPerFabric: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterCapabilityMinimaStruct ( + val caseSessionsPerFabric: UInt, + val subscriptionsPerFabric: UInt) { + override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") @@ -46,19 +49,14 @@ class BasicInformationClusterCapabilityMinimaStruct( private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterCapabilityMinimaStruct { tlvReader.enterStructure(tlvTag) - val caseSessionsPerFabric = - tlvReader.getUInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) - val subscriptionsPerFabric = - tlvReader.getUInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) - + val caseSessionsPerFabric = tlvReader.getUInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) + val subscriptionsPerFabric = tlvReader.getUInt(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 5a0eb3ace2ef7b..44f42edb6adf2d 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BasicInformationClusterProductAppearanceStruct(val finish: UInt, val primaryColor: UInt?) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterProductAppearanceStruct ( + val finish: UInt, + val primaryColor: UInt?) { + override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -35,10 +41,10 @@ class BasicInformationClusterProductAppearanceStruct(val finish: UInt, val prima startStructure(tlvTag) 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() } } @@ -47,17 +53,16 @@ class BasicInformationClusterProductAppearanceStruct(val finish: UInt, val prima private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tlvTag) val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 034a03295e0508..9454790cb7ac05 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,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BindingClusterTargetStruct( - val node: Optional, - val group: Optional, - val endpoint: Optional, - val cluster: Optional, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BindingClusterTargetStruct ( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") append("\tnode : $node\n") append("\tgroup : $group\n") @@ -44,21 +46,21 @@ class BindingClusterTargetStruct( tlvWriter.apply { startStructure(tlvTag) 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() } @@ -71,34 +73,30 @@ class BindingClusterTargetStruct( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BindingClusterTargetStruct { tlvReader.enterStructure(tlvTag) - val node = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - val group = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_GROUP))) - } else { - Optional.empty() - } - val endpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - val cluster = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER))) - } else { - Optional.empty() - } + val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getUInt(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 fcd1a6bd3c3a47..6f548b1a015b9c 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterProductAppearanceStruct( - val finish: UInt, - val primaryColor: UInt?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( + val finish: UInt, + val primaryColor: UInt?) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -38,10 +41,10 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( startStructure(tlvTag) 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() } } @@ -50,20 +53,16 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tlvTag) val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt index 082ea9c5debbbc..9fe7d172bf4551 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterAdditionalInfoStruct(val name: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterAdditionalInfoStruct ( + val name: String, + val value: String) { + override fun toString(): String = buildString { append("ChannelClusterAdditionalInfoStruct {\n") append("\tname : $name\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class ChannelClusterAdditionalInfoStruct(val name: String, val value: String) { private const val TAG_NAME = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterAdditionalInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterAdditionalInfoStruct { tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ChannelClusterAdditionalInfoStruct(name, value) 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 fb9b8af0bf57e6..a72550236ad007 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,24 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterChannelInfoStruct( - val majorNumber: UInt, - val minorNumber: UInt, - val name: Optional, - val callSign: Optional, - val affiliateCallSign: Optional, - val identifier: Optional, - val type: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterChannelInfoStruct ( + val majorNumber: UInt, + val minorNumber: UInt, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional, + val identifier: Optional, + val type: Optional) { + override fun toString(): String = buildString { append("ChannelClusterChannelInfoStruct {\n") append("\tmajorNumber : $majorNumber\n") append("\tminorNumber : $minorNumber\n") @@ -50,25 +52,25 @@ 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) + } if (identifier.isPresent) { - val optidentifier = identifier.get() - put(ContextSpecificTag(TAG_IDENTIFIER), optidentifier) - } + val optidentifier = identifier.get() + put(ContextSpecificTag(TAG_IDENTIFIER), optidentifier) + } if (type.isPresent) { - val opttype = type.get() - put(ContextSpecificTag(TAG_TYPE), opttype) - } + val opttype = type.get() + put(ContextSpecificTag(TAG_TYPE), opttype) + } endStructure() } } @@ -82,52 +84,39 @@ class ChannelClusterChannelInfoStruct( private const val TAG_IDENTIFIER = 5 private const val TAG_TYPE = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterChannelInfoStruct { tlvReader.enterStructure(tlvTag) val majorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) val minorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MINOR_NUMBER)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } 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 identifier = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_IDENTIFIER))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IDENTIFIER))) - } else { - Optional.empty() - } - val type = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TYPE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TYPE))) - } 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() + } + val identifier = if (tlvReader.isNextTag(ContextSpecificTag(TAG_IDENTIFIER))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IDENTIFIER))) + } else { + Optional.empty() + } + val type = if (tlvReader.isNextTag(ContextSpecificTag(TAG_TYPE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TYPE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ChannelClusterChannelInfoStruct( - majorNumber, - minorNumber, - name, - callSign, - affiliateCallSign, - identifier, - type, - ) + return ChannelClusterChannelInfoStruct(majorNumber, minorNumber, name, callSign, affiliateCallSign, identifier, type) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelPagingStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelPagingStruct.kt index 2a53d7190a86f7..936bdfd02a603b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelPagingStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelPagingStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterChannelPagingStruct( - val previousToken: Optional?, - val nextToken: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterChannelPagingStruct ( + val previousToken: Optional?, + val nextToken: Optional?) { + override fun toString(): String = buildString { append("ChannelClusterChannelPagingStruct {\n") append("\tpreviousToken : $previousToken\n") append("\tnextToken : $nextToken\n") @@ -38,21 +40,21 @@ class ChannelClusterChannelPagingStruct( tlvWriter.apply { startStructure(tlvTag) if (previousToken != null) { - if (previousToken.isPresent) { - val optpreviousToken = previousToken.get() - optpreviousToken.toTlv(ContextSpecificTag(TAG_PREVIOUS_TOKEN), this) - } - } else { - putNull(ContextSpecificTag(TAG_PREVIOUS_TOKEN)) - } + if (previousToken.isPresent) { + val optpreviousToken = previousToken.get() + optpreviousToken.toTlv(ContextSpecificTag(TAG_PREVIOUS_TOKEN), this) + } + } else { + putNull(ContextSpecificTag(TAG_PREVIOUS_TOKEN)) + } if (nextToken != null) { - if (nextToken.isPresent) { - val optnextToken = nextToken.get() - optnextToken.toTlv(ContextSpecificTag(TAG_NEXT_TOKEN), this) - } - } else { - putNull(ContextSpecificTag(TAG_NEXT_TOKEN)) - } + if (nextToken.isPresent) { + val optnextToken = nextToken.get() + optnextToken.toTlv(ContextSpecificTag(TAG_NEXT_TOKEN), this) + } + } else { + putNull(ContextSpecificTag(TAG_NEXT_TOKEN)) + } endStructure() } } @@ -61,38 +63,29 @@ class ChannelClusterChannelPagingStruct( private const val TAG_PREVIOUS_TOKEN = 0 private const val TAG_NEXT_TOKEN = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterChannelPagingStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterChannelPagingStruct { tlvReader.enterStructure(tlvTag) - val previousToken = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PREVIOUS_TOKEN))) { - Optional.of( - ChannelClusterPageTokenStruct.fromTlv( - ContextSpecificTag(TAG_PREVIOUS_TOKEN), - tlvReader, - ) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PREVIOUS_TOKEN)) - null - } - val nextToken = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NEXT_TOKEN))) { - Optional.of( - ChannelClusterPageTokenStruct.fromTlv(ContextSpecificTag(TAG_NEXT_TOKEN), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NEXT_TOKEN)) - null - } - + val previousToken = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PREVIOUS_TOKEN))) { + Optional.of(ChannelClusterPageTokenStruct.fromTlv(ContextSpecificTag(TAG_PREVIOUS_TOKEN), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PREVIOUS_TOKEN)) + null + } + val nextToken = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NEXT_TOKEN))) { + Optional.of(ChannelClusterPageTokenStruct.fromTlv(ContextSpecificTag(TAG_NEXT_TOKEN), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NEXT_TOKEN)) + null + } + tlvReader.exitContainer() return ChannelClusterChannelPagingStruct(previousToken, nextToken) 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 2640a4ad03afca..357509b7e3eb70 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,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterLineupInfoStruct( - val operatorName: String, - val lineupName: Optional, - val postalCode: Optional, - val lineupInfoType: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterLineupInfoStruct ( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: UInt) { + override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") append("\toperatorName : $operatorName\n") append("\tlineupName : $lineupName\n") @@ -43,13 +45,13 @@ class ChannelClusterLineupInfoStruct( startStructure(tlvTag) 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() } @@ -61,23 +63,21 @@ class ChannelClusterLineupInfoStruct( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterLineupInfoStruct { tlvReader.enterStructure(tlvTag) val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) - val lineupName = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) - } else { - Optional.empty() - } - val postalCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) - } else { - Optional.empty() - } + val lineupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } val lineupInfoType = tlvReader.getUInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) - + tlvReader.exitContainer() return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterPageTokenStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterPageTokenStruct.kt index 88140864fd409c..73639a9681a7b3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterPageTokenStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterPageTokenStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterPageTokenStruct( - val limit: Optional, - val after: Optional, - val before: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterPageTokenStruct ( + val limit: Optional, + val after: Optional, + val before: Optional) { + override fun toString(): String = buildString { append("ChannelClusterPageTokenStruct {\n") append("\tlimit : $limit\n") append("\tafter : $after\n") @@ -40,17 +42,17 @@ class ChannelClusterPageTokenStruct( tlvWriter.apply { startStructure(tlvTag) if (limit.isPresent) { - val optlimit = limit.get() - put(ContextSpecificTag(TAG_LIMIT), optlimit) - } + val optlimit = limit.get() + put(ContextSpecificTag(TAG_LIMIT), optlimit) + } if (after.isPresent) { - val optafter = after.get() - put(ContextSpecificTag(TAG_AFTER), optafter) - } + val optafter = after.get() + put(ContextSpecificTag(TAG_AFTER), optafter) + } if (before.isPresent) { - val optbefore = before.get() - put(ContextSpecificTag(TAG_BEFORE), optbefore) - } + val optbefore = before.get() + put(ContextSpecificTag(TAG_BEFORE), optbefore) + } endStructure() } } @@ -60,27 +62,24 @@ class ChannelClusterPageTokenStruct( private const val TAG_AFTER = 1 private const val TAG_BEFORE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterPageTokenStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterPageTokenStruct { tlvReader.enterStructure(tlvTag) - val limit = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LIMIT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_LIMIT))) - } else { - Optional.empty() - } - val after = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFTER))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFTER))) - } else { - Optional.empty() - } - val before = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_BEFORE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_BEFORE))) - } else { - Optional.empty() - } - + val limit = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LIMIT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_LIMIT))) + } else { + Optional.empty() + } + val after = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFTER))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFTER))) + } else { + Optional.empty() + } + val before = if (tlvReader.isNextTag(ContextSpecificTag(TAG_BEFORE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_BEFORE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ChannelClusterPageTokenStruct(limit, after, before) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCastStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCastStruct.kt index b11edabf62f0b0..5d03551b82d852 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCastStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCastStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterProgramCastStruct(val name: String, val role: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterProgramCastStruct ( + val name: String, + val role: String) { + override fun toString(): String = buildString { append("ChannelClusterProgramCastStruct {\n") append("\tname : $name\n") append("\trole : $role\n") @@ -43,11 +49,11 @@ class ChannelClusterProgramCastStruct(val name: String, val role: String) { private const val TAG_NAME = 0 private const val TAG_ROLE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterProgramCastStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterProgramCastStruct { tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val role = tlvReader.getString(ContextSpecificTag(TAG_ROLE)) - + tlvReader.exitContainer() return ChannelClusterProgramCastStruct(name, role) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt index d22742f8be42c5..66800400ce15bb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramCategoryStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterProgramCategoryStruct(val category: String, val subCategory: Optional) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterProgramCategoryStruct ( + val category: String, + val subCategory: Optional) { + override fun toString(): String = buildString { append("ChannelClusterProgramCategoryStruct {\n") append("\tcategory : $category\n") append("\tsubCategory : $subCategory\n") @@ -36,9 +41,9 @@ class ChannelClusterProgramCategoryStruct(val category: String, val subCategory: startStructure(tlvTag) put(ContextSpecificTag(TAG_CATEGORY), category) if (subCategory.isPresent) { - val optsubCategory = subCategory.get() - put(ContextSpecificTag(TAG_SUB_CATEGORY), optsubCategory) - } + val optsubCategory = subCategory.get() + put(ContextSpecificTag(TAG_SUB_CATEGORY), optsubCategory) + } endStructure() } } @@ -47,16 +52,15 @@ class ChannelClusterProgramCategoryStruct(val category: String, val subCategory: private const val TAG_CATEGORY = 0 private const val TAG_SUB_CATEGORY = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterProgramCategoryStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterProgramCategoryStruct { tlvReader.enterStructure(tlvTag) val category = tlvReader.getString(ContextSpecificTag(TAG_CATEGORY)) - val subCategory = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SUB_CATEGORY))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_SUB_CATEGORY))) - } else { - Optional.empty() - } - + val subCategory = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SUB_CATEGORY))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_SUB_CATEGORY))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ChannelClusterProgramCategoryStruct(category, subCategory) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt index e7e00d9518aa83..82c4ab33b445ed 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterProgramStruct.kt @@ -17,35 +17,36 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterProgramStruct( - val identifier: String, - val channel: ChannelClusterChannelInfoStruct, - val startTime: ULong, - val endTime: ULong, - val title: String, - val subtitle: Optional, - val description: Optional, - val audioLanguages: Optional>, - val ratings: Optional>, - val thumbnailUrl: Optional, - val posterArtUrl: Optional, - val dvbiUrl: Optional, - val releaseDate: Optional, - val parentalGuidanceText: Optional, - val recordingFlag: Optional, - val seriesInfo: Optional?, - val categoryList: Optional>, - val castList: Optional>, - val externalIDList: Optional>, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterProgramStruct ( + val identifier: String, + val channel: ChannelClusterChannelInfoStruct, + val startTime: ULong, + val endTime: ULong, + val title: String, + val subtitle: Optional, + val description: Optional, + val audioLanguages: Optional>, + val ratings: Optional>, + val thumbnailUrl: Optional, + val posterArtUrl: Optional, + val dvbiUrl: Optional, + val releaseDate: Optional, + val parentalGuidanceText: Optional, + val recordingFlag: Optional, + val seriesInfo: Optional?, + val categoryList: Optional>, + val castList: Optional>, + val externalIDList: Optional>) { + override fun toString(): String = buildString { append("ChannelClusterProgramStruct {\n") append("\tidentifier : $identifier\n") append("\tchannel : $channel\n") @@ -78,85 +79,85 @@ class ChannelClusterProgramStruct( put(ContextSpecificTag(TAG_END_TIME), endTime) put(ContextSpecificTag(TAG_TITLE), title) if (subtitle.isPresent) { - val optsubtitle = subtitle.get() - put(ContextSpecificTag(TAG_SUBTITLE), optsubtitle) - } + val optsubtitle = subtitle.get() + put(ContextSpecificTag(TAG_SUBTITLE), optsubtitle) + } if (description.isPresent) { - val optdescription = description.get() - put(ContextSpecificTag(TAG_DESCRIPTION), optdescription) - } + val optdescription = description.get() + put(ContextSpecificTag(TAG_DESCRIPTION), optdescription) + } if (audioLanguages.isPresent) { - val optaudioLanguages = audioLanguages.get() - startArray(ContextSpecificTag(TAG_AUDIO_LANGUAGES)) - for (item in optaudioLanguages.iterator()) { - put(AnonymousTag, item) - } - endArray() + val optaudioLanguages = audioLanguages.get() + startArray(ContextSpecificTag(TAG_AUDIO_LANGUAGES)) + for (item in optaudioLanguages.iterator()) { + put(AnonymousTag, item) } + endArray() + } if (ratings.isPresent) { - val optratings = ratings.get() - startArray(ContextSpecificTag(TAG_RATINGS)) - for (item in optratings.iterator()) { - put(AnonymousTag, item) - } - endArray() + val optratings = ratings.get() + startArray(ContextSpecificTag(TAG_RATINGS)) + for (item in optratings.iterator()) { + put(AnonymousTag, item) } + endArray() + } if (thumbnailUrl.isPresent) { - val optthumbnailUrl = thumbnailUrl.get() - put(ContextSpecificTag(TAG_THUMBNAIL_URL), optthumbnailUrl) - } + val optthumbnailUrl = thumbnailUrl.get() + put(ContextSpecificTag(TAG_THUMBNAIL_URL), optthumbnailUrl) + } if (posterArtUrl.isPresent) { - val optposterArtUrl = posterArtUrl.get() - put(ContextSpecificTag(TAG_POSTER_ART_URL), optposterArtUrl) - } + val optposterArtUrl = posterArtUrl.get() + put(ContextSpecificTag(TAG_POSTER_ART_URL), optposterArtUrl) + } if (dvbiUrl.isPresent) { - val optdvbiUrl = dvbiUrl.get() - put(ContextSpecificTag(TAG_DVBI_URL), optdvbiUrl) - } + val optdvbiUrl = dvbiUrl.get() + put(ContextSpecificTag(TAG_DVBI_URL), optdvbiUrl) + } if (releaseDate.isPresent) { - val optreleaseDate = releaseDate.get() - put(ContextSpecificTag(TAG_RELEASE_DATE), optreleaseDate) - } + val optreleaseDate = releaseDate.get() + put(ContextSpecificTag(TAG_RELEASE_DATE), optreleaseDate) + } if (parentalGuidanceText.isPresent) { - val optparentalGuidanceText = parentalGuidanceText.get() - put(ContextSpecificTag(TAG_PARENTAL_GUIDANCE_TEXT), optparentalGuidanceText) - } + val optparentalGuidanceText = parentalGuidanceText.get() + put(ContextSpecificTag(TAG_PARENTAL_GUIDANCE_TEXT), optparentalGuidanceText) + } if (recordingFlag.isPresent) { - val optrecordingFlag = recordingFlag.get() - put(ContextSpecificTag(TAG_RECORDING_FLAG), optrecordingFlag) - } + val optrecordingFlag = recordingFlag.get() + put(ContextSpecificTag(TAG_RECORDING_FLAG), optrecordingFlag) + } if (seriesInfo != null) { - if (seriesInfo.isPresent) { - val optseriesInfo = seriesInfo.get() - optseriesInfo.toTlv(ContextSpecificTag(TAG_SERIES_INFO), this) - } - } else { - putNull(ContextSpecificTag(TAG_SERIES_INFO)) - } + if (seriesInfo.isPresent) { + val optseriesInfo = seriesInfo.get() + optseriesInfo.toTlv(ContextSpecificTag(TAG_SERIES_INFO), this) + } + } else { + putNull(ContextSpecificTag(TAG_SERIES_INFO)) + } if (categoryList.isPresent) { - val optcategoryList = categoryList.get() - startArray(ContextSpecificTag(TAG_CATEGORY_LIST)) - for (item in optcategoryList.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optcategoryList = categoryList.get() + startArray(ContextSpecificTag(TAG_CATEGORY_LIST)) + for (item in optcategoryList.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } if (castList.isPresent) { - val optcastList = castList.get() - startArray(ContextSpecificTag(TAG_CAST_LIST)) - for (item in optcastList.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optcastList = castList.get() + startArray(ContextSpecificTag(TAG_CAST_LIST)) + for (item in optcastList.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optexternalIDList = externalIDList.get() + startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } endStructure() } } @@ -182,169 +183,122 @@ class ChannelClusterProgramStruct( private const val TAG_CAST_LIST = 17 private const val TAG_EXTERNAL_I_D_LIST = 18 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterProgramStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterProgramStruct { tlvReader.enterStructure(tlvTag) val identifier = tlvReader.getString(ContextSpecificTag(TAG_IDENTIFIER)) - val channel = - ChannelClusterChannelInfoStruct.fromTlv(ContextSpecificTag(TAG_CHANNEL), tlvReader) + val channel = ChannelClusterChannelInfoStruct.fromTlv(ContextSpecificTag(TAG_CHANNEL), tlvReader) val startTime = tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) val endTime = tlvReader.getULong(ContextSpecificTag(TAG_END_TIME)) val title = tlvReader.getString(ContextSpecificTag(TAG_TITLE)) - val subtitle = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SUBTITLE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_SUBTITLE))) - } else { - Optional.empty() - } - val description = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_DESCRIPTION))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION))) - } else { - Optional.empty() - } - val audioLanguages = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_LANGUAGES))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_LANGUAGES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getString(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val ratings = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_RATINGS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_RATINGS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getString(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val thumbnailUrl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_THUMBNAIL_URL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_THUMBNAIL_URL))) - } else { - Optional.empty() - } - val posterArtUrl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTER_ART_URL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTER_ART_URL))) - } else { - Optional.empty() - } - val dvbiUrl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_DVBI_URL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DVBI_URL))) - } else { - Optional.empty() - } - val releaseDate = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_RELEASE_DATE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_RELEASE_DATE))) - } else { - Optional.empty() - } - val parentalGuidanceText = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PARENTAL_GUIDANCE_TEXT))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_PARENTAL_GUIDANCE_TEXT))) - } else { - Optional.empty() - } - val recordingFlag = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_RECORDING_FLAG))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_RECORDING_FLAG))) - } else { - Optional.empty() - } - val seriesInfo = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SERIES_INFO))) { - Optional.of( - ChannelClusterSeriesInfoStruct.fromTlv(ContextSpecificTag(TAG_SERIES_INFO), tlvReader) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SERIES_INFO)) - null - } - val categoryList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CATEGORY_LIST))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CATEGORY_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ChannelClusterProgramCategoryStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val castList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CAST_LIST))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CAST_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ChannelClusterProgramCastStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val externalIDList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ChannelClusterProgramCastStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - + val subtitle = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SUBTITLE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_SUBTITLE))) + } else { + Optional.empty() + } + val description = if (tlvReader.isNextTag(ContextSpecificTag(TAG_DESCRIPTION))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION))) + } else { + Optional.empty() + } + val audioLanguages = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_LANGUAGES))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_LANGUAGES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getString(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val ratings = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RATINGS))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_RATINGS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getString(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val thumbnailUrl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_THUMBNAIL_URL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_THUMBNAIL_URL))) + } else { + Optional.empty() + } + val posterArtUrl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTER_ART_URL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTER_ART_URL))) + } else { + Optional.empty() + } + val dvbiUrl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_DVBI_URL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DVBI_URL))) + } else { + Optional.empty() + } + val releaseDate = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RELEASE_DATE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_RELEASE_DATE))) + } else { + Optional.empty() + } + val parentalGuidanceText = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PARENTAL_GUIDANCE_TEXT))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_PARENTAL_GUIDANCE_TEXT))) + } else { + Optional.empty() + } + val recordingFlag = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RECORDING_FLAG))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_RECORDING_FLAG))) + } else { + Optional.empty() + } + val seriesInfo = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SERIES_INFO))) { + Optional.of(ChannelClusterSeriesInfoStruct.fromTlv(ContextSpecificTag(TAG_SERIES_INFO), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SERIES_INFO)) + null + } + val categoryList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CATEGORY_LIST))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CATEGORY_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ChannelClusterProgramCategoryStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val castList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CAST_LIST))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CAST_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ChannelClusterProgramCastStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ChannelClusterProgramCastStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ChannelClusterProgramStruct( - identifier, - channel, - startTime, - endTime, - title, - subtitle, - description, - audioLanguages, - ratings, - thumbnailUrl, - posterArtUrl, - dvbiUrl, - releaseDate, - parentalGuidanceText, - recordingFlag, - seriesInfo, - categoryList, - castList, - externalIDList, - ) + return ChannelClusterProgramStruct(identifier, channel, startTime, endTime, title, subtitle, description, audioLanguages, ratings, thumbnailUrl, posterArtUrl, dvbiUrl, releaseDate, parentalGuidanceText, recordingFlag, seriesInfo, categoryList, castList, externalIDList) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt index eb06e3fe6dac2a..93e49be4ae9eb0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterSeriesInfoStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ChannelClusterSeriesInfoStruct(val season: String, val episode: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class ChannelClusterSeriesInfoStruct ( + val season: String, + val episode: String) { + override fun toString(): String = buildString { append("ChannelClusterSeriesInfoStruct {\n") append("\tseason : $season\n") append("\tepisode : $episode\n") @@ -43,11 +49,11 @@ class ChannelClusterSeriesInfoStruct(val season: String, val episode: String) { private const val TAG_SEASON = 0 private const val TAG_EPISODE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterSeriesInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterSeriesInfoStruct { tlvReader.enterStructure(tlvTag) val season = tlvReader.getString(ContextSpecificTag(TAG_SEASON)) val episode = tlvReader.getString(ContextSpecificTag(TAG_EPISODE)) - + tlvReader.exitContainer() return ChannelClusterSeriesInfoStruct(season, episode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt index 1f284a8ec7c6a3..c1aab30b53c51f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentControlClusterRatingNameStruct( - val ratingName: String, - val ratingNameDesc: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentControlClusterRatingNameStruct ( + val ratingName: String, + val ratingNameDesc: Optional) { + override fun toString(): String = buildString { append("ContentControlClusterRatingNameStruct {\n") append("\tratingName : $ratingName\n") append("\tratingNameDesc : $ratingNameDesc\n") @@ -39,9 +41,9 @@ class ContentControlClusterRatingNameStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_RATING_NAME), ratingName) if (ratingNameDesc.isPresent) { - val optratingNameDesc = ratingNameDesc.get() - put(ContextSpecificTag(TAG_RATING_NAME_DESC), optratingNameDesc) - } + val optratingNameDesc = ratingNameDesc.get() + put(ContextSpecificTag(TAG_RATING_NAME_DESC), optratingNameDesc) + } endStructure() } } @@ -50,16 +52,15 @@ class ContentControlClusterRatingNameStruct( private const val TAG_RATING_NAME = 0 private const val TAG_RATING_NAME_DESC = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentControlClusterRatingNameStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentControlClusterRatingNameStruct { tlvReader.enterStructure(tlvTag) val ratingName = tlvReader.getString(ContextSpecificTag(TAG_RATING_NAME)) - val ratingNameDesc = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_RATING_NAME_DESC))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_RATING_NAME_DESC))) - } else { - Optional.empty() - } - + val ratingNameDesc = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RATING_NAME_DESC))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_RATING_NAME_DESC))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentControlClusterRatingNameStruct(ratingName, ratingNameDesc) 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 c9df652a2ca5a8..cdc41e36467d57 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterAdditionalInfoStruct ( + val name: String, + val value: String) { + override fun toString(): String = buildString { append("ContentLauncherClusterAdditionalInfoStruct {\n") append("\tname : $name\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: St private const val TAG_NAME = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterAdditionalInfoStruct { tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ContentLauncherClusterAdditionalInfoStruct(name, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 591631869d43f8..56028fc4d11e93 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,21 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterBrandingInformationStruct( - val providerName: String, - val background: Optional, - val logo: Optional, - val progressBar: Optional, - val splash: Optional, - val waterMark: Optional, -) { - override fun toString(): String = buildString { +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 { append("ContentLauncherClusterBrandingInformationStruct {\n") append("\tproviderName : $providerName\n") append("\tbackground : $background\n") @@ -47,25 +49,25 @@ class ContentLauncherClusterBrandingInformationStruct( startStructure(tlvTag) 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() } } @@ -78,78 +80,38 @@ class ContentLauncherClusterBrandingInformationStruct( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ContentLauncherClusterBrandingInformationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterBrandingInformationStruct { tlvReader.enterStructure(tlvTag) val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) - val background = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_BACKGROUND), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val logo = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_LOGO), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val progressBar = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_PROGRESS_BAR), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val splash = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_SPLASH), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val waterMark = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_WATER_MARK), - tlvReader, - ) - ) - } else { - Optional.empty() - } - + 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 fc1cfc5de7b014..9f100e058c4305 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,13 +20,15 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterContentSearchStruct( - val parameterList: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterContentSearchStruct ( + val parameterList: List) { + override fun toString(): String = buildString { append("ContentLauncherClusterContentSearchStruct {\n") append("\tparameterList : $parameterList\n") append("}\n") @@ -47,17 +49,16 @@ class ContentLauncherClusterContentSearchStruct( companion object { private const val TAG_PARAMETER_LIST = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterContentSearchStruct { tlvReader.enterStructure(tlvTag) - val parameterList = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PARAMETER_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val parameterList = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PARAMETER_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ContentLauncherClusterContentSearchStruct(parameterList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index c217500f0a8df1..8c6fd83e614072 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterDimensionStruct( - val width: Double, - val height: Double, - val metric: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterDimensionStruct ( + val width: Double, + val height: Double, + val metric: UInt) { + override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") append("\twidth : $width\n") append("\theight : $height\n") @@ -50,12 +53,12 @@ class ContentLauncherClusterDimensionStruct( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterDimensionStruct { tlvReader.enterStructure(tlvTag) val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) val metric = tlvReader.getUInt(ContextSpecificTag(TAG_METRIC)) - + tlvReader.exitContainer() return ContentLauncherClusterDimensionStruct(width, height, metric) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt index 96e28a1c12b28f..0a547a665e8609 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 @@ -17,19 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterParameterStruct( - val type: UInt, - val value: String, - val externalIDList: Optional>, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterParameterStruct ( + val type: UInt, + val value: String, + val externalIDList: Optional>) { + override fun toString(): String = buildString { append("ContentLauncherClusterParameterStruct {\n") append("\ttype : $type\n") append("\tvalue : $value\n") @@ -43,13 +44,13 @@ class ContentLauncherClusterParameterStruct( put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optexternalIDList = externalIDList.get() + startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } endStructure() } } @@ -59,25 +60,22 @@ class ContentLauncherClusterParameterStruct( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterParameterStruct { tlvReader.enterStructure(tlvTag) val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - val externalIDList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - + val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterParameterStruct(type, value, externalIDList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt index c3c195fac2b0d2..6ca30cceaac011 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterPlaybackPreferencesStruct.kt @@ -17,19 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterPlaybackPreferencesStruct( - val playbackPosition: ULong, - val textTrack: ContentLauncherClusterTrackPreferenceStruct, - val audioTracks: Optional>, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterPlaybackPreferencesStruct ( + val playbackPosition: ULong, + val textTrack: ContentLauncherClusterTrackPreferenceStruct, + val audioTracks: Optional>) { + override fun toString(): String = buildString { append("ContentLauncherClusterPlaybackPreferencesStruct {\n") append("\tplaybackPosition : $playbackPosition\n") append("\ttextTrack : $textTrack\n") @@ -43,13 +44,13 @@ class ContentLauncherClusterPlaybackPreferencesStruct( put(ContextSpecificTag(TAG_PLAYBACK_POSITION), playbackPosition) textTrack.toTlv(ContextSpecificTag(TAG_TEXT_TRACK), this) if (audioTracks.isPresent) { - val optaudioTracks = audioTracks.get() - startArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) - for (item in optaudioTracks.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optaudioTracks = audioTracks.get() + startArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) + for (item in optaudioTracks.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } endStructure() } } @@ -59,39 +60,25 @@ class ContentLauncherClusterPlaybackPreferencesStruct( private const val TAG_TEXT_TRACK = 1 private const val TAG_AUDIO_TRACKS = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ContentLauncherClusterPlaybackPreferencesStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterPlaybackPreferencesStruct { tlvReader.enterStructure(tlvTag) val playbackPosition = tlvReader.getULong(ContextSpecificTag(TAG_PLAYBACK_POSITION)) - val textTrack = - ContentLauncherClusterTrackPreferenceStruct.fromTlv( - ContextSpecificTag(TAG_TEXT_TRACK), - tlvReader, - ) - val audioTracks = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_TRACKS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterTrackPreferenceStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - + val textTrack = ContentLauncherClusterTrackPreferenceStruct.fromTlv(ContextSpecificTag(TAG_TEXT_TRACK), tlvReader) + val audioTracks = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_TRACKS))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_AUDIO_TRACKS)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterTrackPreferenceStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ContentLauncherClusterPlaybackPreferencesStruct( - playbackPosition, - textTrack, - audioTracks, - ) + return ContentLauncherClusterPlaybackPreferencesStruct(playbackPosition, textTrack, audioTracks) } } } 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 9c9da395d51915..c5de0e5706eaea 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,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterStyleInformationStruct( - val imageURL: Optional, - val color: Optional, - val size: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +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") @@ -40,17 +42,17 @@ class ContentLauncherClusterStyleInformationStruct( tlvWriter.apply { startStructure(tlvTag) 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() } } @@ -60,29 +62,24 @@ class ContentLauncherClusterStyleInformationStruct( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterStyleInformationStruct { tlvReader.enterStructure(tlvTag) - val imageURL = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) - } else { - Optional.empty() - } - val color = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) - } else { - Optional.empty() - } - val size = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { - Optional.of( - ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) - ) - } else { - Optional.empty() - } - + 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/ContentLauncherClusterTrackPreferenceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt index 53e677fb7a9ed4..a1f60ee83fe421 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterTrackPreferenceStruct.kt @@ -17,19 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ContentLauncherClusterTrackPreferenceStruct( - val languageCode: String, - val characteristics: Optional>, - val audioOutputIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterTrackPreferenceStruct ( + val languageCode: String, + val characteristics: Optional>, + val audioOutputIndex: UInt) { + override fun toString(): String = buildString { append("ContentLauncherClusterTrackPreferenceStruct {\n") append("\tlanguageCode : $languageCode\n") append("\tcharacteristics : $characteristics\n") @@ -42,13 +43,13 @@ class ContentLauncherClusterTrackPreferenceStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_LANGUAGE_CODE), languageCode) if (characteristics.isPresent) { - val optcharacteristics = characteristics.get() - startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) - for (item in optcharacteristics.iterator()) { - put(AnonymousTag, item) - } - endArray() + val optcharacteristics = characteristics.get() + startArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + for (item in optcharacteristics.iterator()) { + put(AnonymousTag, item) } + endArray() + } put(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX), audioOutputIndex) endStructure() } @@ -59,32 +60,25 @@ class ContentLauncherClusterTrackPreferenceStruct( private const val TAG_CHARACTERISTICS = 1 private const val TAG_AUDIO_OUTPUT_INDEX = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterTrackPreferenceStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterTrackPreferenceStruct { tlvReader.enterStructure(tlvTag) val languageCode = tlvReader.getString(ContextSpecificTag(TAG_LANGUAGE_CODE)) - val characteristics = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } + val characteristics = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHARACTERISTICS))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARACTERISTICS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } val audioOutputIndex = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_OUTPUT_INDEX)) - + tlvReader.exitContainer() - return ContentLauncherClusterTrackPreferenceStruct( - languageCode, - characteristics, - audioOutputIndex, - ) + return ContentLauncherClusterTrackPreferenceStruct(languageCode, characteristics, audioOutputIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt index 6aa72b29be015e..4357cf625ca244 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterAverageLoadControlStruct.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterAverageLoadControlStruct(val loadAdjustment: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterAverageLoadControlStruct ( + val loadAdjustment: Int) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterAverageLoadControlStruct {\n") append("\tloadAdjustment : $loadAdjustment\n") append("}\n") @@ -40,13 +45,10 @@ class DemandResponseLoadControlClusterAverageLoadControlStruct(val loadAdjustmen companion object { private const val TAG_LOAD_ADJUSTMENT = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterAverageLoadControlStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterAverageLoadControlStruct { tlvReader.enterStructure(tlvTag) val loadAdjustment = tlvReader.getInt(ContextSpecificTag(TAG_LOAD_ADJUSTMENT)) - + tlvReader.exitContainer() return DemandResponseLoadControlClusterAverageLoadControlStruct(loadAdjustment) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt index 26951bd633b78d..ce5980bf12eab7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterDutyCycleControlStruct.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterDutyCycleControlStruct(val dutyCycle: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterDutyCycleControlStruct ( + val dutyCycle: UInt) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterDutyCycleControlStruct {\n") append("\tdutyCycle : $dutyCycle\n") append("}\n") @@ -40,13 +45,10 @@ class DemandResponseLoadControlClusterDutyCycleControlStruct(val dutyCycle: UInt companion object { private const val TAG_DUTY_CYCLE = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterDutyCycleControlStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterDutyCycleControlStruct { tlvReader.enterStructure(tlvTag) val dutyCycle = tlvReader.getUInt(ContextSpecificTag(TAG_DUTY_CYCLE)) - + tlvReader.exitContainer() return DemandResponseLoadControlClusterDutyCycleControlStruct(dutyCycle) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt index 32be1c7db8ab8d..c957612bd8942e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterHeatingSourceControlStruct.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterHeatingSourceControlStruct(val heatingSource: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterHeatingSourceControlStruct ( + val heatingSource: UInt) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterHeatingSourceControlStruct {\n") append("\theatingSource : $heatingSource\n") append("}\n") @@ -40,13 +45,10 @@ class DemandResponseLoadControlClusterHeatingSourceControlStruct(val heatingSour companion object { private const val TAG_HEATING_SOURCE = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterHeatingSourceControlStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterHeatingSourceControlStruct { tlvReader.enterStructure(tlvTag) val heatingSource = tlvReader.getUInt(ContextSpecificTag(TAG_HEATING_SOURCE)) - + tlvReader.exitContainer() return DemandResponseLoadControlClusterHeatingSourceControlStruct(heatingSource) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt index 91a2071e0b3474..150b4bc952bad3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventStruct.kt @@ -17,24 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterLoadControlEventStruct( - val eventID: ByteArray, - val programID: ByteArray?, - val control: UInt, - val deviceClass: ULong, - val enrollmentGroup: Optional, - val criticality: UInt, - val startTime: ULong?, - val transitions: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterLoadControlEventStruct ( + val eventID: ByteArray, + val programID: ByteArray?, + val control: UInt, + val deviceClass: ULong, + val enrollmentGroup: Optional, + val criticality: UInt, + val startTime: ULong?, + val transitions: List) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterLoadControlEventStruct {\n") append("\teventID : $eventID\n") append("\tprogramID : $programID\n") @@ -52,22 +53,22 @@ class DemandResponseLoadControlClusterLoadControlEventStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_EVENT_I_D), eventID) if (programID != null) { - put(ContextSpecificTag(TAG_PROGRAM_I_D), programID) - } else { - putNull(ContextSpecificTag(TAG_PROGRAM_I_D)) - } + put(ContextSpecificTag(TAG_PROGRAM_I_D), programID) + } else { + putNull(ContextSpecificTag(TAG_PROGRAM_I_D)) + } put(ContextSpecificTag(TAG_CONTROL), control) put(ContextSpecificTag(TAG_DEVICE_CLASS), deviceClass) if (enrollmentGroup.isPresent) { - val optenrollmentGroup = enrollmentGroup.get() - put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), optenrollmentGroup) - } + val optenrollmentGroup = enrollmentGroup.get() + put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), optenrollmentGroup) + } put(ContextSpecificTag(TAG_CRITICALITY), criticality) if (startTime != null) { - put(ContextSpecificTag(TAG_START_TIME), startTime) - } else { - putNull(ContextSpecificTag(TAG_START_TIME)) - } + put(ContextSpecificTag(TAG_START_TIME), startTime) + } else { + putNull(ContextSpecificTag(TAG_START_TIME)) + } startArray(ContextSpecificTag(TAG_TRANSITIONS)) for (item in transitions.iterator()) { item.toTlv(AnonymousTag, this) @@ -87,61 +88,40 @@ class DemandResponseLoadControlClusterLoadControlEventStruct( private const val TAG_START_TIME = 6 private const val TAG_TRANSITIONS = 7 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterLoadControlEventStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterLoadControlEventStruct { tlvReader.enterStructure(tlvTag) val eventID = tlvReader.getByteArray(ContextSpecificTag(TAG_EVENT_I_D)) - val programID = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PROGRAM_I_D)) - null - } + val programID = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRAM_I_D)) + null + } val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL)) val deviceClass = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_CLASS)) - val enrollmentGroup = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENROLLMENT_GROUP))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP))) - } else { - Optional.empty() - } + val enrollmentGroup = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENROLLMENT_GROUP))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP))) + } else { + Optional.empty() + } val criticality = tlvReader.getUInt(ContextSpecificTag(TAG_CRITICALITY)) - val startTime = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_START_TIME)) - null - } - val transitions = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS)) - while (!tlvReader.isEndOfContainer()) { - add( - DemandResponseLoadControlClusterLoadControlEventTransitionStruct.fromTlv( - AnonymousTag, - tlvReader, - ) - ) - } - tlvReader.exitContainer() - } - + val startTime = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_START_TIME)) + null + } + val transitions = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS)) + while(!tlvReader.isEndOfContainer()) { + add(DemandResponseLoadControlClusterLoadControlEventTransitionStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return DemandResponseLoadControlClusterLoadControlEventStruct( - eventID, - programID, - control, - deviceClass, - enrollmentGroup, - criticality, - startTime, - transitions, - ) + return DemandResponseLoadControlClusterLoadControlEventStruct(eventID, programID, control, deviceClass, enrollmentGroup, criticality, startTime, transitions) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt index 6bf70e4fc6c080..c1643805f9a6bf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlEventTransitionStruct.kt @@ -17,22 +17,24 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterLoadControlEventTransitionStruct( - val duration: UInt, - val control: UInt, - val temperatureControl: Optional, - val averageLoadControl: Optional, - val dutyCycleControl: Optional, - val powerSavingsControl: Optional, - val heatingSourceControl: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterLoadControlEventTransitionStruct ( + val duration: UInt, + val control: UInt, + val temperatureControl: Optional, + val averageLoadControl: Optional, + val dutyCycleControl: Optional, + val powerSavingsControl: Optional, + val heatingSourceControl: Optional) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterLoadControlEventTransitionStruct {\n") append("\tduration : $duration\n") append("\tcontrol : $control\n") @@ -50,25 +52,25 @@ class DemandResponseLoadControlClusterLoadControlEventTransitionStruct( put(ContextSpecificTag(TAG_DURATION), duration) put(ContextSpecificTag(TAG_CONTROL), control) if (temperatureControl.isPresent) { - val opttemperatureControl = temperatureControl.get() - opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this) - } + val opttemperatureControl = temperatureControl.get() + opttemperatureControl.toTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), this) + } if (averageLoadControl.isPresent) { - val optaverageLoadControl = averageLoadControl.get() - optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this) - } + val optaverageLoadControl = averageLoadControl.get() + optaverageLoadControl.toTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), this) + } if (dutyCycleControl.isPresent) { - val optdutyCycleControl = dutyCycleControl.get() - optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this) - } + val optdutyCycleControl = dutyCycleControl.get() + optdutyCycleControl.toTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), this) + } if (powerSavingsControl.isPresent) { - val optpowerSavingsControl = powerSavingsControl.get() - optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this) - } + val optpowerSavingsControl = powerSavingsControl.get() + optpowerSavingsControl.toTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), this) + } if (heatingSourceControl.isPresent) { - val optheatingSourceControl = heatingSourceControl.get() - optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this) - } + val optheatingSourceControl = heatingSourceControl.get() + optheatingSourceControl.toTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), this) + } endStructure() } } @@ -82,80 +84,39 @@ class DemandResponseLoadControlClusterLoadControlEventTransitionStruct( private const val TAG_POWER_SAVINGS_CONTROL = 5 private const val TAG_HEATING_SOURCE_CONTROL = 6 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterLoadControlEventTransitionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterLoadControlEventTransitionStruct { tlvReader.enterStructure(tlvTag) val duration = tlvReader.getUInt(ContextSpecificTag(TAG_DURATION)) val control = tlvReader.getUInt(ContextSpecificTag(TAG_CONTROL)) - val temperatureControl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) { - Optional.of( - DemandResponseLoadControlClusterTemperatureControlStruct.fromTlv( - ContextSpecificTag(TAG_TEMPERATURE_CONTROL), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val averageLoadControl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) { - Optional.of( - DemandResponseLoadControlClusterAverageLoadControlStruct.fromTlv( - ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val dutyCycleControl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) { - Optional.of( - DemandResponseLoadControlClusterDutyCycleControlStruct.fromTlv( - ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val powerSavingsControl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) { - Optional.of( - DemandResponseLoadControlClusterPowerSavingsControlStruct.fromTlv( - ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val heatingSourceControl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) { - Optional.of( - DemandResponseLoadControlClusterHeatingSourceControlStruct.fromTlv( - ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), - tlvReader, - ) - ) - } else { - Optional.empty() - } - + val temperatureControl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_TEMPERATURE_CONTROL))) { + Optional.of(DemandResponseLoadControlClusterTemperatureControlStruct.fromTlv(ContextSpecificTag(TAG_TEMPERATURE_CONTROL), tlvReader)) + } else { + Optional.empty() + } + val averageLoadControl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL))) { + Optional.of(DemandResponseLoadControlClusterAverageLoadControlStruct.fromTlv(ContextSpecificTag(TAG_AVERAGE_LOAD_CONTROL), tlvReader)) + } else { + Optional.empty() + } + val dutyCycleControl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL))) { + Optional.of(DemandResponseLoadControlClusterDutyCycleControlStruct.fromTlv(ContextSpecificTag(TAG_DUTY_CYCLE_CONTROL), tlvReader)) + } else { + Optional.empty() + } + val powerSavingsControl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL))) { + Optional.of(DemandResponseLoadControlClusterPowerSavingsControlStruct.fromTlv(ContextSpecificTag(TAG_POWER_SAVINGS_CONTROL), tlvReader)) + } else { + Optional.empty() + } + val heatingSourceControl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL))) { + Optional.of(DemandResponseLoadControlClusterHeatingSourceControlStruct.fromTlv(ContextSpecificTag(TAG_HEATING_SOURCE_CONTROL), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return DemandResponseLoadControlClusterLoadControlEventTransitionStruct( - duration, - control, - temperatureControl, - averageLoadControl, - dutyCycleControl, - powerSavingsControl, - heatingSourceControl, - ) + return DemandResponseLoadControlClusterLoadControlEventTransitionStruct(duration, control, temperatureControl, averageLoadControl, dutyCycleControl, powerSavingsControl, heatingSourceControl) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt index 3a71f11aedee40..70787ef931f659 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterLoadControlProgramStruct.kt @@ -17,19 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterLoadControlProgramStruct( - val programID: ByteArray, - val name: String, - val enrollmentGroup: UInt?, - val randomStartMinutes: UInt?, - val randomDurationMinutes: UInt?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterLoadControlProgramStruct ( + val programID: ByteArray, + val name: String, + val enrollmentGroup: UInt?, + val randomStartMinutes: UInt?, + val randomDurationMinutes: UInt?) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterLoadControlProgramStruct {\n") append("\tprogramID : $programID\n") append("\tname : $name\n") @@ -45,20 +48,20 @@ class DemandResponseLoadControlClusterLoadControlProgramStruct( put(ContextSpecificTag(TAG_PROGRAM_I_D), programID) put(ContextSpecificTag(TAG_NAME), name) if (enrollmentGroup != null) { - put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), enrollmentGroup) - } else { - putNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP)) - } + put(ContextSpecificTag(TAG_ENROLLMENT_GROUP), enrollmentGroup) + } else { + putNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP)) + } if (randomStartMinutes != null) { - put(ContextSpecificTag(TAG_RANDOM_START_MINUTES), randomStartMinutes) - } else { - putNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES)) - } + put(ContextSpecificTag(TAG_RANDOM_START_MINUTES), randomStartMinutes) + } else { + putNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES)) + } if (randomDurationMinutes != null) { - put(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES), randomDurationMinutes) - } else { - putNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES)) - } + put(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES), randomDurationMinutes) + } else { + putNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES)) + } endStructure() } } @@ -70,44 +73,32 @@ class DemandResponseLoadControlClusterLoadControlProgramStruct( private const val TAG_RANDOM_START_MINUTES = 3 private const val TAG_RANDOM_DURATION_MINUTES = 4 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterLoadControlProgramStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterLoadControlProgramStruct { tlvReader.enterStructure(tlvTag) val programID = tlvReader.getByteArray(ContextSpecificTag(TAG_PROGRAM_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - val enrollmentGroup = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP)) - null - } - val randomStartMinutes = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_RANDOM_START_MINUTES)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES)) - null - } - val randomDurationMinutes = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES)) - null - } - + val enrollmentGroup = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ENROLLMENT_GROUP)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENROLLMENT_GROUP)) + null + } + val randomStartMinutes = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_RANDOM_START_MINUTES)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_START_MINUTES)) + null + } + val randomDurationMinutes = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_RANDOM_DURATION_MINUTES)) + null + } + tlvReader.exitContainer() - return DemandResponseLoadControlClusterLoadControlProgramStruct( - programID, - name, - enrollmentGroup, - randomStartMinutes, - randomDurationMinutes, - ) + return DemandResponseLoadControlClusterLoadControlProgramStruct(programID, name, enrollmentGroup, randomStartMinutes, randomDurationMinutes) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt index 833c582ea55f6b..a06b0011af0b89 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterPowerSavingsControlStruct ( + val powerSavings: UInt) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterPowerSavingsControlStruct {\n") append("\tpowerSavings : $powerSavings\n") append("}\n") @@ -40,13 +45,10 @@ class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings companion object { private const val TAG_POWER_SAVINGS = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterPowerSavingsControlStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterPowerSavingsControlStruct { tlvReader.enterStructure(tlvTag) val powerSavings = tlvReader.getUInt(ContextSpecificTag(TAG_POWER_SAVINGS)) - + tlvReader.exitContainer() return DemandResponseLoadControlClusterPowerSavingsControlStruct(powerSavings) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt index 2297c1cb636b3f..70524b6e349fca 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DemandResponseLoadControlClusterTemperatureControlStruct.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterTemperatureControlStruct( - val coolingTempOffset: Optional?, - val heatingtTempOffset: Optional?, - val coolingTempSetpoint: Optional?, - val heatingTempSetpoint: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DemandResponseLoadControlClusterTemperatureControlStruct ( + val coolingTempOffset: Optional?, + val heatingtTempOffset: Optional?, + val coolingTempSetpoint: Optional?, + val heatingTempSetpoint: Optional?) { + override fun toString(): String = buildString { append("DemandResponseLoadControlClusterTemperatureControlStruct {\n") append("\tcoolingTempOffset : $coolingTempOffset\n") append("\theatingtTempOffset : $heatingtTempOffset\n") @@ -42,37 +44,37 @@ class DemandResponseLoadControlClusterTemperatureControlStruct( tlvWriter.apply { startStructure(tlvTag) if (coolingTempOffset != null) { - if (coolingTempOffset.isPresent) { - val optcoolingTempOffset = coolingTempOffset.get() - put(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET), optcoolingTempOffset) - } - } else { - putNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET)) - } + if (coolingTempOffset.isPresent) { + val optcoolingTempOffset = coolingTempOffset.get() + put(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET), optcoolingTempOffset) + } + } else { + putNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET)) + } if (heatingtTempOffset != null) { - if (heatingtTempOffset.isPresent) { - val optheatingtTempOffset = heatingtTempOffset.get() - put(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET), optheatingtTempOffset) - } - } else { - putNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET)) - } + if (heatingtTempOffset.isPresent) { + val optheatingtTempOffset = heatingtTempOffset.get() + put(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET), optheatingtTempOffset) + } + } else { + putNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET)) + } if (coolingTempSetpoint != null) { - if (coolingTempSetpoint.isPresent) { - val optcoolingTempSetpoint = coolingTempSetpoint.get() - put(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT), optcoolingTempSetpoint) - } - } else { - putNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT)) - } + if (coolingTempSetpoint.isPresent) { + val optcoolingTempSetpoint = coolingTempSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT), optcoolingTempSetpoint) + } + } else { + putNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT)) + } if (heatingTempSetpoint != null) { - if (heatingTempSetpoint.isPresent) { - val optheatingTempSetpoint = heatingTempSetpoint.get() - put(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT), optheatingTempSetpoint) - } - } else { - putNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT)) - } + if (heatingTempSetpoint.isPresent) { + val optheatingTempSetpoint = heatingTempSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT), optheatingTempSetpoint) + } + } else { + putNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT)) + } endStructure() } } @@ -83,64 +85,52 @@ class DemandResponseLoadControlClusterTemperatureControlStruct( private const val TAG_COOLING_TEMP_SETPOINT = 2 private const val TAG_HEATING_TEMP_SETPOINT = 3 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DemandResponseLoadControlClusterTemperatureControlStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DemandResponseLoadControlClusterTemperatureControlStruct { tlvReader.enterStructure(tlvTag) - val coolingTempOffset = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET)) - null - } - val heatingtTempOffset = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET)) - null - } - val coolingTempSetpoint = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT)) - null - } - val heatingTempSetpoint = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT)) - null - } - + val coolingTempOffset = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_OFFSET)) + null + } + val heatingtTempOffset = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEATINGT_TEMP_OFFSET)) + null + } + val coolingTempSetpoint = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOLING_TEMP_SETPOINT)) + null + } + val heatingTempSetpoint = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEATING_TEMP_SETPOINT)) + null + } + tlvReader.exitContainer() - return DemandResponseLoadControlClusterTemperatureControlStruct( - coolingTempOffset, - heatingtTempOffset, - coolingTempSetpoint, - heatingTempSetpoint, - ) + return DemandResponseLoadControlClusterTemperatureControlStruct(coolingTempOffset, heatingtTempOffset, coolingTempSetpoint, heatingTempSetpoint) } } } 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 0a867ba2296515..c5529da5072ea8 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DescriptorClusterDeviceTypeStruct(val deviceType: ULong, val revision: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DescriptorClusterDeviceTypeStruct ( + val deviceType: ULong, + val revision: UInt) { + override fun toString(): String = buildString { append("DescriptorClusterDeviceTypeStruct {\n") append("\tdeviceType : $deviceType\n") append("\trevision : $revision\n") @@ -43,11 +49,11 @@ class DescriptorClusterDeviceTypeStruct(val deviceType: ULong, val revision: UIn private const val TAG_DEVICE_TYPE = 0 private const val TAG_REVISION = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DescriptorClusterDeviceTypeStruct { tlvReader.enterStructure(tlvTag) val deviceType = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) val revision = tlvReader.getUInt(ContextSpecificTag(TAG_REVISION)) - + tlvReader.exitContainer() 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 a3da0980b30450..89967a1445d75d 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,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DescriptorClusterSemanticTagStruct( - val mfgCode: UInt?, - val namespaceID: UInt, - val tag: UInt, - val label: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DescriptorClusterSemanticTagStruct ( + val mfgCode: UInt?, + val namespaceID: UInt, + val tag: UInt, + val label: Optional?) { + override fun toString(): String = buildString { append("DescriptorClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tnamespaceID : $namespaceID\n") @@ -42,20 +44,20 @@ class DescriptorClusterSemanticTagStruct( tlvWriter.apply { startStructure(tlvTag) 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() } } @@ -66,29 +68,27 @@ class DescriptorClusterSemanticTagStruct( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DescriptorClusterSemanticTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) - null - } + val mfgCode = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } val namespaceID = tlvReader.getUInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) val tag = tlvReader.getUInt(ContextSpecificTag(TAG_TAG)) - val label = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) - null - } - + 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/DeviceEnergyManagementClusterConstraintsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterConstraintsStruct.kt index 5f88440eff8ac6..b473bdd6ebe7c3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterConstraintsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterConstraintsStruct.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterConstraintsStruct( - val startTime: ULong, - val duration: ULong, - val nominalPower: Optional, - val maximumEnergy: Optional, - val loadControl: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterConstraintsStruct ( + val startTime: ULong, + val duration: ULong, + val nominalPower: Optional, + val maximumEnergy: Optional, + val loadControl: Optional) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterConstraintsStruct {\n") append("\tstartTime : $startTime\n") append("\tduration : $duration\n") @@ -46,17 +48,17 @@ class DeviceEnergyManagementClusterConstraintsStruct( put(ContextSpecificTag(TAG_START_TIME), startTime) put(ContextSpecificTag(TAG_DURATION), duration) if (nominalPower.isPresent) { - val optnominalPower = nominalPower.get() - put(ContextSpecificTag(TAG_NOMINAL_POWER), optnominalPower) - } + val optnominalPower = nominalPower.get() + put(ContextSpecificTag(TAG_NOMINAL_POWER), optnominalPower) + } if (maximumEnergy.isPresent) { - val optmaximumEnergy = maximumEnergy.get() - put(ContextSpecificTag(TAG_MAXIMUM_ENERGY), optmaximumEnergy) - } + val optmaximumEnergy = maximumEnergy.get() + put(ContextSpecificTag(TAG_MAXIMUM_ENERGY), optmaximumEnergy) + } if (loadControl.isPresent) { - val optloadControl = loadControl.get() - put(ContextSpecificTag(TAG_LOAD_CONTROL), optloadControl) - } + val optloadControl = loadControl.get() + put(ContextSpecificTag(TAG_LOAD_CONTROL), optloadControl) + } endStructure() } } @@ -68,38 +70,29 @@ class DeviceEnergyManagementClusterConstraintsStruct( private const val TAG_MAXIMUM_ENERGY = 3 private const val TAG_LOAD_CONTROL = 4 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterConstraintsStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterConstraintsStruct { tlvReader.enterStructure(tlvTag) val startTime = tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) val duration = tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) - val nominalPower = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_POWER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_POWER))) - } else { - Optional.empty() - } - val maximumEnergy = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAXIMUM_ENERGY))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MAXIMUM_ENERGY))) - } else { - Optional.empty() - } - val loadControl = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOAD_CONTROL))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_LOAD_CONTROL))) - } else { - Optional.empty() - } - + val nominalPower = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_POWER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_POWER))) + } else { + Optional.empty() + } + val maximumEnergy = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAXIMUM_ENERGY))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MAXIMUM_ENERGY))) + } else { + Optional.empty() + } + val loadControl = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOAD_CONTROL))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_LOAD_CONTROL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return DeviceEnergyManagementClusterConstraintsStruct( - startTime, - duration, - nominalPower, - maximumEnergy, - loadControl, - ) + return DeviceEnergyManagementClusterConstraintsStruct(startTime, duration, nominalPower, maximumEnergy, loadControl) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterCostStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterCostStruct.kt index 8f390e9a9e9e17..d996e8c0c944d0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterCostStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterCostStruct.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterCostStruct( - val costType: UInt, - val value: Long, - val decimalPoints: UInt, - val currency: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterCostStruct ( + val costType: UInt, + val value: Long, + val decimalPoints: UInt, + val currency: Optional) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterCostStruct {\n") append("\tcostType : $costType\n") append("\tvalue : $value\n") @@ -45,9 +47,9 @@ class DeviceEnergyManagementClusterCostStruct( put(ContextSpecificTag(TAG_VALUE), value) put(ContextSpecificTag(TAG_DECIMAL_POINTS), decimalPoints) if (currency.isPresent) { - val optcurrency = currency.get() - put(ContextSpecificTag(TAG_CURRENCY), optcurrency) - } + val optcurrency = currency.get() + put(ContextSpecificTag(TAG_CURRENCY), optcurrency) + } endStructure() } } @@ -58,18 +60,17 @@ class DeviceEnergyManagementClusterCostStruct( private const val TAG_DECIMAL_POINTS = 2 private const val TAG_CURRENCY = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterCostStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterCostStruct { tlvReader.enterStructure(tlvTag) val costType = tlvReader.getUInt(ContextSpecificTag(TAG_COST_TYPE)) val value = tlvReader.getLong(ContextSpecificTag(TAG_VALUE)) val decimalPoints = tlvReader.getUInt(ContextSpecificTag(TAG_DECIMAL_POINTS)) - val currency = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CURRENCY))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CURRENCY))) - } else { - Optional.empty() - } - + val currency = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CURRENCY))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CURRENCY))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return DeviceEnergyManagementClusterCostStruct(costType, value, decimalPoints, currency) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt index 2f3b23fc592020..c4b479410fde59 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterForecastStruct.kt @@ -17,25 +17,26 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterForecastStruct( - val forecastID: ULong, - val activeSlotNumber: UInt?, - val startTime: ULong, - val endTime: ULong, - val earliestStartTime: Optional?, - val latestEndTime: Optional, - val isPausable: Boolean, - val slots: List, - val forecastUpdateReason: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterForecastStruct ( + val forecastID: ULong, + val activeSlotNumber: UInt?, + val startTime: ULong, + val endTime: ULong, + val earliestStartTime: Optional?, + val latestEndTime: Optional, + val isPausable: Boolean, + val slots: List, + val forecastUpdateReason: UInt) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterForecastStruct {\n") append("\tforecastID : $forecastID\n") append("\tactiveSlotNumber : $activeSlotNumber\n") @@ -54,24 +55,24 @@ class DeviceEnergyManagementClusterForecastStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_FORECAST_I_D), forecastID) if (activeSlotNumber != null) { - put(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER), activeSlotNumber) - } else { - putNull(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER)) - } + put(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER), activeSlotNumber) + } else { + putNull(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER)) + } put(ContextSpecificTag(TAG_START_TIME), startTime) put(ContextSpecificTag(TAG_END_TIME), endTime) if (earliestStartTime != null) { - if (earliestStartTime.isPresent) { - val optearliestStartTime = earliestStartTime.get() - put(ContextSpecificTag(TAG_EARLIEST_START_TIME), optearliestStartTime) - } - } else { - putNull(ContextSpecificTag(TAG_EARLIEST_START_TIME)) - } + if (earliestStartTime.isPresent) { + val optearliestStartTime = earliestStartTime.get() + put(ContextSpecificTag(TAG_EARLIEST_START_TIME), optearliestStartTime) + } + } else { + putNull(ContextSpecificTag(TAG_EARLIEST_START_TIME)) + } if (latestEndTime.isPresent) { - val optlatestEndTime = latestEndTime.get() - put(ContextSpecificTag(TAG_LATEST_END_TIME), optlatestEndTime) - } + val optlatestEndTime = latestEndTime.get() + put(ContextSpecificTag(TAG_LATEST_END_TIME), optlatestEndTime) + } put(ContextSpecificTag(TAG_IS_PAUSABLE), isPausable) startArray(ContextSpecificTag(TAG_SLOTS)) for (item in slots.iterator()) { @@ -94,59 +95,45 @@ class DeviceEnergyManagementClusterForecastStruct( private const val TAG_SLOTS = 7 private const val TAG_FORECAST_UPDATE_REASON = 8 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterForecastStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterForecastStruct { tlvReader.enterStructure(tlvTag) val forecastID = tlvReader.getULong(ContextSpecificTag(TAG_FORECAST_I_D)) - val activeSlotNumber = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER)) - null - } + val activeSlotNumber = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ACTIVE_SLOT_NUMBER)) + null + } val startTime = tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) val endTime = tlvReader.getULong(ContextSpecificTag(TAG_END_TIME)) - val earliestStartTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EARLIEST_START_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EARLIEST_START_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EARLIEST_START_TIME)) - null - } - val latestEndTime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATEST_END_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_LATEST_END_TIME))) - } else { - Optional.empty() - } + val earliestStartTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EARLIEST_START_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EARLIEST_START_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EARLIEST_START_TIME)) + null + } + val latestEndTime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LATEST_END_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_LATEST_END_TIME))) + } else { + Optional.empty() + } val isPausable = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_PAUSABLE)) - val slots = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_SLOTS)) - while (!tlvReader.isEndOfContainer()) { - add(DeviceEnergyManagementClusterSlotStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } + val slots = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SLOTS)) + while(!tlvReader.isEndOfContainer()) { + add(DeviceEnergyManagementClusterSlotStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } val forecastUpdateReason = tlvReader.getUInt(ContextSpecificTag(TAG_FORECAST_UPDATE_REASON)) - + tlvReader.exitContainer() - return DeviceEnergyManagementClusterForecastStruct( - forecastID, - activeSlotNumber, - startTime, - endTime, - earliestStartTime, - latestEndTime, - isPausable, - slots, - forecastUpdateReason, - ) + return DeviceEnergyManagementClusterForecastStruct(forecastID, activeSlotNumber, startTime, endTime, earliestStartTime, latestEndTime, isPausable, slots, forecastUpdateReason) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.kt index c52738faeaf2f1..ab2c97d763c345 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustCapabilityStruct.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterPowerAdjustCapabilityStruct( - val powerAdjustCapability: List?, - val cause: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterPowerAdjustCapabilityStruct ( + val powerAdjustCapability: List?, + val cause: UInt) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterPowerAdjustCapabilityStruct {\n") append("\tpowerAdjustCapability : $powerAdjustCapability\n") append("\tcause : $cause\n") @@ -38,14 +40,14 @@ class DeviceEnergyManagementClusterPowerAdjustCapabilityStruct( tlvWriter.apply { startStructure(tlvTag) if (powerAdjustCapability != null) { - startArray(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) - for (item in powerAdjustCapability.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - } else { - putNull(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) + startArray(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) + for (item in powerAdjustCapability.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } else { + putNull(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) + } put(ContextSpecificTag(TAG_CAUSE), cause) endStructure() } @@ -55,26 +57,22 @@ class DeviceEnergyManagementClusterPowerAdjustCapabilityStruct( private const val TAG_POWER_ADJUST_CAPABILITY = 0 private const val TAG_CAUSE = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DeviceEnergyManagementClusterPowerAdjustCapabilityStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterPowerAdjustCapabilityStruct { tlvReader.enterStructure(tlvTag) - val powerAdjustCapability = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) - while (!tlvReader.isEndOfContainer()) { - add(DeviceEnergyManagementClusterPowerAdjustStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) - null - } + val powerAdjustCapability = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) + while(!tlvReader.isEndOfContainer()) { + add(DeviceEnergyManagementClusterPowerAdjustStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POWER_ADJUST_CAPABILITY)) + null + } val cause = tlvReader.getUInt(ContextSpecificTag(TAG_CAUSE)) - + tlvReader.exitContainer() return DeviceEnergyManagementClusterPowerAdjustCapabilityStruct(powerAdjustCapability, cause) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustStruct.kt index ff17921d6f93db..20385dd1ca78e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterPowerAdjustStruct.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterPowerAdjustStruct( - val minPower: Long, - val maxPower: Long, - val minDuration: ULong, - val maxDuration: ULong, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterPowerAdjustStruct ( + val minPower: Long, + val maxPower: Long, + val minDuration: ULong, + val maxDuration: ULong) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterPowerAdjustStruct {\n") append("\tminPower : $minPower\n") append("\tmaxPower : $maxPower\n") @@ -54,21 +57,16 @@ class DeviceEnergyManagementClusterPowerAdjustStruct( private const val TAG_MIN_DURATION = 2 private const val TAG_MAX_DURATION = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterPowerAdjustStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterPowerAdjustStruct { tlvReader.enterStructure(tlvTag) val minPower = tlvReader.getLong(ContextSpecificTag(TAG_MIN_POWER)) val maxPower = tlvReader.getLong(ContextSpecificTag(TAG_MAX_POWER)) val minDuration = tlvReader.getULong(ContextSpecificTag(TAG_MIN_DURATION)) val maxDuration = tlvReader.getULong(ContextSpecificTag(TAG_MAX_DURATION)) - + tlvReader.exitContainer() - return DeviceEnergyManagementClusterPowerAdjustStruct( - minPower, - maxPower, - minDuration, - maxDuration, - ) + return DeviceEnergyManagementClusterPowerAdjustStruct(minPower, maxPower, minDuration, maxDuration) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotAdjustmentStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotAdjustmentStruct.kt index bbc812db67cbbb..b061eaca03b169 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotAdjustmentStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotAdjustmentStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterSlotAdjustmentStruct( - val slotIndex: UInt, - val nominalPower: Optional, - val duration: ULong, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterSlotAdjustmentStruct ( + val slotIndex: UInt, + val nominalPower: Optional, + val duration: ULong) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterSlotAdjustmentStruct {\n") append("\tslotIndex : $slotIndex\n") append("\tnominalPower : $nominalPower\n") @@ -41,9 +43,9 @@ class DeviceEnergyManagementClusterSlotAdjustmentStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_SLOT_INDEX), slotIndex) if (nominalPower.isPresent) { - val optnominalPower = nominalPower.get() - put(ContextSpecificTag(TAG_NOMINAL_POWER), optnominalPower) - } + val optnominalPower = nominalPower.get() + put(ContextSpecificTag(TAG_NOMINAL_POWER), optnominalPower) + } put(ContextSpecificTag(TAG_DURATION), duration) endStructure() } @@ -54,20 +56,16 @@ class DeviceEnergyManagementClusterSlotAdjustmentStruct( private const val TAG_NOMINAL_POWER = 1 private const val TAG_DURATION = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DeviceEnergyManagementClusterSlotAdjustmentStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterSlotAdjustmentStruct { tlvReader.enterStructure(tlvTag) val slotIndex = tlvReader.getUInt(ContextSpecificTag(TAG_SLOT_INDEX)) - val nominalPower = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_POWER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_POWER))) - } else { - Optional.empty() - } + val nominalPower = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_POWER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_POWER))) + } else { + Optional.empty() + } val duration = tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) - + tlvReader.exitContainer() return DeviceEnergyManagementClusterSlotAdjustmentStruct(slotIndex, nominalPower, duration) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt index f966446dda469d..0533aa266a738e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementClusterSlotStruct.kt @@ -17,34 +17,35 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementClusterSlotStruct( - val minDuration: ULong, - val maxDuration: ULong, - val defaultDuration: ULong, - val elapsedSlotTime: ULong, - val remainingSlotTime: ULong, - val slotIsPausable: Optional, - val minPauseDuration: Optional, - val maxPauseDuration: Optional, - val manufacturerESAState: Optional, - val nominalPower: Optional, - val minPower: Optional, - val maxPower: Optional, - val nominalEnergy: Optional, - val costs: Optional>, - val minPowerAdjustment: Optional, - val maxPowerAdjustment: Optional, - val minDurationAdjustment: Optional, - val maxDurationAdjustment: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementClusterSlotStruct ( + val minDuration: ULong, + val maxDuration: ULong, + val defaultDuration: ULong, + val elapsedSlotTime: ULong, + val remainingSlotTime: ULong, + val slotIsPausable: Optional, + val minPauseDuration: Optional, + val maxPauseDuration: Optional, + val manufacturerESAState: Optional, + val nominalPower: Optional, + val minPower: Optional, + val maxPower: Optional, + val nominalEnergy: Optional, + val costs: Optional>, + val minPowerAdjustment: Optional, + val maxPowerAdjustment: Optional, + val minDurationAdjustment: Optional, + val maxDurationAdjustment: Optional) { + override fun toString(): String = buildString { append("DeviceEnergyManagementClusterSlotStruct {\n") append("\tminDuration : $minDuration\n") append("\tmaxDuration : $maxDuration\n") @@ -76,61 +77,61 @@ class DeviceEnergyManagementClusterSlotStruct( put(ContextSpecificTag(TAG_ELAPSED_SLOT_TIME), elapsedSlotTime) put(ContextSpecificTag(TAG_REMAINING_SLOT_TIME), remainingSlotTime) if (slotIsPausable.isPresent) { - val optslotIsPausable = slotIsPausable.get() - put(ContextSpecificTag(TAG_SLOT_IS_PAUSABLE), optslotIsPausable) - } + val optslotIsPausable = slotIsPausable.get() + put(ContextSpecificTag(TAG_SLOT_IS_PAUSABLE), optslotIsPausable) + } if (minPauseDuration.isPresent) { - val optminPauseDuration = minPauseDuration.get() - put(ContextSpecificTag(TAG_MIN_PAUSE_DURATION), optminPauseDuration) - } + val optminPauseDuration = minPauseDuration.get() + put(ContextSpecificTag(TAG_MIN_PAUSE_DURATION), optminPauseDuration) + } if (maxPauseDuration.isPresent) { - val optmaxPauseDuration = maxPauseDuration.get() - put(ContextSpecificTag(TAG_MAX_PAUSE_DURATION), optmaxPauseDuration) - } + val optmaxPauseDuration = maxPauseDuration.get() + put(ContextSpecificTag(TAG_MAX_PAUSE_DURATION), optmaxPauseDuration) + } if (manufacturerESAState.isPresent) { - val optmanufacturerESAState = manufacturerESAState.get() - put(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE), optmanufacturerESAState) - } + val optmanufacturerESAState = manufacturerESAState.get() + put(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE), optmanufacturerESAState) + } if (nominalPower.isPresent) { - val optnominalPower = nominalPower.get() - put(ContextSpecificTag(TAG_NOMINAL_POWER), optnominalPower) - } + val optnominalPower = nominalPower.get() + put(ContextSpecificTag(TAG_NOMINAL_POWER), optnominalPower) + } if (minPower.isPresent) { - val optminPower = minPower.get() - put(ContextSpecificTag(TAG_MIN_POWER), optminPower) - } + val optminPower = minPower.get() + put(ContextSpecificTag(TAG_MIN_POWER), optminPower) + } if (maxPower.isPresent) { - val optmaxPower = maxPower.get() - put(ContextSpecificTag(TAG_MAX_POWER), optmaxPower) - } + val optmaxPower = maxPower.get() + put(ContextSpecificTag(TAG_MAX_POWER), optmaxPower) + } if (nominalEnergy.isPresent) { - val optnominalEnergy = nominalEnergy.get() - put(ContextSpecificTag(TAG_NOMINAL_ENERGY), optnominalEnergy) - } + val optnominalEnergy = nominalEnergy.get() + put(ContextSpecificTag(TAG_NOMINAL_ENERGY), optnominalEnergy) + } if (costs.isPresent) { - val optcosts = costs.get() - startArray(ContextSpecificTag(TAG_COSTS)) - for (item in optcosts.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optcosts = costs.get() + startArray(ContextSpecificTag(TAG_COSTS)) + for (item in optcosts.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } if (minPowerAdjustment.isPresent) { - val optminPowerAdjustment = minPowerAdjustment.get() - put(ContextSpecificTag(TAG_MIN_POWER_ADJUSTMENT), optminPowerAdjustment) - } + val optminPowerAdjustment = minPowerAdjustment.get() + put(ContextSpecificTag(TAG_MIN_POWER_ADJUSTMENT), optminPowerAdjustment) + } if (maxPowerAdjustment.isPresent) { - val optmaxPowerAdjustment = maxPowerAdjustment.get() - put(ContextSpecificTag(TAG_MAX_POWER_ADJUSTMENT), optmaxPowerAdjustment) - } + val optmaxPowerAdjustment = maxPowerAdjustment.get() + put(ContextSpecificTag(TAG_MAX_POWER_ADJUSTMENT), optmaxPowerAdjustment) + } if (minDurationAdjustment.isPresent) { - val optminDurationAdjustment = minDurationAdjustment.get() - put(ContextSpecificTag(TAG_MIN_DURATION_ADJUSTMENT), optminDurationAdjustment) - } + val optminDurationAdjustment = minDurationAdjustment.get() + put(ContextSpecificTag(TAG_MIN_DURATION_ADJUSTMENT), optminDurationAdjustment) + } if (maxDurationAdjustment.isPresent) { - val optmaxDurationAdjustment = maxDurationAdjustment.get() - put(ContextSpecificTag(TAG_MAX_DURATION_ADJUSTMENT), optmaxDurationAdjustment) - } + val optmaxDurationAdjustment = maxDurationAdjustment.get() + put(ContextSpecificTag(TAG_MAX_DURATION_ADJUSTMENT), optmaxDurationAdjustment) + } endStructure() } } @@ -155,122 +156,88 @@ class DeviceEnergyManagementClusterSlotStruct( private const val TAG_MIN_DURATION_ADJUSTMENT = 16 private const val TAG_MAX_DURATION_ADJUSTMENT = 17 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementClusterSlotStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementClusterSlotStruct { tlvReader.enterStructure(tlvTag) val minDuration = tlvReader.getULong(ContextSpecificTag(TAG_MIN_DURATION)) val maxDuration = tlvReader.getULong(ContextSpecificTag(TAG_MAX_DURATION)) val defaultDuration = tlvReader.getULong(ContextSpecificTag(TAG_DEFAULT_DURATION)) val elapsedSlotTime = tlvReader.getULong(ContextSpecificTag(TAG_ELAPSED_SLOT_TIME)) val remainingSlotTime = tlvReader.getULong(ContextSpecificTag(TAG_REMAINING_SLOT_TIME)) - val slotIsPausable = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SLOT_IS_PAUSABLE))) { - Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_SLOT_IS_PAUSABLE))) - } else { - Optional.empty() - } - val minPauseDuration = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) - } else { - Optional.empty() - } - val maxPauseDuration = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) - } else { - Optional.empty() - } - val manufacturerESAState = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) - } else { - Optional.empty() - } - val nominalPower = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_POWER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_POWER))) - } else { - Optional.empty() - } - val minPower = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_POWER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MIN_POWER))) - } else { - Optional.empty() - } - val maxPower = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_POWER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MAX_POWER))) - } else { - Optional.empty() - } - val nominalEnergy = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_ENERGY))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_ENERGY))) - } else { - Optional.empty() - } - val costs = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COSTS))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_COSTS)) - while (!tlvReader.isEndOfContainer()) { - add(DeviceEnergyManagementClusterCostStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val minPowerAdjustment = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_POWER_ADJUSTMENT))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MIN_POWER_ADJUSTMENT))) - } else { - Optional.empty() - } - val maxPowerAdjustment = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_POWER_ADJUSTMENT))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MAX_POWER_ADJUSTMENT))) - } else { - Optional.empty() - } - val minDurationAdjustment = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_DURATION_ADJUSTMENT))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_DURATION_ADJUSTMENT))) - } else { - Optional.empty() - } - val maxDurationAdjustment = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_DURATION_ADJUSTMENT))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_DURATION_ADJUSTMENT))) - } else { - Optional.empty() - } - + val slotIsPausable = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SLOT_IS_PAUSABLE))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_SLOT_IS_PAUSABLE))) + } else { + Optional.empty() + } + val minPauseDuration = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_PAUSE_DURATION))) + } else { + Optional.empty() + } + val maxPauseDuration = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_PAUSE_DURATION))) + } else { + Optional.empty() + } + val manufacturerESAState = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MANUFACTURER_E_S_A_STATE))) + } else { + Optional.empty() + } + val nominalPower = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_POWER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_POWER))) + } else { + Optional.empty() + } + val minPower = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_POWER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MIN_POWER))) + } else { + Optional.empty() + } + val maxPower = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_POWER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MAX_POWER))) + } else { + Optional.empty() + } + val nominalEnergy = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NOMINAL_ENERGY))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NOMINAL_ENERGY))) + } else { + Optional.empty() + } + val costs = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COSTS))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_COSTS)) + while(!tlvReader.isEndOfContainer()) { + add(DeviceEnergyManagementClusterCostStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val minPowerAdjustment = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_POWER_ADJUSTMENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MIN_POWER_ADJUSTMENT))) + } else { + Optional.empty() + } + val maxPowerAdjustment = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_POWER_ADJUSTMENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_MAX_POWER_ADJUSTMENT))) + } else { + Optional.empty() + } + val minDurationAdjustment = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_DURATION_ADJUSTMENT))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_DURATION_ADJUSTMENT))) + } else { + Optional.empty() + } + val maxDurationAdjustment = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_DURATION_ADJUSTMENT))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_DURATION_ADJUSTMENT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return DeviceEnergyManagementClusterSlotStruct( - minDuration, - maxDuration, - defaultDuration, - elapsedSlotTime, - remainingSlotTime, - slotIsPausable, - minPauseDuration, - maxPauseDuration, - manufacturerESAState, - nominalPower, - minPower, - maxPower, - nominalEnergy, - costs, - minPowerAdjustment, - maxPowerAdjustment, - minDurationAdjustment, - maxDurationAdjustment, - ) + return DeviceEnergyManagementClusterSlotStruct(minDuration, maxDuration, defaultDuration, elapsedSlotTime, remainingSlotTime, slotIsPausable, minPauseDuration, maxPauseDuration, manufacturerESAState, nominalPower, minPower, maxPower, nominalEnergy, costs, minPowerAdjustment, maxPowerAdjustment, minDurationAdjustment, maxDurationAdjustment) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeOptionStruct.kt index 6f94a9156bca81..4fbe4cecea00a4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("DeviceEnergyManagementModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,22 +57,18 @@ class DeviceEnergyManagementModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): DeviceEnergyManagementModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(DeviceEnergyManagementModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(DeviceEnergyManagementModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DeviceEnergyManagementModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeTagStruct.kt index b47b743cbff0e8..4786e339f92afd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DeviceEnergyManagementModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DeviceEnergyManagementModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DeviceEnergyManagementModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("DeviceEnergyManagementModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class DeviceEnergyManagementModeClusterModeTagStruct(val mfgCode: Optional tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class DeviceEnergyManagementModeClusterModeTagStruct(val mfgCode: Optional private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DeviceEnergyManagementModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DeviceEnergyManagementModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DeviceEnergyManagementModeClusterModeTagStruct(mfgCode, value) 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 ba50458af59ecb..04305789265487 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,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DishwasherModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class DishwasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 916f58bdab72e6..f2615f2ddeb01e 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,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DishwasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt index 5ee8045b4d17ed..108dd2b0efe922 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DoorLockClusterCredentialStruct(val credentialType: UInt, val credentialIndex: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterCredentialStruct ( + val credentialType: UInt, + val credentialIndex: UInt) { + override fun toString(): String = buildString { append("DoorLockClusterCredentialStruct {\n") append("\tcredentialType : $credentialType\n") append("\tcredentialIndex : $credentialIndex\n") @@ -43,11 +49,11 @@ class DoorLockClusterCredentialStruct(val credentialType: UInt, val credentialIn private const val TAG_CREDENTIAL_TYPE = 0 private const val TAG_CREDENTIAL_INDEX = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterCredentialStruct { tlvReader.enterStructure(tlvTag) val credentialType = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) val credentialIndex = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) - + tlvReader.exitContainer() return DoorLockClusterCredentialStruct(credentialType, credentialIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct.kt index 91e95a39ceb88f..be7a90405c6bc5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct( - val importedResetTimestamp: Optional?, - val exportedResetTimestamp: Optional?, - val importedResetSystime: Optional?, - val exportedResetSystime: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct ( + val importedResetTimestamp: Optional?, + val exportedResetTimestamp: Optional?, + val importedResetSystime: Optional?, + val exportedResetSystime: Optional?) { + override fun toString(): String = buildString { append("ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct {\n") append("\timportedResetTimestamp : $importedResetTimestamp\n") append("\texportedResetTimestamp : $exportedResetTimestamp\n") @@ -42,37 +44,37 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct( tlvWriter.apply { startStructure(tlvTag) if (importedResetTimestamp != null) { - if (importedResetTimestamp.isPresent) { - val optimportedResetTimestamp = importedResetTimestamp.get() - put(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP), optimportedResetTimestamp) - } - } else { - putNull(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP)) - } + if (importedResetTimestamp.isPresent) { + val optimportedResetTimestamp = importedResetTimestamp.get() + put(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP), optimportedResetTimestamp) + } + } else { + putNull(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP)) + } if (exportedResetTimestamp != null) { - if (exportedResetTimestamp.isPresent) { - val optexportedResetTimestamp = exportedResetTimestamp.get() - put(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP), optexportedResetTimestamp) - } - } else { - putNull(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP)) - } + if (exportedResetTimestamp.isPresent) { + val optexportedResetTimestamp = exportedResetTimestamp.get() + put(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP), optexportedResetTimestamp) + } + } else { + putNull(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP)) + } if (importedResetSystime != null) { - if (importedResetSystime.isPresent) { - val optimportedResetSystime = importedResetSystime.get() - put(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME), optimportedResetSystime) - } - } else { - putNull(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME)) - } + if (importedResetSystime.isPresent) { + val optimportedResetSystime = importedResetSystime.get() + put(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME), optimportedResetSystime) + } + } else { + putNull(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME)) + } if (exportedResetSystime != null) { - if (exportedResetSystime.isPresent) { - val optexportedResetSystime = exportedResetSystime.get() - put(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME), optexportedResetSystime) - } - } else { - putNull(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME)) - } + if (exportedResetSystime.isPresent) { + val optexportedResetSystime = exportedResetSystime.get() + put(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME), optexportedResetSystime) + } + } else { + putNull(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME)) + } endStructure() } } @@ -83,64 +85,52 @@ class ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct( private const val TAG_IMPORTED_RESET_SYSTIME = 2 private const val TAG_EXPORTED_RESET_SYSTIME = 3 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct { tlvReader.enterStructure(tlvTag) - val importedResetTimestamp = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP)) - null - } - val exportedResetTimestamp = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP)) - null - } - val importedResetSystime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME)) - null - } - val exportedResetSystime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME)) - null - } - + val importedResetTimestamp = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_IMPORTED_RESET_TIMESTAMP)) + null + } + val exportedResetTimestamp = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EXPORTED_RESET_TIMESTAMP)) + null + } + val importedResetSystime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_IMPORTED_RESET_SYSTIME)) + null + } + val exportedResetSystime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EXPORTED_RESET_SYSTIME)) + null + } + tlvReader.exitContainer() - return ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct( - importedResetTimestamp, - exportedResetTimestamp, - importedResetSystime, - exportedResetSystime, - ) + return ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct(importedResetTimestamp, exportedResetTimestamp, importedResetSystime, exportedResetSystime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt index 794c13a844928b..498c715482bd90 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalEnergyMeasurementClusterEnergyMeasurementStruct( - val energy: Long, - val startTimestamp: Optional, - val endTimestamp: Optional, - val startSystime: Optional, - val endSystime: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalEnergyMeasurementClusterEnergyMeasurementStruct ( + val energy: Long, + val startTimestamp: Optional, + val endTimestamp: Optional, + val startSystime: Optional, + val endSystime: Optional) { + override fun toString(): String = buildString { append("ElectricalEnergyMeasurementClusterEnergyMeasurementStruct {\n") append("\tenergy : $energy\n") append("\tstartTimestamp : $startTimestamp\n") @@ -45,21 +47,21 @@ class ElectricalEnergyMeasurementClusterEnergyMeasurementStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_ENERGY), energy) if (startTimestamp.isPresent) { - val optstartTimestamp = startTimestamp.get() - put(ContextSpecificTag(TAG_START_TIMESTAMP), optstartTimestamp) - } + val optstartTimestamp = startTimestamp.get() + put(ContextSpecificTag(TAG_START_TIMESTAMP), optstartTimestamp) + } if (endTimestamp.isPresent) { - val optendTimestamp = endTimestamp.get() - put(ContextSpecificTag(TAG_END_TIMESTAMP), optendTimestamp) - } + val optendTimestamp = endTimestamp.get() + put(ContextSpecificTag(TAG_END_TIMESTAMP), optendTimestamp) + } if (startSystime.isPresent) { - val optstartSystime = startSystime.get() - put(ContextSpecificTag(TAG_START_SYSTIME), optstartSystime) - } + val optstartSystime = startSystime.get() + put(ContextSpecificTag(TAG_START_SYSTIME), optstartSystime) + } if (endSystime.isPresent) { - val optendSystime = endSystime.get() - put(ContextSpecificTag(TAG_END_SYSTIME), optendSystime) - } + val optendSystime = endSystime.get() + put(ContextSpecificTag(TAG_END_SYSTIME), optendSystime) + } endStructure() } } @@ -71,46 +73,33 @@ class ElectricalEnergyMeasurementClusterEnergyMeasurementStruct( private const val TAG_START_SYSTIME = 3 private const val TAG_END_SYSTIME = 4 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalEnergyMeasurementClusterEnergyMeasurementStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalEnergyMeasurementClusterEnergyMeasurementStruct { tlvReader.enterStructure(tlvTag) val energy = tlvReader.getLong(ContextSpecificTag(TAG_ENERGY)) - val startTimestamp = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_TIMESTAMP))) - } else { - Optional.empty() - } - val endTimestamp = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_TIMESTAMP))) - } else { - Optional.empty() - } - val startSystime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_SYSTIME))) - } else { - Optional.empty() - } - val endSystime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_SYSTIME))) - } else { - Optional.empty() - } - + val startTimestamp = if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_TIMESTAMP))) + } else { + Optional.empty() + } + val endTimestamp = if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_TIMESTAMP))) + } else { + Optional.empty() + } + val startSystime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_SYSTIME))) + } else { + Optional.empty() + } + val endSystime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_SYSTIME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ElectricalEnergyMeasurementClusterEnergyMeasurementStruct( - energy, - startTimestamp, - endTimestamp, - startSystime, - endSystime, - ) + return ElectricalEnergyMeasurementClusterEnergyMeasurementStruct(energy, startTimestamp, endTimestamp, startSystime, endSystime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt index 73588df4e69a2c..53795eacfd0bda 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt @@ -17,23 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct( - val rangeMin: Long, - val rangeMax: Long, - val percentMax: Optional, - val percentMin: Optional, - val percentTypical: Optional, - val fixedMax: Optional, - val fixedMin: Optional, - val fixedTypical: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct ( + val rangeMin: Long, + val rangeMax: Long, + val percentMax: Optional, + val percentMin: Optional, + val percentTypical: Optional, + val fixedMax: Optional, + val fixedMin: Optional, + val fixedTypical: Optional) { + override fun toString(): String = buildString { append("ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct {\n") append("\trangeMin : $rangeMin\n") append("\trangeMax : $rangeMax\n") @@ -52,29 +54,29 @@ class ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct( put(ContextSpecificTag(TAG_RANGE_MIN), rangeMin) put(ContextSpecificTag(TAG_RANGE_MAX), rangeMax) if (percentMax.isPresent) { - val optpercentMax = percentMax.get() - put(ContextSpecificTag(TAG_PERCENT_MAX), optpercentMax) - } + val optpercentMax = percentMax.get() + put(ContextSpecificTag(TAG_PERCENT_MAX), optpercentMax) + } if (percentMin.isPresent) { - val optpercentMin = percentMin.get() - put(ContextSpecificTag(TAG_PERCENT_MIN), optpercentMin) - } + val optpercentMin = percentMin.get() + put(ContextSpecificTag(TAG_PERCENT_MIN), optpercentMin) + } if (percentTypical.isPresent) { - val optpercentTypical = percentTypical.get() - put(ContextSpecificTag(TAG_PERCENT_TYPICAL), optpercentTypical) - } + val optpercentTypical = percentTypical.get() + put(ContextSpecificTag(TAG_PERCENT_TYPICAL), optpercentTypical) + } if (fixedMax.isPresent) { - val optfixedMax = fixedMax.get() - put(ContextSpecificTag(TAG_FIXED_MAX), optfixedMax) - } + val optfixedMax = fixedMax.get() + put(ContextSpecificTag(TAG_FIXED_MAX), optfixedMax) + } if (fixedMin.isPresent) { - val optfixedMin = fixedMin.get() - put(ContextSpecificTag(TAG_FIXED_MIN), optfixedMin) - } + val optfixedMin = fixedMin.get() + put(ContextSpecificTag(TAG_FIXED_MIN), optfixedMin) + } if (fixedTypical.isPresent) { - val optfixedTypical = fixedTypical.get() - put(ContextSpecificTag(TAG_FIXED_TYPICAL), optfixedTypical) - } + val optfixedTypical = fixedTypical.get() + put(ContextSpecificTag(TAG_FIXED_TYPICAL), optfixedTypical) + } endStructure() } } @@ -89,62 +91,44 @@ class ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct( private const val TAG_FIXED_MIN = 6 private const val TAG_FIXED_TYPICAL = 7 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct { tlvReader.enterStructure(tlvTag) val rangeMin = tlvReader.getLong(ContextSpecificTag(TAG_RANGE_MIN)) val rangeMax = tlvReader.getLong(ContextSpecificTag(TAG_RANGE_MAX)) - val percentMax = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MAX))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MAX))) - } else { - Optional.empty() - } - val percentMin = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MIN))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MIN))) - } else { - Optional.empty() - } - val percentTypical = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_TYPICAL))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_TYPICAL))) - } else { - Optional.empty() - } - val fixedMax = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MAX))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MAX))) - } else { - Optional.empty() - } - val fixedMin = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MIN))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MIN))) - } else { - Optional.empty() - } - val fixedTypical = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_TYPICAL))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_TYPICAL))) - } else { - Optional.empty() - } - + val percentMax = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MAX))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MAX))) + } else { + Optional.empty() + } + val percentMin = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MIN))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MIN))) + } else { + Optional.empty() + } + val percentTypical = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_TYPICAL))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_TYPICAL))) + } else { + Optional.empty() + } + val fixedMax = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MAX))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MAX))) + } else { + Optional.empty() + } + val fixedMin = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MIN))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MIN))) + } else { + Optional.empty() + } + val fixedTypical = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_TYPICAL))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_TYPICAL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct( - rangeMin, - rangeMax, - percentMax, - percentMin, - percentTypical, - fixedMax, - fixedMin, - fixedTypical, - ) + return ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct(rangeMin, rangeMax, percentMax, percentMin, percentTypical, fixedMax, fixedMin, fixedTypical) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt index 23d1edddda7db6..25bd74a73e38b7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt @@ -20,17 +20,19 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct( - val measurementType: UInt, - val measured: Boolean, - val minMeasuredValue: Long, - val maxMeasuredValue: Long, - val accuracyRanges: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct ( + val measurementType: UInt, + val measured: Boolean, + val minMeasuredValue: Long, + val maxMeasuredValue: Long, + val accuracyRanges: List) { + override fun toString(): String = buildString { append("ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct {\n") append("\tmeasurementType : $measurementType\n") append("\tmeasured : $measured\n") @@ -63,38 +65,23 @@ class ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct( private const val TAG_MAX_MEASURED_VALUE = 3 private const val TAG_ACCURACY_RANGES = 4 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct { tlvReader.enterStructure(tlvTag) val measurementType = tlvReader.getUInt(ContextSpecificTag(TAG_MEASUREMENT_TYPE)) val measured = tlvReader.getBoolean(ContextSpecificTag(TAG_MEASURED)) val minMeasuredValue = tlvReader.getLong(ContextSpecificTag(TAG_MIN_MEASURED_VALUE)) val maxMeasuredValue = tlvReader.getLong(ContextSpecificTag(TAG_MAX_MEASURED_VALUE)) - val accuracyRanges = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ACCURACY_RANGES)) - while (!tlvReader.isEndOfContainer()) { - add( - ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.fromTlv( - AnonymousTag, - tlvReader, - ) - ) - } - tlvReader.exitContainer() - } - + val accuracyRanges = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ACCURACY_RANGES)) + while(!tlvReader.isEndOfContainer()) { + add(ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct( - measurementType, - measured, - minMeasuredValue, - maxMeasuredValue, - accuracyRanges, - ) + return ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct(measurementType, measured, minMeasuredValue, maxMeasuredValue, accuracyRanges) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterHarmonicMeasurementStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterHarmonicMeasurementStruct.kt index e19a37b4beefd9..b3703e4da9ce70 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterHarmonicMeasurementStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterHarmonicMeasurementStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalPowerMeasurementClusterHarmonicMeasurementStruct( - val order: UInt, - val measurement: Long?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalPowerMeasurementClusterHarmonicMeasurementStruct ( + val order: UInt, + val measurement: Long?) { + override fun toString(): String = buildString { append("ElectricalPowerMeasurementClusterHarmonicMeasurementStruct {\n") append("\torder : $order\n") append("\tmeasurement : $measurement\n") @@ -38,10 +41,10 @@ class ElectricalPowerMeasurementClusterHarmonicMeasurementStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_ORDER), order) if (measurement != null) { - put(ContextSpecificTag(TAG_MEASUREMENT), measurement) - } else { - putNull(ContextSpecificTag(TAG_MEASUREMENT)) - } + put(ContextSpecificTag(TAG_MEASUREMENT), measurement) + } else { + putNull(ContextSpecificTag(TAG_MEASUREMENT)) + } endStructure() } } @@ -50,20 +53,16 @@ class ElectricalPowerMeasurementClusterHarmonicMeasurementStruct( private const val TAG_ORDER = 0 private const val TAG_MEASUREMENT = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalPowerMeasurementClusterHarmonicMeasurementStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalPowerMeasurementClusterHarmonicMeasurementStruct { tlvReader.enterStructure(tlvTag) val order = tlvReader.getUInt(ContextSpecificTag(TAG_ORDER)) - val measurement = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_MEASUREMENT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MEASUREMENT)) - null - } - + val measurement = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_MEASUREMENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MEASUREMENT)) + null + } + tlvReader.exitContainer() return ElectricalPowerMeasurementClusterHarmonicMeasurementStruct(order, measurement) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct.kt index 234907a2d543d7..c9a917771861a0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct.kt @@ -17,23 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct( - val rangeMin: Long, - val rangeMax: Long, - val percentMax: Optional, - val percentMin: Optional, - val percentTypical: Optional, - val fixedMax: Optional, - val fixedMin: Optional, - val fixedTypical: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct ( + val rangeMin: Long, + val rangeMax: Long, + val percentMax: Optional, + val percentMin: Optional, + val percentTypical: Optional, + val fixedMax: Optional, + val fixedMin: Optional, + val fixedTypical: Optional) { + override fun toString(): String = buildString { append("ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct {\n") append("\trangeMin : $rangeMin\n") append("\trangeMax : $rangeMax\n") @@ -52,29 +54,29 @@ class ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct( put(ContextSpecificTag(TAG_RANGE_MIN), rangeMin) put(ContextSpecificTag(TAG_RANGE_MAX), rangeMax) if (percentMax.isPresent) { - val optpercentMax = percentMax.get() - put(ContextSpecificTag(TAG_PERCENT_MAX), optpercentMax) - } + val optpercentMax = percentMax.get() + put(ContextSpecificTag(TAG_PERCENT_MAX), optpercentMax) + } if (percentMin.isPresent) { - val optpercentMin = percentMin.get() - put(ContextSpecificTag(TAG_PERCENT_MIN), optpercentMin) - } + val optpercentMin = percentMin.get() + put(ContextSpecificTag(TAG_PERCENT_MIN), optpercentMin) + } if (percentTypical.isPresent) { - val optpercentTypical = percentTypical.get() - put(ContextSpecificTag(TAG_PERCENT_TYPICAL), optpercentTypical) - } + val optpercentTypical = percentTypical.get() + put(ContextSpecificTag(TAG_PERCENT_TYPICAL), optpercentTypical) + } if (fixedMax.isPresent) { - val optfixedMax = fixedMax.get() - put(ContextSpecificTag(TAG_FIXED_MAX), optfixedMax) - } + val optfixedMax = fixedMax.get() + put(ContextSpecificTag(TAG_FIXED_MAX), optfixedMax) + } if (fixedMin.isPresent) { - val optfixedMin = fixedMin.get() - put(ContextSpecificTag(TAG_FIXED_MIN), optfixedMin) - } + val optfixedMin = fixedMin.get() + put(ContextSpecificTag(TAG_FIXED_MIN), optfixedMin) + } if (fixedTypical.isPresent) { - val optfixedTypical = fixedTypical.get() - put(ContextSpecificTag(TAG_FIXED_TYPICAL), optfixedTypical) - } + val optfixedTypical = fixedTypical.get() + put(ContextSpecificTag(TAG_FIXED_TYPICAL), optfixedTypical) + } endStructure() } } @@ -89,62 +91,44 @@ class ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct( private const val TAG_FIXED_MIN = 6 private const val TAG_FIXED_TYPICAL = 7 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct { tlvReader.enterStructure(tlvTag) val rangeMin = tlvReader.getLong(ContextSpecificTag(TAG_RANGE_MIN)) val rangeMax = tlvReader.getLong(ContextSpecificTag(TAG_RANGE_MAX)) - val percentMax = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MAX))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MAX))) - } else { - Optional.empty() - } - val percentMin = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MIN))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MIN))) - } else { - Optional.empty() - } - val percentTypical = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_TYPICAL))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_TYPICAL))) - } else { - Optional.empty() - } - val fixedMax = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MAX))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MAX))) - } else { - Optional.empty() - } - val fixedMin = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MIN))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MIN))) - } else { - Optional.empty() - } - val fixedTypical = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_TYPICAL))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_TYPICAL))) - } else { - Optional.empty() - } - + val percentMax = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MAX))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MAX))) + } else { + Optional.empty() + } + val percentMin = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_MIN))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_MIN))) + } else { + Optional.empty() + } + val percentTypical = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PERCENT_TYPICAL))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PERCENT_TYPICAL))) + } else { + Optional.empty() + } + val fixedMax = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MAX))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MAX))) + } else { + Optional.empty() + } + val fixedMin = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_MIN))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_MIN))) + } else { + Optional.empty() + } + val fixedTypical = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FIXED_TYPICAL))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_FIXED_TYPICAL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct( - rangeMin, - rangeMax, - percentMax, - percentMin, - percentTypical, - fixedMax, - fixedMin, - fixedTypical, - ) + return ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct(rangeMin, rangeMax, percentMax, percentMin, percentTypical, fixedMax, fixedMin, fixedTypical) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyStruct.kt index c383c186b659bc..d131edc7e01767 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementAccuracyStruct.kt @@ -20,17 +20,19 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalPowerMeasurementClusterMeasurementAccuracyStruct( - val measurementType: UInt, - val measured: Boolean, - val minMeasuredValue: Long, - val maxMeasuredValue: Long, - val accuracyRanges: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalPowerMeasurementClusterMeasurementAccuracyStruct ( + val measurementType: UInt, + val measured: Boolean, + val minMeasuredValue: Long, + val maxMeasuredValue: Long, + val accuracyRanges: List) { + override fun toString(): String = buildString { append("ElectricalPowerMeasurementClusterMeasurementAccuracyStruct {\n") append("\tmeasurementType : $measurementType\n") append("\tmeasured : $measured\n") @@ -63,38 +65,23 @@ class ElectricalPowerMeasurementClusterMeasurementAccuracyStruct( private const val TAG_MAX_MEASURED_VALUE = 3 private const val TAG_ACCURACY_RANGES = 4 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalPowerMeasurementClusterMeasurementAccuracyStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalPowerMeasurementClusterMeasurementAccuracyStruct { tlvReader.enterStructure(tlvTag) val measurementType = tlvReader.getUInt(ContextSpecificTag(TAG_MEASUREMENT_TYPE)) val measured = tlvReader.getBoolean(ContextSpecificTag(TAG_MEASURED)) val minMeasuredValue = tlvReader.getLong(ContextSpecificTag(TAG_MIN_MEASURED_VALUE)) val maxMeasuredValue = tlvReader.getLong(ContextSpecificTag(TAG_MAX_MEASURED_VALUE)) - val accuracyRanges = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ACCURACY_RANGES)) - while (!tlvReader.isEndOfContainer()) { - add( - ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct.fromTlv( - AnonymousTag, - tlvReader, - ) - ) - } - tlvReader.exitContainer() - } - + val accuracyRanges = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ACCURACY_RANGES)) + while(!tlvReader.isEndOfContainer()) { + add(ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return ElectricalPowerMeasurementClusterMeasurementAccuracyStruct( - measurementType, - measured, - minMeasuredValue, - maxMeasuredValue, - accuracyRanges, - ) + return ElectricalPowerMeasurementClusterMeasurementAccuracyStruct(measurementType, measured, minMeasuredValue, maxMeasuredValue, accuracyRanges) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementRangeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementRangeStruct.kt index c2e66b721e0b24..e2947e40c2439b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementRangeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalPowerMeasurementClusterMeasurementRangeStruct.kt @@ -17,26 +17,28 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ElectricalPowerMeasurementClusterMeasurementRangeStruct( - val measurementType: UInt, - val min: Long, - val max: Long, - val startTimestamp: Optional, - val endTimestamp: Optional, - val minTimestamp: Optional, - val maxTimestamp: Optional, - val startSystime: Optional, - val endSystime: Optional, - val minSystime: Optional, - val maxSystime: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ElectricalPowerMeasurementClusterMeasurementRangeStruct ( + val measurementType: UInt, + val min: Long, + val max: Long, + val startTimestamp: Optional, + val endTimestamp: Optional, + val minTimestamp: Optional, + val maxTimestamp: Optional, + val startSystime: Optional, + val endSystime: Optional, + val minSystime: Optional, + val maxSystime: Optional) { + override fun toString(): String = buildString { append("ElectricalPowerMeasurementClusterMeasurementRangeStruct {\n") append("\tmeasurementType : $measurementType\n") append("\tmin : $min\n") @@ -59,37 +61,37 @@ class ElectricalPowerMeasurementClusterMeasurementRangeStruct( put(ContextSpecificTag(TAG_MIN), min) put(ContextSpecificTag(TAG_MAX), max) if (startTimestamp.isPresent) { - val optstartTimestamp = startTimestamp.get() - put(ContextSpecificTag(TAG_START_TIMESTAMP), optstartTimestamp) - } + val optstartTimestamp = startTimestamp.get() + put(ContextSpecificTag(TAG_START_TIMESTAMP), optstartTimestamp) + } if (endTimestamp.isPresent) { - val optendTimestamp = endTimestamp.get() - put(ContextSpecificTag(TAG_END_TIMESTAMP), optendTimestamp) - } + val optendTimestamp = endTimestamp.get() + put(ContextSpecificTag(TAG_END_TIMESTAMP), optendTimestamp) + } if (minTimestamp.isPresent) { - val optminTimestamp = minTimestamp.get() - put(ContextSpecificTag(TAG_MIN_TIMESTAMP), optminTimestamp) - } + val optminTimestamp = minTimestamp.get() + put(ContextSpecificTag(TAG_MIN_TIMESTAMP), optminTimestamp) + } if (maxTimestamp.isPresent) { - val optmaxTimestamp = maxTimestamp.get() - put(ContextSpecificTag(TAG_MAX_TIMESTAMP), optmaxTimestamp) - } + val optmaxTimestamp = maxTimestamp.get() + put(ContextSpecificTag(TAG_MAX_TIMESTAMP), optmaxTimestamp) + } if (startSystime.isPresent) { - val optstartSystime = startSystime.get() - put(ContextSpecificTag(TAG_START_SYSTIME), optstartSystime) - } + val optstartSystime = startSystime.get() + put(ContextSpecificTag(TAG_START_SYSTIME), optstartSystime) + } if (endSystime.isPresent) { - val optendSystime = endSystime.get() - put(ContextSpecificTag(TAG_END_SYSTIME), optendSystime) - } + val optendSystime = endSystime.get() + put(ContextSpecificTag(TAG_END_SYSTIME), optendSystime) + } if (minSystime.isPresent) { - val optminSystime = minSystime.get() - put(ContextSpecificTag(TAG_MIN_SYSTIME), optminSystime) - } + val optminSystime = minSystime.get() + put(ContextSpecificTag(TAG_MIN_SYSTIME), optminSystime) + } if (maxSystime.isPresent) { - val optmaxSystime = maxSystime.get() - put(ContextSpecificTag(TAG_MAX_SYSTIME), optmaxSystime) - } + val optmaxSystime = maxSystime.get() + put(ContextSpecificTag(TAG_MAX_SYSTIME), optmaxSystime) + } endStructure() } } @@ -107,78 +109,55 @@ class ElectricalPowerMeasurementClusterMeasurementRangeStruct( private const val TAG_MIN_SYSTIME = 9 private const val TAG_MAX_SYSTIME = 10 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ElectricalPowerMeasurementClusterMeasurementRangeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ElectricalPowerMeasurementClusterMeasurementRangeStruct { tlvReader.enterStructure(tlvTag) val measurementType = tlvReader.getUInt(ContextSpecificTag(TAG_MEASUREMENT_TYPE)) val min = tlvReader.getLong(ContextSpecificTag(TAG_MIN)) val max = tlvReader.getLong(ContextSpecificTag(TAG_MAX)) - val startTimestamp = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_TIMESTAMP))) - } else { - Optional.empty() - } - val endTimestamp = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_TIMESTAMP))) - } else { - Optional.empty() - } - val minTimestamp = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_TIMESTAMP))) - } else { - Optional.empty() - } - val maxTimestamp = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_TIMESTAMP))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_TIMESTAMP))) - } else { - Optional.empty() - } - val startSystime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_SYSTIME))) - } else { - Optional.empty() - } - val endSystime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_SYSTIME))) - } else { - Optional.empty() - } - val minSystime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_SYSTIME))) - } else { - Optional.empty() - } - val maxSystime = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_SYSTIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_SYSTIME))) - } else { - Optional.empty() - } - + val startTimestamp = if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_TIMESTAMP))) + } else { + Optional.empty() + } + val endTimestamp = if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_TIMESTAMP))) + } else { + Optional.empty() + } + val minTimestamp = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_TIMESTAMP))) + } else { + Optional.empty() + } + val maxTimestamp = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_TIMESTAMP))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_TIMESTAMP))) + } else { + Optional.empty() + } + val startSystime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_START_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_START_SYSTIME))) + } else { + Optional.empty() + } + val endSystime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_END_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_END_SYSTIME))) + } else { + Optional.empty() + } + val minSystime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_SYSTIME))) + } else { + Optional.empty() + } + val maxSystime = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_SYSTIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_SYSTIME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ElectricalPowerMeasurementClusterMeasurementRangeStruct( - measurementType, - min, - max, - startTimestamp, - endTimestamp, - minTimestamp, - maxTimestamp, - startSystime, - endSystime, - minSystime, - maxSystime, - ) + return ElectricalPowerMeasurementClusterMeasurementRangeStruct(measurementType, min, max, startTimestamp, endTimestamp, minTimestamp, maxTimestamp, startSystime, endSystime, minSystime, maxSystime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt index adf9332f760761..1fe6ccedd3ae38 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterChargingTargetScheduleStruct( - val dayOfWeekForSequence: UInt, - val chargingTargets: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterChargingTargetScheduleStruct ( + val dayOfWeekForSequence: UInt, + val chargingTargets: List) { + override fun toString(): String = buildString { append("EnergyEvseClusterChargingTargetScheduleStruct {\n") append("\tdayOfWeekForSequence : $dayOfWeekForSequence\n") append("\tchargingTargets : $chargingTargets\n") @@ -51,18 +53,17 @@ class EnergyEvseClusterChargingTargetScheduleStruct( private const val TAG_DAY_OF_WEEK_FOR_SEQUENCE = 0 private const val TAG_CHARGING_TARGETS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterChargingTargetScheduleStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterChargingTargetScheduleStruct { tlvReader.enterStructure(tlvTag) val dayOfWeekForSequence = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE)) - val chargingTargets = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CHARGING_TARGETS)) - while (!tlvReader.isEndOfContainer()) { - add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val chargingTargets = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CHARGING_TARGETS)) + while(!tlvReader.isEndOfContainer()) { + add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return EnergyEvseClusterChargingTargetScheduleStruct(dayOfWeekForSequence, chargingTargets) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt index 8f5d42e85068e2..1f87d383888f87 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseClusterChargingTargetStruct( - val targetTimeMinutesPastMidnight: UInt, - val targetSoC: Optional, - val addedEnergy: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseClusterChargingTargetStruct ( + val targetTimeMinutesPastMidnight: UInt, + val targetSoC: Optional, + val addedEnergy: Optional) { + override fun toString(): String = buildString { append("EnergyEvseClusterChargingTargetStruct {\n") append("\ttargetTimeMinutesPastMidnight : $targetTimeMinutesPastMidnight\n") append("\ttargetSoC : $targetSoC\n") @@ -41,13 +43,13 @@ class EnergyEvseClusterChargingTargetStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_TARGET_TIME_MINUTES_PAST_MIDNIGHT), targetTimeMinutesPastMidnight) if (targetSoC.isPresent) { - val opttargetSoC = targetSoC.get() - put(ContextSpecificTag(TAG_TARGET_SO_C), opttargetSoC) - } + val opttargetSoC = targetSoC.get() + put(ContextSpecificTag(TAG_TARGET_SO_C), opttargetSoC) + } if (addedEnergy.isPresent) { - val optaddedEnergy = addedEnergy.get() - put(ContextSpecificTag(TAG_ADDED_ENERGY), optaddedEnergy) - } + val optaddedEnergy = addedEnergy.get() + put(ContextSpecificTag(TAG_ADDED_ENERGY), optaddedEnergy) + } endStructure() } } @@ -57,30 +59,23 @@ class EnergyEvseClusterChargingTargetStruct( private const val TAG_TARGET_SO_C = 1 private const val TAG_ADDED_ENERGY = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterChargingTargetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseClusterChargingTargetStruct { tlvReader.enterStructure(tlvTag) - val targetTimeMinutesPastMidnight = - tlvReader.getUInt(ContextSpecificTag(TAG_TARGET_TIME_MINUTES_PAST_MIDNIGHT)) - val targetSoC = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TARGET_SO_C))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TARGET_SO_C))) - } else { - Optional.empty() - } - val addedEnergy = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ADDED_ENERGY))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_ADDED_ENERGY))) - } else { - Optional.empty() - } - + val targetTimeMinutesPastMidnight = tlvReader.getUInt(ContextSpecificTag(TAG_TARGET_TIME_MINUTES_PAST_MIDNIGHT)) + val targetSoC = if (tlvReader.isNextTag(ContextSpecificTag(TAG_TARGET_SO_C))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TARGET_SO_C))) + } else { + Optional.empty() + } + val addedEnergy = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ADDED_ENERGY))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_ADDED_ENERGY))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return EnergyEvseClusterChargingTargetStruct( - targetTimeMinutesPastMidnight, - targetSoC, - addedEnergy, - ) + return EnergyEvseClusterChargingTargetStruct(targetTimeMinutesPastMidnight, targetSoC, addedEnergy) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeOptionStruct.kt index 7f44f754101807..266d62d59d595f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("EnergyEvseModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class EnergyEvseModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(EnergyEvseModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(EnergyEvseModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return EnergyEvseModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeTagStruct.kt index 44073906d8afdc..eeddfd3a6f0736 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyEvseModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyEvseModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("EnergyEvseModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class EnergyEvseModeClusterModeTagStruct(val mfgCode: Optional, val value: tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class EnergyEvseModeClusterModeTagStruct(val mfgCode: Optional, val value: private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : EnergyEvseModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return EnergyEvseModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt index 75f77558f0e982..677ef98e62f19c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class EnergyPreferenceClusterBalanceStruct(val step: UInt, val label: Optional) { - override fun toString(): String = buildString { +import java.util.Optional + +class EnergyPreferenceClusterBalanceStruct ( + val step: UInt, + val label: Optional) { + override fun toString(): String = buildString { append("EnergyPreferenceClusterBalanceStruct {\n") append("\tstep : $step\n") append("\tlabel : $label\n") @@ -36,9 +41,9 @@ class EnergyPreferenceClusterBalanceStruct(val step: UInt, val label: Optional, - val IPv6Addresses: List, - val type: UInt, -) { - override fun toString(): String = buildString { +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: UInt) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkInterface {\n") append("\tname : $name\n") append("\tisOperational : $isOperational\n") @@ -52,21 +54,15 @@ 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) startArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) for (item in IPv4Addresses.iterator()) { @@ -93,55 +89,42 @@ class GeneralDiagnosticsClusterNetworkInterface( private const val TAG_I_PV6_ADDRESSES = 6 private const val TAG_TYPE = 7 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkInterface { tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) - val offPremiseServicesReachableIPv4 = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - null - } - val offPremiseServicesReachableIPv6 = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - null - } + val offPremiseServicesReachableIPv4 = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) - val IPv4Addresses = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val IPv6Addresses = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } + val IPv4Addresses = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) - + tlvReader.exitContainer() - return GeneralDiagnosticsClusterNetworkInterface( - name, - isOperational, - offPremiseServicesReachableIPv4, - offPremiseServicesReachableIPv6, - hardwareAddress, - IPv4Addresses, - IPv6Addresses, - type, - ) + 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 8e6d952a19ddd9..72cf67168df8e4 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 @@ -17,20 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GroupKeyManagementClusterGroupInfoMapStruct( - val groupId: UInt, - val endpoints: List, - val groupName: Optional, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupInfoMapStruct ( + val groupId: UInt, + val endpoints: List, + val groupName: Optional, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") append("\tgroupId : $groupId\n") append("\tendpoints : $endpoints\n") @@ -49,9 +50,9 @@ class GroupKeyManagementClusterGroupInfoMapStruct( } endArray() 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() } @@ -63,25 +64,23 @@ class GroupKeyManagementClusterGroupInfoMapStruct( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupInfoMapStruct { tlvReader.enterStructure(tlvTag) val groupId = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_ID)) - val endpoints = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(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.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(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.getUInt(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 ec1ba8a3efcda2..71d7c3ca4cb959 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GroupKeyManagementClusterGroupKeyMapStruct( - val groupId: UInt, - val groupKeySetID: UInt, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupKeyMapStruct ( + val groupId: UInt, + val groupKeySetID: UInt, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") append("\tgroupId : $groupId\n") append("\tgroupKeySetID : $groupKeySetID\n") @@ -50,12 +53,12 @@ class GroupKeyManagementClusterGroupKeyMapStruct( private const val TAG_GROUP_KEY_SET_I_D = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeyMapStruct { tlvReader.enterStructure(tlvTag) val groupId = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_ID)) val groupKeySetID = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() 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 e59269a8823c94..2eee6ef47d3353 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,22 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class GroupKeyManagementClusterGroupKeySetStruct( - val groupKeySetID: UInt, - val groupKeySecurityPolicy: UInt, - val epochKey0: ByteArray?, - val epochStartTime0: ULong?, - val epochKey1: ByteArray?, - val epochStartTime1: ULong?, - val epochKey2: ByteArray?, - val epochStartTime2: ULong?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupKeySetStruct ( + val groupKeySetID: UInt, + val groupKeySecurityPolicy: UInt, + val epochKey0: ByteArray?, + val epochStartTime0: ULong?, + val epochKey1: ByteArray?, + val epochStartTime1: ULong?, + val epochKey2: ByteArray?, + val epochStartTime2: ULong?) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeySetStruct {\n") append("\tgroupKeySetID : $groupKeySetID\n") append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") @@ -51,35 +54,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() } } @@ -94,66 +97,50 @@ class GroupKeyManagementClusterGroupKeySetStruct( private const val TAG_EPOCH_KEY2 = 6 private const val TAG_EPOCH_START_TIME2 = 7 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeySetStruct { tlvReader.enterStructure(tlvTag) val groupKeySetID = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val groupKeySecurityPolicy = - tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) - val epochKey0 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - null - } - val epochStartTime0 = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - null - } - val epochKey1 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - null - } - val epochStartTime1 = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - null - } - val epochKey2 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - null - } - val epochStartTime2 = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - null - } - + val groupKeySecurityPolicy = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + tlvReader.exitContainer() - return GroupKeyManagementClusterGroupKeySetStruct( - groupKeySetID, - groupKeySecurityPolicy, - epochKey0, - epochStartTime0, - epochKey1, - epochStartTime1, - epochKey2, - epochStartTime2, - ) + 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 ff92f67d18c197..a5e79f7e076234 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class HepaFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: UInt, - val productIdentifierValue: String, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class HepaFilterMonitoringClusterReplacementProductStruct ( + val productIdentifierType: UInt, + val productIdentifierValue: String) { + override fun toString(): String = buildString { append("HepaFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -46,21 +49,14 @@ class HepaFilterMonitoringClusterReplacementProductStruct( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): HepaFilterMonitoringClusterReplacementProductStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : HepaFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tlvTag) val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + 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 8c8a7dcc410261..73b5b688af77c2 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class IcdManagementClusterMonitoringRegistrationStruct( - val checkInNodeID: ULong, - val monitoredSubject: ULong, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class IcdManagementClusterMonitoringRegistrationStruct ( + val checkInNodeID: ULong, + val monitoredSubject: ULong, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") append("\tcheckInNodeID : $checkInNodeID\n") append("\tmonitoredSubject : $monitoredSubject\n") @@ -50,22 +53,15 @@ class IcdManagementClusterMonitoringRegistrationStruct( private const val TAG_MONITORED_SUBJECT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): IcdManagementClusterMonitoringRegistrationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : IcdManagementClusterMonitoringRegistrationStruct { tlvReader.enterStructure(tlvTag) val checkInNodeID = tlvReader.getULong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) val monitoredSubject = tlvReader.getULong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return IcdManagementClusterMonitoringRegistrationStruct( - checkInNodeID, - monitoredSubject, - fabricIndex, - ) + return IcdManagementClusterMonitoringRegistrationStruct(checkInNodeID, monitoredSubject, 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 74469208470e1b..539ddd1fe657ec 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,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class LaundryWasherModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class LaundryWasherModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class LaundryWasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index 09c2915126efd6..f5e971f19259ee 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,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class LaundryWasherModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val val tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val val private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return LaundryWasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt index 141082398ace2c..a1e171a4805248 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,18 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MediaInputClusterInputInfoStruct( - val index: UInt, - val inputType: UInt, - val name: String, - val description: String, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaInputClusterInputInfoStruct ( + val index: UInt, + val inputType: UInt, + val name: String, + val description: String) { + override fun toString(): String = buildString { append("MediaInputClusterInputInfoStruct {\n") append("\tindex : $index\n") append("\tinputType : $inputType\n") @@ -54,13 +57,13 @@ class MediaInputClusterInputInfoStruct( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaInputClusterInputInfoStruct { tlvReader.enterStructure(tlvTag) val index = tlvReader.getUInt(ContextSpecificTag(TAG_INDEX)) val inputType = tlvReader.getUInt(ContextSpecificTag(TAG_INPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) - + 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 c58c381f8d6e14..a41c94eb25f23b 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: ULong, val position: ULong?) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaPlaybackClusterPlaybackPositionStruct ( + val updatedAt: ULong, + val position: ULong?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") append("\tposition : $position\n") @@ -35,10 +41,10 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: ULong, val posit startStructure(tlvTag) 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() } } @@ -47,17 +53,16 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: ULong, val posit private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterPlaybackPositionStruct { tlvReader.enterStructure(tlvTag) val updatedAt = tlvReader.getULong(ContextSpecificTag(TAG_UPDATED_AT)) - val position = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_POSITION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) - null - } - + val position = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt index 93f88ff2afe2bb..85afda84daca8d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackAttributesStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MediaPlaybackClusterTrackAttributesStruct( - val languageCode: String, - val displayName: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaPlaybackClusterTrackAttributesStruct ( + val languageCode: String, + val displayName: Optional?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterTrackAttributesStruct {\n") append("\tlanguageCode : $languageCode\n") append("\tdisplayName : $displayName\n") @@ -39,13 +41,13 @@ class MediaPlaybackClusterTrackAttributesStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_LANGUAGE_CODE), languageCode) if (displayName != null) { - if (displayName.isPresent) { - val optdisplayName = displayName.get() - put(ContextSpecificTag(TAG_DISPLAY_NAME), optdisplayName) - } - } else { - putNull(ContextSpecificTag(TAG_DISPLAY_NAME)) - } + if (displayName.isPresent) { + val optdisplayName = displayName.get() + put(ContextSpecificTag(TAG_DISPLAY_NAME), optdisplayName) + } + } else { + putNull(ContextSpecificTag(TAG_DISPLAY_NAME)) + } endStructure() } } @@ -54,21 +56,20 @@ class MediaPlaybackClusterTrackAttributesStruct( private const val TAG_LANGUAGE_CODE = 0 private const val TAG_DISPLAY_NAME = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterTrackAttributesStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterTrackAttributesStruct { tlvReader.enterStructure(tlvTag) val languageCode = tlvReader.getString(ContextSpecificTag(TAG_LANGUAGE_CODE)) - val displayName = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_DISPLAY_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DISPLAY_NAME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DISPLAY_NAME)) - null - } - + val displayName = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_DISPLAY_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DISPLAY_NAME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DISPLAY_NAME)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterTrackAttributesStruct(languageCode, displayName) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt index e840daf0fbedfb..cca4fa751f8d8d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MediaPlaybackClusterTrackStruct( - val id: String, - val trackAttributes: MediaPlaybackClusterTrackAttributesStruct?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaPlaybackClusterTrackStruct ( + val id: String, + val trackAttributes: MediaPlaybackClusterTrackAttributesStruct?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterTrackStruct {\n") append("\tid : $id\n") append("\ttrackAttributes : $trackAttributes\n") @@ -38,10 +41,10 @@ class MediaPlaybackClusterTrackStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) if (trackAttributes != null) { - trackAttributes.toTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), this) - } else { - putNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) - } + trackAttributes.toTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), this) + } else { + putNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) + } endStructure() } } @@ -50,20 +53,16 @@ class MediaPlaybackClusterTrackStruct( private const val TAG_ID = 0 private const val TAG_TRACK_ATTRIBUTES = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterTrackStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterTrackStruct { tlvReader.enterStructure(tlvTag) val id = tlvReader.getString(ContextSpecificTag(TAG_ID)) - val trackAttributes = - if (!tlvReader.isNull()) { - MediaPlaybackClusterTrackAttributesStruct.fromTlv( - ContextSpecificTag(TAG_TRACK_ATTRIBUTES), - tlvReader, - ) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) - null - } - + val trackAttributes = if (!tlvReader.isNull()) { + MediaPlaybackClusterTrackAttributesStruct.fromTlv(ContextSpecificTag(TAG_TRACK_ATTRIBUTES), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TRACK_ATTRIBUTES)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterTrackStruct(id, trackAttributes) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageResponseOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageResponseOptionStruct.kt index b8707df67125c1..cad8930f67659d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageResponseOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageResponseOptionStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MessagesClusterMessageResponseOptionStruct( - val messageResponseID: Optional, - val label: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MessagesClusterMessageResponseOptionStruct ( + val messageResponseID: Optional, + val label: Optional) { + override fun toString(): String = buildString { append("MessagesClusterMessageResponseOptionStruct {\n") append("\tmessageResponseID : $messageResponseID\n") append("\tlabel : $label\n") @@ -38,13 +40,13 @@ class MessagesClusterMessageResponseOptionStruct( tlvWriter.apply { startStructure(tlvTag) if (messageResponseID.isPresent) { - val optmessageResponseID = messageResponseID.get() - put(ContextSpecificTag(TAG_MESSAGE_RESPONSE_I_D), optmessageResponseID) - } + val optmessageResponseID = messageResponseID.get() + put(ContextSpecificTag(TAG_MESSAGE_RESPONSE_I_D), optmessageResponseID) + } if (label.isPresent) { - val optlabel = label.get() - put(ContextSpecificTag(TAG_LABEL), optlabel) - } + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } endStructure() } } @@ -53,21 +55,19 @@ class MessagesClusterMessageResponseOptionStruct( private const val TAG_MESSAGE_RESPONSE_I_D = 0 private const val TAG_LABEL = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MessagesClusterMessageResponseOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MessagesClusterMessageResponseOptionStruct { tlvReader.enterStructure(tlvTag) - val messageResponseID = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MESSAGE_RESPONSE_I_D))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MESSAGE_RESPONSE_I_D))) - } else { - Optional.empty() - } - val label = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - + val messageResponseID = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MESSAGE_RESPONSE_I_D))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MESSAGE_RESPONSE_I_D))) + } else { + Optional.empty() + } + val label = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return MessagesClusterMessageResponseOptionStruct(messageResponseID, label) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt index 6ad4f41ee313b2..9f323d4acaf6d3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt @@ -17,23 +17,24 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MessagesClusterMessageStruct( - val messageID: ByteArray, - val priority: UInt, - val messageControl: UInt, - val startTime: ULong?, - val duration: ULong?, - val messageText: String, - val responses: Optional>, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MessagesClusterMessageStruct ( + val messageID: ByteArray, + val priority: UInt, + val messageControl: UInt, + val startTime: ULong?, + val duration: ULong?, + val messageText: String, + val responses: Optional>) { + override fun toString(): String = buildString { append("MessagesClusterMessageStruct {\n") append("\tmessageID : $messageID\n") append("\tpriority : $priority\n") @@ -52,24 +53,24 @@ class MessagesClusterMessageStruct( put(ContextSpecificTag(TAG_PRIORITY), priority) put(ContextSpecificTag(TAG_MESSAGE_CONTROL), messageControl) if (startTime != null) { - put(ContextSpecificTag(TAG_START_TIME), startTime) - } else { - putNull(ContextSpecificTag(TAG_START_TIME)) - } + put(ContextSpecificTag(TAG_START_TIME), startTime) + } else { + putNull(ContextSpecificTag(TAG_START_TIME)) + } if (duration != null) { - put(ContextSpecificTag(TAG_DURATION), duration) - } else { - putNull(ContextSpecificTag(TAG_DURATION)) - } + put(ContextSpecificTag(TAG_DURATION), duration) + } else { + putNull(ContextSpecificTag(TAG_DURATION)) + } put(ContextSpecificTag(TAG_MESSAGE_TEXT), messageText) if (responses.isPresent) { - val optresponses = responses.get() - startArray(ContextSpecificTag(TAG_RESPONSES)) - for (item in optresponses.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() + val optresponses = responses.get() + startArray(ContextSpecificTag(TAG_RESPONSES)) + for (item in optresponses.iterator()) { + item.toTlv(AnonymousTag, this) } + endArray() + } endStructure() } } @@ -83,52 +84,39 @@ class MessagesClusterMessageStruct( private const val TAG_MESSAGE_TEXT = 5 private const val TAG_RESPONSES = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MessagesClusterMessageStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MessagesClusterMessageStruct { tlvReader.enterStructure(tlvTag) val messageID = tlvReader.getByteArray(ContextSpecificTag(TAG_MESSAGE_I_D)) val priority = tlvReader.getUInt(ContextSpecificTag(TAG_PRIORITY)) val messageControl = tlvReader.getUInt(ContextSpecificTag(TAG_MESSAGE_CONTROL)) - val startTime = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_START_TIME)) - null - } - val duration = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DURATION)) - null - } + val startTime = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_START_TIME)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_START_TIME)) + null + } + val duration = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_DURATION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DURATION)) + null + } val messageText = tlvReader.getString(ContextSpecificTag(TAG_MESSAGE_TEXT)) - val responses = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_RESPONSES))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_RESPONSES)) - while (!tlvReader.isEndOfContainer()) { - add(MessagesClusterMessageResponseOptionStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - + val responses = if (tlvReader.isNextTag(ContextSpecificTag(TAG_RESPONSES))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_RESPONSES)) + while(!tlvReader.isEndOfContainer()) { + add(MessagesClusterMessageResponseOptionStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return MessagesClusterMessageStruct( - messageID, - priority, - messageControl, - startTime, - duration, - messageText, - responses, - ) + return MessagesClusterMessageStruct(messageID, priority, messageControl, startTime, duration, messageText, responses) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt index f270d5f1fb72bd..504a72e24e3598 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MicrowaveOvenModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MicrowaveOvenModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("MicrowaveOvenModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class MicrowaveOvenModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MicrowaveOvenModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MicrowaveOvenModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(MicrowaveOvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(MicrowaveOvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return MicrowaveOvenModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt index bf9800a012de5f..4459562dcadcf3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class MicrowaveOvenModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class MicrowaveOvenModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("MicrowaveOvenModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class MicrowaveOvenModeClusterModeTagStruct(val mfgCode: Optional, val val tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class MicrowaveOvenModeClusterModeTagStruct(val mfgCode: Optional, val val private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MicrowaveOvenModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MicrowaveOvenModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return MicrowaveOvenModeClusterModeTagStruct(mfgCode, value) 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 bde737c8d6b577..6613c8f6988cc6 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,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ModeSelectClusterModeOptionStruct( - val label: String, - val mode: UInt, - val semanticTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ModeSelectClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val semanticTags: List) { + override fun toString(): String = buildString { append("ModeSelectClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class ModeSelectClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ModeSelectClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val semanticTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val semanticTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index ca14c2ebd4d8dc..2b501b089a5d8e 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ModeSelectClusterSemanticTagStruct(val mfgCode: UInt, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class ModeSelectClusterSemanticTagStruct ( + val mfgCode: UInt, + val value: UInt) { + override fun toString(): String = buildString { append("ModeSelectClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class ModeSelectClusterSemanticTagStruct(val mfgCode: UInt, val value: UInt) { private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ModeSelectClusterSemanticTagStruct { tlvReader.enterStructure(tlvTag) val mfgCode = tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() 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 6d120b2c6e9215..78e54129ba293a 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,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class NetworkCommissioningClusterNetworkInfoStruct( - val networkID: ByteArray, - val connected: Boolean, - val networkIdentifier: Optional?, - val clientIdentifier: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterNetworkInfoStruct ( + val networkID: ByteArray, + val connected: Boolean, + val networkIdentifier: Optional?, + val clientIdentifier: Optional?) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") @@ -44,21 +46,21 @@ class NetworkCommissioningClusterNetworkInfoStruct( put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) put(ContextSpecificTag(TAG_CONNECTED), connected) if (networkIdentifier != null) { - if (networkIdentifier.isPresent) { - val optnetworkIdentifier = networkIdentifier.get() - put(ContextSpecificTag(TAG_NETWORK_IDENTIFIER), optnetworkIdentifier) - } - } else { - putNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) - } + if (networkIdentifier.isPresent) { + val optnetworkIdentifier = networkIdentifier.get() + put(ContextSpecificTag(TAG_NETWORK_IDENTIFIER), optnetworkIdentifier) + } + } else { + putNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) + } if (clientIdentifier != null) { - if (clientIdentifier.isPresent) { - val optclientIdentifier = clientIdentifier.get() - put(ContextSpecificTag(TAG_CLIENT_IDENTIFIER), optclientIdentifier) - } - } else { - putNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) - } + if (clientIdentifier.isPresent) { + val optclientIdentifier = clientIdentifier.get() + put(ContextSpecificTag(TAG_CLIENT_IDENTIFIER), optclientIdentifier) + } + } else { + putNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) + } endStructure() } } @@ -69,41 +71,34 @@ class NetworkCommissioningClusterNetworkInfoStruct( private const val TAG_NETWORK_IDENTIFIER = 2 private const val TAG_CLIENT_IDENTIFIER = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tlvTag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) - val networkIdentifier = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) - null - } - val clientIdentifier = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) - null - } - + val networkIdentifier = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_IDENTIFIER))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NETWORK_IDENTIFIER)) + null + } + val clientIdentifier = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_IDENTIFIER))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLIENT_IDENTIFIER)) + null + } + tlvReader.exitContainer() - return NetworkCommissioningClusterNetworkInfoStruct( - networkID, - connected, - networkIdentifier, - clientIdentifier, - ) + return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected, networkIdentifier, clientIdentifier) } } } 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 be91e7de117890..01d987d0125f0f 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,22 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class NetworkCommissioningClusterThreadInterfaceScanResultStruct( - val panId: UInt, - val extendedPanId: ULong, - val networkName: String, - val channel: UInt, - val version: UInt, - val extendedAddress: ByteArray, - val rssi: Int, - val lqi: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( + val panId: UInt, + val extendedPanId: ULong, + val networkName: String, + val channel: UInt, + val version: UInt, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: UInt) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") append("\tpanId : $panId\n") append("\textendedPanId : $extendedPanId\n") @@ -70,10 +73,7 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( private const val TAG_RSSI = 6 private const val TAG_LQI = 7 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterThreadInterfaceScanResultStruct { tlvReader.enterStructure(tlvTag) val panId = tlvReader.getUInt(ContextSpecificTag(TAG_PAN_ID)) val extendedPanId = tlvReader.getULong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) @@ -83,19 +83,10 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) val lqi = tlvReader.getUInt(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 142c776ba904dd..8bdbd11bbc322c 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,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( - val security: UInt, - val ssid: ByteArray, - val bssid: ByteArray, - val channel: UInt, - val wiFiBand: UInt, - val rssi: Int, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( + val security: UInt, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: UInt, + val wiFiBand: UInt, + val rssi: Int) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") append("\tsecurity : $security\n") append("\tssid : $ssid\n") @@ -62,10 +65,7 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( private const val TAG_WI_FI_BAND = 4 private const val TAG_RSSI = 5 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterWiFiInterfaceScanResultStruct { tlvReader.enterStructure(tlvTag) val security = tlvReader.getUInt(ContextSpecificTag(TAG_SECURITY)) val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) @@ -73,17 +73,10 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( val channel = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL)) val wiFiBand = tlvReader.getUInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - + tlvReader.exitContainer() - 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 5d2af6b6862ffa..de9d80b7482140 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,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OperationalCredentialsClusterFabricDescriptorStruct( - val rootPublicKey: ByteArray, - val vendorID: UInt, - val fabricID: ULong, - val nodeID: ULong, - val label: String, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalCredentialsClusterFabricDescriptorStruct ( + val rootPublicKey: ByteArray, + val vendorID: UInt, + val fabricID: ULong, + val nodeID: ULong, + val label: String, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterFabricDescriptorStruct {\n") append("\trootPublicKey : $rootPublicKey\n") append("\tvendorID : $vendorID\n") @@ -62,10 +65,7 @@ class OperationalCredentialsClusterFabricDescriptorStruct( private const val TAG_LABEL = 5 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OperationalCredentialsClusterFabricDescriptorStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterFabricDescriptorStruct { tlvReader.enterStructure(tlvTag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) val vendorID = tlvReader.getUInt(ContextSpecificTag(TAG_VENDOR_I_D)) @@ -73,17 +73,10 @@ class OperationalCredentialsClusterFabricDescriptorStruct( val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val fabricIndex = tlvReader.getUInt(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 266ab471fa0d10..2013bec14e74b5 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OperationalCredentialsClusterNOCStruct( - val noc: ByteArray, - val icac: ByteArray?, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalCredentialsClusterNOCStruct ( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") append("\tnoc : $noc\n") append("\ticac : $icac\n") @@ -40,10 +43,10 @@ class OperationalCredentialsClusterNOCStruct( startStructure(tlvTag) 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() } @@ -54,18 +57,17 @@ class OperationalCredentialsClusterNOCStruct( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterNOCStruct { tlvReader.enterStructure(tlvTag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) - val icac = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) - null - } + val icac = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } val fabricIndex = tlvReader.getUInt(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 c2a0b9a58dc85d..6078c84c862ae8 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,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OperationalStateClusterErrorStateStruct( - val errorStateID: UInt, - val errorStateLabel: Optional, - val errorStateDetails: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalStateClusterErrorStateStruct ( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("OperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class OperationalStateClusterErrorStateStruct( startStructure(tlvTag) 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() } } @@ -57,29 +59,23 @@ class OperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tlvTag) val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + 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 558446e0811069..e464504d71b4f1 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,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OperationalStateClusterOperationalStateStruct( - val operationalStateID: UInt, - val operationalStateLabel: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalStateClusterOperationalStateStruct ( + val operationalStateID: UInt, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class OperationalStateClusterOperationalStateStruct( startStructure(tlvTag) 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() } } @@ -50,22 +52,18 @@ class OperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tlvTag) val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + 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 25e6467fff7370..7f80ca90ed8c9f 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterProviderLocation( - val providerNodeID: ULong, - val endpoint: UInt, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterProviderLocation ( + val providerNodeID: ULong, + val endpoint: UInt, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") append("\tproviderNodeID : $providerNodeID\n") append("\tendpoint : $endpoint\n") @@ -50,22 +53,15 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OtaSoftwareUpdateRequestorClusterProviderLocation { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterProviderLocation { tlvReader.enterStructure(tlvTag) val providerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterProviderLocation( - providerNodeID, - endpoint, - fabricIndex, - ) + return OtaSoftwareUpdateRequestorClusterProviderLocation(providerNodeID, endpoint, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterErrorStateStruct.kt index 741be20fc83f17..8844263c96a1ce 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterErrorStateStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OvenCavityOperationalStateClusterErrorStateStruct( - val errorStateID: UInt, - val errorStateLabel: Optional, - val errorStateDetails: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OvenCavityOperationalStateClusterErrorStateStruct ( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("OvenCavityOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class OvenCavityOperationalStateClusterErrorStateStruct( startStructure(tlvTag) 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() } } @@ -57,32 +59,23 @@ class OvenCavityOperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OvenCavityOperationalStateClusterErrorStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OvenCavityOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tlvTag) val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + 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 OvenCavityOperationalStateClusterErrorStateStruct( - errorStateID, - errorStateLabel, - errorStateDetails, - ) + return OvenCavityOperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterOperationalStateStruct.kt index b8cc6c5082de96..6d815321e7cb46 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenCavityOperationalStateClusterOperationalStateStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OvenCavityOperationalStateClusterOperationalStateStruct( - val operationalStateID: UInt, - val operationalStateLabel: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OvenCavityOperationalStateClusterOperationalStateStruct ( + val operationalStateID: UInt, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("OvenCavityOperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class OvenCavityOperationalStateClusterOperationalStateStruct( startStructure(tlvTag) 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() } } @@ -50,25 +52,18 @@ class OvenCavityOperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): OvenCavityOperationalStateClusterOperationalStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OvenCavityOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tlvTag) val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + 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 OvenCavityOperationalStateClusterOperationalStateStruct( - operationalStateID, - operationalStateLabel, - ) + return OvenCavityOperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt index ea77ce02c21eea..4698441672eae2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OvenModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OvenModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("OvenModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class OvenModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OvenModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OvenModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(OvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(OvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return OvenModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt index df0465b2c3055d..9c204fa8ecb2ea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class OvenModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class OvenModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("OvenModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class OvenModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class OvenModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OvenModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OvenModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return OvenModeClusterModeTagStruct(mfgCode, value) 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 541b2c074bbdc0..c24d47fe4b23ee 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,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class PowerSourceClusterBatChargeFaultChangeType( - val current: List, - val previous: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatChargeFaultChangeType ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,25 +57,23 @@ class PowerSourceClusterBatChargeFaultChangeType( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeType { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt index 07ed4351bcd3a1..789a1f0a36c47c 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,11 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatFaultChangeType ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterBatFaultChangeType(val current: List, val previous private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeType { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt index f0c80ef26ff5ad..849c0b2edfc454 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,11 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterWiredFaultChangeType ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterWiredFaultChangeType(val current: List, val previo private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeType { tlvReader.enterStructure(tlvTag) - val current = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt index de3bed5eb8f9e2..74809e3ae5215c 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,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,34 +57,21 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add( - RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( - AnonymousTag, - tlvReader, - ) - ) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( - label, - mode, - modeTags, - ) + 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 b7a225247ff958..0831587768d6a3 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,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( - val mfgCode: Optional, - val value: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -38,9 +40,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( tlvWriter.apply { startStructure(tlvTag) 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() } @@ -50,19 +52,15 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt index 18fd66e03483e0..d4cf5dd09a6214 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,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcCleanModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcCleanModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class RvcCleanModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index a06d26774dacc6..7c293c839acb4f 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,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcCleanModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: U tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: U private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcCleanModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt index c9cbcef3190287..15f9250edbe478 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,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcOperationalStateClusterErrorStateStruct( - val errorStateID: UInt, - val errorStateLabel: Optional, - val errorStateDetails: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcOperationalStateClusterErrorStateStruct ( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class RvcOperationalStateClusterErrorStateStruct( startStructure(tlvTag) 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() } } @@ -57,29 +59,23 @@ class RvcOperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tlvTag) val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + 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 d91e485a254c7e..930daff7a6d833 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,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcOperationalStateClusterOperationalStateStruct( - val operationalStateID: UInt, - val operationalStateLabel: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcOperationalStateClusterOperationalStateStruct ( + val operationalStateID: UInt, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class RvcOperationalStateClusterOperationalStateStruct( startStructure(tlvTag) 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() } } @@ -50,25 +52,18 @@ class RvcOperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): RvcOperationalStateClusterOperationalStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tlvTag) val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + 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 1f1d3699753fc1..519546666e3b33 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,15 +20,17 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcRunModeClusterModeOptionStruct( - val label: String, - val mode: UInt, - val modeTags: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcRunModeClusterModeOptionStruct ( + val label: String, + val mode: UInt, + val modeTags: List) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class RvcRunModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index 4c32d28ee6ad67..c6183c3e89c585 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,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcRunModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: UInt) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: UIn tlvWriter.apply { startStructure(tlvTag) 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() } @@ -47,16 +52,15 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: UIn private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcRunModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt index 3cf9c98d53e6d1..58f02b50feda16 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesManagementClusterAttributeValuePair(val attributeID: ULong, val attributeValue: ULong) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesManagementClusterAttributeValuePair ( + val attributeID: ULong, + val attributeValue: ULong) { + override fun toString(): String = buildString { append("ScenesManagementClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") @@ -43,11 +49,11 @@ class ScenesManagementClusterAttributeValuePair(val attributeID: ULong, val attr private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterAttributeValuePair { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ScenesManagementClusterAttributeValuePair { tlvReader.enterStructure(tlvTag) val attributeID = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) - + tlvReader.exitContainer() return ScenesManagementClusterAttributeValuePair(attributeID, attributeValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt index 64bc8aff47ea55..6d4411c76baead 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesManagementClusterExtensionFieldSet( - val clusterID: ULong, - val attributeValueList: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesManagementClusterExtensionFieldSet ( + val clusterID: ULong, + val attributeValueList: List) { + override fun toString(): String = buildString { append("ScenesManagementClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") @@ -51,18 +53,17 @@ class ScenesManagementClusterExtensionFieldSet( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterExtensionFieldSet { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ScenesManagementClusterExtensionFieldSet { tlvReader.enterStructure(tlvTag) val clusterID = tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER_I_D)) - val attributeValueList = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ScenesManagementClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val attributeValueList = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ScenesManagementClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ScenesManagementClusterExtensionFieldSet(clusterID, attributeValueList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt index c18f64cb44bac3..3ac060b092b76a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt @@ -17,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesManagementClusterSceneInfoStruct( - val sceneCount: UInt, - val currentScene: UInt, - val currentGroup: UInt, - val sceneValid: Boolean, - val remainingCapacity: UInt, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesManagementClusterSceneInfoStruct ( + val sceneCount: UInt, + val currentScene: UInt, + val currentGroup: UInt, + val sceneValid: Boolean, + val remainingCapacity: UInt, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("ScenesManagementClusterSceneInfoStruct {\n") append("\tsceneCount : $sceneCount\n") append("\tcurrentScene : $currentScene\n") @@ -62,7 +65,7 @@ class ScenesManagementClusterSceneInfoStruct( private const val TAG_REMAINING_CAPACITY = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterSceneInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ScenesManagementClusterSceneInfoStruct { tlvReader.enterStructure(tlvTag) val sceneCount = tlvReader.getUInt(ContextSpecificTag(TAG_SCENE_COUNT)) val currentScene = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_SCENE)) @@ -70,17 +73,10 @@ class ScenesManagementClusterSceneInfoStruct( val sceneValid = tlvReader.getBoolean(ContextSpecificTag(TAG_SCENE_VALID)) val remainingCapacity = tlvReader.getUInt(ContextSpecificTag(TAG_REMAINING_CAPACITY)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return ScenesManagementClusterSceneInfoStruct( - sceneCount, - currentScene, - currentGroup, - sceneValid, - remainingCapacity, - fabricIndex, - ) + return ScenesManagementClusterSceneInfoStruct(sceneCount, currentScene, currentGroup, sceneValid, remainingCapacity, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterHomeLocationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterHomeLocationStruct.kt index 4eb2b2ea14784e..71985c1b77fe51 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterHomeLocationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterHomeLocationStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterHomeLocationStruct( - val locationName: String, - val floorNumber: Int?, - val areaType: UInt?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ServiceAreaClusterHomeLocationStruct ( + val locationName: String, + val floorNumber: Int?, + val areaType: UInt?) { + override fun toString(): String = buildString { append("ServiceAreaClusterHomeLocationStruct {\n") append("\tlocationName : $locationName\n") append("\tfloorNumber : $floorNumber\n") @@ -40,15 +43,15 @@ class ServiceAreaClusterHomeLocationStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_LOCATION_NAME), locationName) if (floorNumber != null) { - put(ContextSpecificTag(TAG_FLOOR_NUMBER), floorNumber) - } else { - putNull(ContextSpecificTag(TAG_FLOOR_NUMBER)) - } + put(ContextSpecificTag(TAG_FLOOR_NUMBER), floorNumber) + } else { + putNull(ContextSpecificTag(TAG_FLOOR_NUMBER)) + } if (areaType != null) { - put(ContextSpecificTag(TAG_AREA_TYPE), areaType) - } else { - putNull(ContextSpecificTag(TAG_AREA_TYPE)) - } + put(ContextSpecificTag(TAG_AREA_TYPE), areaType) + } else { + putNull(ContextSpecificTag(TAG_AREA_TYPE)) + } endStructure() } } @@ -58,24 +61,22 @@ class ServiceAreaClusterHomeLocationStruct( private const val TAG_FLOOR_NUMBER = 1 private const val TAG_AREA_TYPE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterHomeLocationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ServiceAreaClusterHomeLocationStruct { tlvReader.enterStructure(tlvTag) val locationName = tlvReader.getString(ContextSpecificTag(TAG_LOCATION_NAME)) - val floorNumber = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FLOOR_NUMBER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FLOOR_NUMBER)) - null - } - val areaType = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_AREA_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AREA_TYPE)) - null - } - + val floorNumber = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FLOOR_NUMBER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FLOOR_NUMBER)) + null + } + val areaType = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_AREA_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AREA_TYPE)) + null + } + tlvReader.exitContainer() return ServiceAreaClusterHomeLocationStruct(locationName, floorNumber, areaType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt index c6137199382840..57cfd41996b33f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLocationInfoStruct( - val locationInfo: ServiceAreaClusterHomeLocationStruct?, - val landmarkTag: UInt?, - val positionTag: UInt?, - val surfaceTag: UInt?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ServiceAreaClusterLocationInfoStruct ( + val locationInfo: ServiceAreaClusterHomeLocationStruct?, + val landmarkTag: UInt?, + val positionTag: UInt?, + val surfaceTag: UInt?) { + override fun toString(): String = buildString { append("ServiceAreaClusterLocationInfoStruct {\n") append("\tlocationInfo : $locationInfo\n") append("\tlandmarkTag : $landmarkTag\n") @@ -41,25 +44,25 @@ class ServiceAreaClusterLocationInfoStruct( tlvWriter.apply { startStructure(tlvTag) if (locationInfo != null) { - locationInfo.toTlv(ContextSpecificTag(TAG_LOCATION_INFO), this) - } else { - putNull(ContextSpecificTag(TAG_LOCATION_INFO)) - } + locationInfo.toTlv(ContextSpecificTag(TAG_LOCATION_INFO), this) + } else { + putNull(ContextSpecificTag(TAG_LOCATION_INFO)) + } if (landmarkTag != null) { - put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag) - } else { - putNull(ContextSpecificTag(TAG_LANDMARK_TAG)) - } + put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag) + } else { + putNull(ContextSpecificTag(TAG_LANDMARK_TAG)) + } if (positionTag != null) { - put(ContextSpecificTag(TAG_POSITION_TAG), positionTag) - } else { - putNull(ContextSpecificTag(TAG_POSITION_TAG)) - } + put(ContextSpecificTag(TAG_POSITION_TAG), positionTag) + } else { + putNull(ContextSpecificTag(TAG_POSITION_TAG)) + } if (surfaceTag != null) { - put(ContextSpecificTag(TAG_SURFACE_TAG), surfaceTag) - } else { - putNull(ContextSpecificTag(TAG_SURFACE_TAG)) - } + put(ContextSpecificTag(TAG_SURFACE_TAG), surfaceTag) + } else { + putNull(ContextSpecificTag(TAG_SURFACE_TAG)) + } endStructure() } } @@ -70,48 +73,36 @@ class ServiceAreaClusterLocationInfoStruct( private const val TAG_POSITION_TAG = 2 private const val TAG_SURFACE_TAG = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLocationInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ServiceAreaClusterLocationInfoStruct { tlvReader.enterStructure(tlvTag) - val locationInfo = - if (!tlvReader.isNull()) { - ServiceAreaClusterHomeLocationStruct.fromTlv( - ContextSpecificTag(TAG_LOCATION_INFO), - tlvReader, - ) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LOCATION_INFO)) - null - } - val landmarkTag = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_LANDMARK_TAG)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LANDMARK_TAG)) - null - } - val positionTag = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_POSITION_TAG)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG)) - null - } - val surfaceTag = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_SURFACE_TAG)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SURFACE_TAG)) - null - } - + val locationInfo = if (!tlvReader.isNull()) { + ServiceAreaClusterHomeLocationStruct.fromTlv(ContextSpecificTag(TAG_LOCATION_INFO), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LOCATION_INFO)) + null + } + val landmarkTag = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_LANDMARK_TAG)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LANDMARK_TAG)) + null + } + val positionTag = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_POSITION_TAG)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG)) + null + } + val surfaceTag = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_SURFACE_TAG)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SURFACE_TAG)) + null + } + tlvReader.exitContainer() - return ServiceAreaClusterLocationInfoStruct( - locationInfo, - landmarkTag, - positionTag, - surfaceTag, - ) + return ServiceAreaClusterLocationInfoStruct(locationInfo, landmarkTag, positionTag, surfaceTag) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt index f77ae437cad74c..074a9179f5e742 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLocationStruct( - val locationID: ULong, - val mapID: UInt?, - val locationInfo: ServiceAreaClusterLocationInfoStruct, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ServiceAreaClusterLocationStruct ( + val locationID: ULong, + val mapID: UInt?, + val locationInfo: ServiceAreaClusterLocationInfoStruct) { + override fun toString(): String = buildString { append("ServiceAreaClusterLocationStruct {\n") append("\tlocationID : $locationID\n") append("\tmapID : $mapID\n") @@ -40,10 +43,10 @@ class ServiceAreaClusterLocationStruct( startStructure(tlvTag) put(ContextSpecificTag(TAG_LOCATION_I_D), locationID) if (mapID != null) { - put(ContextSpecificTag(TAG_MAP_I_D), mapID) - } else { - putNull(ContextSpecificTag(TAG_MAP_I_D)) - } + put(ContextSpecificTag(TAG_MAP_I_D), mapID) + } else { + putNull(ContextSpecificTag(TAG_MAP_I_D)) + } locationInfo.toTlv(ContextSpecificTag(TAG_LOCATION_INFO), this) endStructure() } @@ -54,22 +57,17 @@ class ServiceAreaClusterLocationStruct( private const val TAG_MAP_I_D = 1 private const val TAG_LOCATION_INFO = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLocationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ServiceAreaClusterLocationStruct { tlvReader.enterStructure(tlvTag) val locationID = tlvReader.getULong(ContextSpecificTag(TAG_LOCATION_I_D)) - val mapID = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MAP_I_D)) - null - } - val locationInfo = - ServiceAreaClusterLocationInfoStruct.fromTlv( - ContextSpecificTag(TAG_LOCATION_INFO), - tlvReader, - ) - + val mapID = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MAP_I_D)) + null + } + val locationInfo = ServiceAreaClusterLocationInfoStruct.fromTlv(ContextSpecificTag(TAG_LOCATION_INFO), tlvReader) + tlvReader.exitContainer() return ServiceAreaClusterLocationStruct(locationID, mapID, locationInfo) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt index 377ab13f0e9130..0f35fe46c7a21b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterMapStruct(val mapID: UInt, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class ServiceAreaClusterMapStruct ( + val mapID: UInt, + val name: String) { + override fun toString(): String = buildString { append("ServiceAreaClusterMapStruct {\n") append("\tmapID : $mapID\n") append("\tname : $name\n") @@ -43,11 +49,11 @@ class ServiceAreaClusterMapStruct(val mapID: UInt, val name: String) { private const val TAG_MAP_I_D = 0 private const val TAG_NAME = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterMapStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ServiceAreaClusterMapStruct { tlvReader.enterStructure(tlvTag) val mapID = tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return ServiceAreaClusterMapStruct(mapID, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt index b601af531e103d..73f6e69be8a9f3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterProgressStruct( - val locationID: ULong, - val status: UInt, - val totalOperationalTime: Optional?, - val estimatedTime: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ServiceAreaClusterProgressStruct ( + val locationID: ULong, + val status: UInt, + val totalOperationalTime: Optional?, + val estimatedTime: Optional?) { + override fun toString(): String = buildString { append("ServiceAreaClusterProgressStruct {\n") append("\tlocationID : $locationID\n") append("\tstatus : $status\n") @@ -44,21 +46,21 @@ class ServiceAreaClusterProgressStruct( put(ContextSpecificTag(TAG_LOCATION_I_D), locationID) put(ContextSpecificTag(TAG_STATUS), status) 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 (estimatedTime != null) { - if (estimatedTime.isPresent) { - val optestimatedTime = estimatedTime.get() - put(ContextSpecificTag(TAG_ESTIMATED_TIME), optestimatedTime) - } - } else { - putNull(ContextSpecificTag(TAG_ESTIMATED_TIME)) - } + if (estimatedTime.isPresent) { + val optestimatedTime = estimatedTime.get() + put(ContextSpecificTag(TAG_ESTIMATED_TIME), optestimatedTime) + } + } else { + putNull(ContextSpecificTag(TAG_ESTIMATED_TIME)) + } endStructure() } } @@ -69,41 +71,34 @@ class ServiceAreaClusterProgressStruct( private const val TAG_TOTAL_OPERATIONAL_TIME = 2 private const val TAG_ESTIMATED_TIME = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterProgressStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ServiceAreaClusterProgressStruct { tlvReader.enterStructure(tlvTag) val locationID = tlvReader.getULong(ContextSpecificTag(TAG_LOCATION_I_D)) val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val estimatedTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ESTIMATED_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_ESTIMATED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ESTIMATED_TIME)) - null - } - + val totalOperationalTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val estimatedTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ESTIMATED_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_ESTIMATED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ESTIMATED_TIME)) + null + } + tlvReader.exitContainer() - return ServiceAreaClusterProgressStruct( - locationID, - status, - totalOperationalTime, - estimatedTime, - ) + return ServiceAreaClusterProgressStruct(locationID, status, totalOperationalTime, estimatedTime) } } } 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 d9958f3c74b210..3ef4fc6b3bbfa6 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,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class SoftwareDiagnosticsClusterThreadMetricsStruct( - val id: ULong, - val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SoftwareDiagnosticsClusterThreadMetricsStruct ( + val id: ULong, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -45,21 +47,21 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( startStructure(tlvTag) 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() } } @@ -71,43 +73,33 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterThreadMetricsStruct { tlvReader.enterStructure(tlvTag) val id = tlvReader.getULong(ContextSpecificTag(TAG_ID)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val stackFreeCurrent = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) - } else { - Optional.empty() - } - val stackFreeMinimum = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) - } else { - Optional.empty() - } - val stackSize = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getULong(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.getULong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getULong(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 8d667ba0f94cfa..49ebd8e74713c8 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TargetNavigatorClusterTargetInfoStruct(val identifier: UInt, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class TargetNavigatorClusterTargetInfoStruct ( + val identifier: UInt, + val name: String) { + override fun toString(): String = buildString { append("TargetNavigatorClusterTargetInfoStruct {\n") append("\tidentifier : $identifier\n") append("\tname : $name\n") @@ -43,11 +49,11 @@ class TargetNavigatorClusterTargetInfoStruct(val identifier: UInt, val name: Str private const val TAG_IDENTIFIER = 0 private const val TAG_NAME = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetInfoStruct { tlvReader.enterStructure(tlvTag) val identifier = tlvReader.getUInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetInfoStruct(identifier, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt index 81dc0f1efd24ea..5b426e8234fc4d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt @@ -17,21 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThermostatClusterPresetStruct( - val presetHandle: ByteArray?, - val presetScenario: UInt, - val name: Optional?, - val coolingSetpoint: Optional, - val heatingSetpoint: Optional, - val builtIn: Boolean?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterPresetStruct ( + val presetHandle: ByteArray?, + val presetScenario: UInt, + val name: Optional?, + val coolingSetpoint: Optional, + val heatingSetpoint: Optional, + val builtIn: Boolean?) { + override fun toString(): String = buildString { append("ThermostatClusterPresetStruct {\n") append("\tpresetHandle : $presetHandle\n") append("\tpresetScenario : $presetScenario\n") @@ -46,32 +48,32 @@ class ThermostatClusterPresetStruct( tlvWriter.apply { startStructure(tlvTag) if (presetHandle != null) { - put(ContextSpecificTag(TAG_PRESET_HANDLE), presetHandle) - } else { - putNull(ContextSpecificTag(TAG_PRESET_HANDLE)) - } + put(ContextSpecificTag(TAG_PRESET_HANDLE), presetHandle) + } else { + putNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + } put(ContextSpecificTag(TAG_PRESET_SCENARIO), presetScenario) if (name != null) { - if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } - } else { - putNull(ContextSpecificTag(TAG_NAME)) - } + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + } else { + putNull(ContextSpecificTag(TAG_NAME)) + } if (coolingSetpoint.isPresent) { - val optcoolingSetpoint = coolingSetpoint.get() - put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) - } + val optcoolingSetpoint = coolingSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) + } if (heatingSetpoint.isPresent) { - val optheatingSetpoint = heatingSetpoint.get() - put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) - } + val optheatingSetpoint = heatingSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) + } if (builtIn != null) { - put(ContextSpecificTag(TAG_BUILT_IN), builtIn) - } else { - putNull(ContextSpecificTag(TAG_BUILT_IN)) - } + put(ContextSpecificTag(TAG_BUILT_IN), builtIn) + } else { + putNull(ContextSpecificTag(TAG_BUILT_IN)) + } endStructure() } } @@ -84,57 +86,45 @@ class ThermostatClusterPresetStruct( private const val TAG_HEATING_SETPOINT = 4 private const val TAG_BUILT_IN = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterPresetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterPresetStruct { tlvReader.enterStructure(tlvTag) - val presetHandle = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRESET_HANDLE)) - null - } + val presetHandle = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + null + } val presetScenario = tlvReader.getUInt(ContextSpecificTag(TAG_PRESET_SCENARIO)) - val name = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NAME)) - null - } - val coolingSetpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_SETPOINT))) - } else { - Optional.empty() - } - val heatingSetpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_SETPOINT))) - } else { - Optional.empty() - } - val builtIn = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) - null - } - + val name = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NAME)) + null + } + val coolingSetpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_SETPOINT))) + } else { + Optional.empty() + } + val heatingSetpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_SETPOINT))) + } else { + Optional.empty() + } + val builtIn = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) + null + } + tlvReader.exitContainer() - return ThermostatClusterPresetStruct( - presetHandle, - presetScenario, - name, - coolingSetpoint, - heatingSetpoint, - builtIn, - ) + return ThermostatClusterPresetStruct(presetHandle, presetScenario, name, coolingSetpoint, heatingSetpoint, builtIn) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt index a54fd5dcdfd956..26a9bab02f91e6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThermostatClusterPresetTypeStruct( - val presetScenario: UInt, - val numberOfPresets: UInt, - val presetTypeFeatures: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterPresetTypeStruct ( + val presetScenario: UInt, + val numberOfPresets: UInt, + val presetTypeFeatures: UInt) { + override fun toString(): String = buildString { append("ThermostatClusterPresetTypeStruct {\n") append("\tpresetScenario : $presetScenario\n") append("\tnumberOfPresets : $numberOfPresets\n") @@ -50,12 +53,12 @@ class ThermostatClusterPresetTypeStruct( private const val TAG_NUMBER_OF_PRESETS = 1 private const val TAG_PRESET_TYPE_FEATURES = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterPresetTypeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterPresetTypeStruct { tlvReader.enterStructure(tlvTag) val presetScenario = tlvReader.getUInt(ContextSpecificTag(TAG_PRESET_SCENARIO)) val numberOfPresets = tlvReader.getUInt(ContextSpecificTag(TAG_NUMBER_OF_PRESETS)) val presetTypeFeatures = tlvReader.getUInt(ContextSpecificTag(TAG_PRESET_TYPE_FEATURES)) - + tlvReader.exitContainer() return ThermostatClusterPresetTypeStruct(presetScenario, numberOfPresets, presetTypeFeatures) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt index 6a3b8727c32860..f07278bc4b607a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt @@ -17,22 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThermostatClusterScheduleStruct( - val scheduleHandle: ByteArray?, - val systemMode: UInt, - val name: Optional, - val presetHandle: Optional, - val transitions: List, - val builtIn: Optional?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterScheduleStruct ( + val scheduleHandle: ByteArray?, + val systemMode: UInt, + val name: Optional, + val presetHandle: Optional, + val transitions: List, + val builtIn: Optional?) { + override fun toString(): String = buildString { append("ThermostatClusterScheduleStruct {\n") append("\tscheduleHandle : $scheduleHandle\n") append("\tsystemMode : $systemMode\n") @@ -47,32 +48,32 @@ class ThermostatClusterScheduleStruct( tlvWriter.apply { startStructure(tlvTag) if (scheduleHandle != null) { - put(ContextSpecificTag(TAG_SCHEDULE_HANDLE), scheduleHandle) - } else { - putNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) - } + put(ContextSpecificTag(TAG_SCHEDULE_HANDLE), scheduleHandle) + } else { + putNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + } put(ContextSpecificTag(TAG_SYSTEM_MODE), systemMode) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (presetHandle.isPresent) { - val optpresetHandle = presetHandle.get() - put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) - } + val optpresetHandle = presetHandle.get() + put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) + } startArray(ContextSpecificTag(TAG_TRANSITIONS)) for (item in transitions.iterator()) { item.toTlv(AnonymousTag, this) } endArray() if (builtIn != null) { - if (builtIn.isPresent) { - val optbuiltIn = builtIn.get() - put(ContextSpecificTag(TAG_BUILT_IN), optbuiltIn) - } - } else { - putNull(ContextSpecificTag(TAG_BUILT_IN)) - } + if (builtIn.isPresent) { + val optbuiltIn = builtIn.get() + put(ContextSpecificTag(TAG_BUILT_IN), optbuiltIn) + } + } else { + putNull(ContextSpecificTag(TAG_BUILT_IN)) + } endStructure() } } @@ -85,58 +86,46 @@ class ThermostatClusterScheduleStruct( private const val TAG_TRANSITIONS = 4 private const val TAG_BUILT_IN = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterScheduleStruct { tlvReader.enterStructure(tlvTag) - val scheduleHandle = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) - null - } + val scheduleHandle = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + null + } val systemMode = tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val presetHandle = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) - } else { - Optional.empty() - } - val transitions = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS)) - while (!tlvReader.isEndOfContainer()) { - add(ThermostatClusterScheduleTransitionStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val builtIn = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_BUILT_IN))) { - Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) - null - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val presetHandle = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) + } else { + Optional.empty() + } + val transitions = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS)) + while(!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleTransitionStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val builtIn = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BUILT_IN))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) + null + } + tlvReader.exitContainer() - return ThermostatClusterScheduleStruct( - scheduleHandle, - systemMode, - name, - presetHandle, - transitions, - builtIn, - ) + return ThermostatClusterScheduleStruct(scheduleHandle, systemMode, name, presetHandle, transitions, builtIn) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt index c36a39a1947746..e429994e90d20a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt @@ -17,21 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThermostatClusterScheduleTransitionStruct( - val dayOfWeek: UInt, - val transitionTime: UInt, - val presetHandle: Optional, - val systemMode: Optional, - val coolingSetpoint: Optional, - val heatingSetpoint: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterScheduleTransitionStruct ( + val dayOfWeek: UInt, + val transitionTime: UInt, + val presetHandle: Optional, + val systemMode: Optional, + val coolingSetpoint: Optional, + val heatingSetpoint: Optional) { + override fun toString(): String = buildString { append("ThermostatClusterScheduleTransitionStruct {\n") append("\tdayOfWeek : $dayOfWeek\n") append("\ttransitionTime : $transitionTime\n") @@ -48,21 +50,21 @@ class ThermostatClusterScheduleTransitionStruct( put(ContextSpecificTag(TAG_DAY_OF_WEEK), dayOfWeek) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (presetHandle.isPresent) { - val optpresetHandle = presetHandle.get() - put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) - } + val optpresetHandle = presetHandle.get() + put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) + } if (systemMode.isPresent) { - val optsystemMode = systemMode.get() - put(ContextSpecificTag(TAG_SYSTEM_MODE), optsystemMode) - } + val optsystemMode = systemMode.get() + put(ContextSpecificTag(TAG_SYSTEM_MODE), optsystemMode) + } if (coolingSetpoint.isPresent) { - val optcoolingSetpoint = coolingSetpoint.get() - put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) - } + val optcoolingSetpoint = coolingSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) + } if (heatingSetpoint.isPresent) { - val optheatingSetpoint = heatingSetpoint.get() - put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) - } + val optheatingSetpoint = heatingSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) + } endStructure() } } @@ -75,45 +77,34 @@ class ThermostatClusterScheduleTransitionStruct( private const val TAG_COOLING_SETPOINT = 4 private const val TAG_HEATING_SETPOINT = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleTransitionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterScheduleTransitionStruct { tlvReader.enterStructure(tlvTag) val dayOfWeek = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_OF_WEEK)) val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val presetHandle = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) - } else { - Optional.empty() - } - val systemMode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SYSTEM_MODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE))) - } else { - Optional.empty() - } - val coolingSetpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_SETPOINT))) - } else { - Optional.empty() - } - val heatingSetpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_SETPOINT))) - } else { - Optional.empty() - } - + val presetHandle = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) + } else { + Optional.empty() + } + val systemMode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SYSTEM_MODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE))) + } else { + Optional.empty() + } + val coolingSetpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_SETPOINT))) + } else { + Optional.empty() + } + val heatingSetpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_SETPOINT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ThermostatClusterScheduleTransitionStruct( - dayOfWeek, - transitionTime, - presetHandle, - systemMode, - coolingSetpoint, - heatingSetpoint, - ) + return ThermostatClusterScheduleTransitionStruct(dayOfWeek, transitionTime, presetHandle, systemMode, coolingSetpoint, heatingSetpoint) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt index bd7ae889f102bb..02b2c88e6c9d01 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThermostatClusterScheduleTypeStruct( - val systemMode: UInt, - val numberOfSchedules: UInt, - val scheduleTypeFeatures: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterScheduleTypeStruct ( + val systemMode: UInt, + val numberOfSchedules: UInt, + val scheduleTypeFeatures: UInt) { + override fun toString(): String = buildString { append("ThermostatClusterScheduleTypeStruct {\n") append("\tsystemMode : $systemMode\n") append("\tnumberOfSchedules : $numberOfSchedules\n") @@ -50,19 +53,15 @@ class ThermostatClusterScheduleTypeStruct( private const val TAG_NUMBER_OF_SCHEDULES = 1 private const val TAG_SCHEDULE_TYPE_FEATURES = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleTypeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterScheduleTypeStruct { tlvReader.enterStructure(tlvTag) val systemMode = tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE)) val numberOfSchedules = tlvReader.getUInt(ContextSpecificTag(TAG_NUMBER_OF_SCHEDULES)) val scheduleTypeFeatures = tlvReader.getUInt(ContextSpecificTag(TAG_SCHEDULE_TYPE_FEATURES)) - + tlvReader.exitContainer() - return ThermostatClusterScheduleTypeStruct( - systemMode, - numberOfSchedules, - scheduleTypeFeatures, - ) + return ThermostatClusterScheduleTypeStruct(systemMode, numberOfSchedules, scheduleTypeFeatures) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt index 1981753d688cad..b033662cbf23b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThermostatClusterWeeklyScheduleTransitionStruct( - val transitionTime: UInt, - val heatSetpoint: Int?, - val coolSetpoint: Int?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterWeeklyScheduleTransitionStruct ( + val transitionTime: UInt, + val heatSetpoint: Int?, + val coolSetpoint: Int?) { + override fun toString(): String = buildString { append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") append("\ttransitionTime : $transitionTime\n") append("\theatSetpoint : $heatSetpoint\n") @@ -40,15 +43,15 @@ class ThermostatClusterWeeklyScheduleTransitionStruct( startStructure(tlvTag) 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() } } @@ -58,34 +61,25 @@ class ThermostatClusterWeeklyScheduleTransitionStruct( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThermostatClusterWeeklyScheduleTransitionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterWeeklyScheduleTransitionStruct { tlvReader.enterStructure(tlvTag) val transitionTime = tlvReader.getUInt(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 ThermostatClusterWeeklyScheduleTransitionStruct( - transitionTime, - heatSetpoint, - coolSetpoint, - ) + return ThermostatClusterWeeklyScheduleTransitionStruct(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 cb959b77a7cb48..40156c06651284 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,28 +17,31 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterNeighborTableStruct( - val extAddress: ULong, - val age: ULong, - val rloc16: UInt, - val linkFrameCounter: ULong, - val mleFrameCounter: ULong, - val lqi: UInt, - val averageRssi: Int?, - val lastRssi: Int?, - val frameErrorRate: UInt, - val messageErrorRate: UInt, - val rxOnWhenIdle: Boolean, - val fullThreadDevice: Boolean, - val fullNetworkData: Boolean, - val isChild: Boolean, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( + val extAddress: ULong, + val age: ULong, + val rloc16: UInt, + val linkFrameCounter: ULong, + val mleFrameCounter: ULong, + val lqi: UInt, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: UInt, + val messageErrorRate: UInt, + 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") @@ -67,15 +70,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) @@ -102,10 +105,7 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( private const val TAG_FULL_NETWORK_DATA = 12 private const val TAG_IS_CHILD = 13 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNeighborTableStruct { tlvReader.enterStructure(tlvTag) val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) val age = tlvReader.getULong(ContextSpecificTag(TAG_AGE)) @@ -113,45 +113,28 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( val linkFrameCounter = tlvReader.getULong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) val mleFrameCounter = tlvReader.getULong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) val lqi = tlvReader.getUInt(ContextSpecificTag(TAG_LQI)) - val averageRssi = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } 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.getUInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) val messageErrorRate = tlvReader.getUInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) 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 2b706f408b1c00..b236dab6cb1906 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,26 +17,29 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -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 { +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 { append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") append("\tactiveTimestampPresent : $activeTimestampPresent\n") append("\tpendingTimestampPresent : $pendingTimestampPresent\n") @@ -86,45 +89,24 @@ class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( private const val TAG_SECURITY_POLICY_PRESENT = 10 private const val TAG_CHANNEL_MASK_PRESENT = 11 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { tlvReader.enterStructure(tlvTag) - val activeTimestampPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) - val pendingTimestampPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val 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 a5b201c7e11877..3d5edad134669d 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,24 +17,27 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterRouteTableStruct( - val extAddress: ULong, - val rloc16: UInt, - val routerId: UInt, - val nextHop: UInt, - val pathCost: UInt, - val LQIIn: UInt, - val LQIOut: UInt, - val age: UInt, - val allocated: Boolean, - val linkEstablished: Boolean, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterRouteTableStruct ( + val extAddress: ULong, + val rloc16: UInt, + val routerId: UInt, + val nextHop: UInt, + val pathCost: UInt, + val LQIIn: UInt, + val LQIOut: UInt, + val age: UInt, + val allocated: Boolean, + val linkEstablished: Boolean) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") append("\textAddress : $extAddress\n") append("\trloc16 : $rloc16\n") @@ -78,10 +81,7 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDiagnosticsClusterRouteTableStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterRouteTableStruct { tlvReader.enterStructure(tlvTag) val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) @@ -93,21 +93,10 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( val age = tlvReader.getUInt(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 c0d8b857424511..44eec2ff64ab26 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: UInt, val flags: UInt) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterSecurityPolicy ( + val rotationTime: UInt, + val flags: UInt) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") append("\trotationTime : $rotationTime\n") append("\tflags : $flags\n") @@ -43,11 +49,11 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: UInt, val private const val TAG_ROTATION_TIME = 0 private const val TAG_FLAGS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterSecurityPolicy { tlvReader.enterStructure(tlvTag) val rotationTime = tlvReader.getUInt(ContextSpecificTag(TAG_ROTATION_TIME)) val flags = tlvReader.getUInt(ContextSpecificTag(TAG_FLAGS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDirectoryClusterThreadNetworkStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDirectoryClusterThreadNetworkStruct.kt index 2ba4a216410ef3..a22ee95c0ad104 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDirectoryClusterThreadNetworkStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDirectoryClusterThreadNetworkStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ThreadNetworkDirectoryClusterThreadNetworkStruct( - val extendedPanID: ULong, - val networkName: String, - val channel: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDirectoryClusterThreadNetworkStruct ( + val extendedPanID: ULong, + val networkName: String, + val channel: UInt) { + override fun toString(): String = buildString { append("ThreadNetworkDirectoryClusterThreadNetworkStruct {\n") append("\textendedPanID : $extendedPanID\n") append("\tnetworkName : $networkName\n") @@ -50,15 +53,12 @@ class ThreadNetworkDirectoryClusterThreadNetworkStruct( private const val TAG_NETWORK_NAME = 1 private const val TAG_CHANNEL = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): ThreadNetworkDirectoryClusterThreadNetworkStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDirectoryClusterThreadNetworkStruct { tlvReader.enterStructure(tlvTag) val extendedPanID = tlvReader.getULong(ContextSpecificTag(TAG_EXTENDED_PAN_I_D)) val networkName = tlvReader.getString(ContextSpecificTag(TAG_NETWORK_NAME)) val channel = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL)) - + tlvReader.exitContainer() return ThreadNetworkDirectoryClusterThreadNetworkStruct(extendedPanID, networkName, channel) 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 7b2acdbebc65eb..c960f8a3d1e069 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TimeSynchronizationClusterDSTOffsetStruct( - val offset: Long, - val validStarting: ULong, - val validUntil: ULong?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterDSTOffsetStruct ( + val offset: Long, + val validStarting: ULong, + val validUntil: ULong?) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") append("\toffset : $offset\n") append("\tvalidStarting : $validStarting\n") @@ -41,10 +44,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() } } @@ -54,18 +57,17 @@ class TimeSynchronizationClusterDSTOffsetStruct( private const val TAG_VALID_STARTING = 1 private const val TAG_VALID_UNTIL = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTOffsetStruct { tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validStarting = tlvReader.getULong(ContextSpecificTag(TAG_VALID_STARTING)) - val validUntil = - if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_VALID_UNTIL)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) - null - } - + val validUntil = if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + tlvReader.exitContainer() return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index f9eb70cd134fc5..956908c9cd381d 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( - val nodeID: ULong, - val endpoint: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( + val nodeID: ULong, + val endpoint: UInt) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") append("\tnodeID : $nodeID\n") append("\tendpoint : $endpoint\n") @@ -46,14 +49,11 @@ class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( private const val TAG_NODE_I_D = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { tlvReader.enterStructure(tlvTag) val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getUInt(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 f004d9602e36bf..d972f05dbd528a 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,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TimeSynchronizationClusterTimeZoneStruct( - val offset: Long, - val validAt: ULong, - val name: Optional, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterTimeZoneStruct ( + val offset: Long, + val validAt: ULong, + val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStruct {\n") append("\toffset : $offset\n") append("\tvalidAt : $validAt\n") @@ -42,9 +44,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() } } @@ -54,17 +56,16 @@ class TimeSynchronizationClusterTimeZoneStruct( private const val TAG_VALID_AT = 1 private const val TAG_NAME = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStruct { tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validAt = tlvReader.getULong(ContextSpecificTag(TAG_VALID_AT)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + 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 6b55677ffd6417..16685608686cb7 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TimeSynchronizationClusterTrustedTimeSourceStruct( - val fabricIndex: UInt, - val nodeID: ULong, - val endpoint: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterTrustedTimeSourceStruct ( + val fabricIndex: UInt, + val nodeID: ULong, + val endpoint: UInt) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") append("\tfabricIndex : $fabricIndex\n") append("\tnodeID : $nodeID\n") @@ -50,15 +53,12 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): TimeSynchronizationClusterTrustedTimeSourceStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTrustedTimeSourceStruct { tlvReader.enterStructure(tlvTag) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() 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 46ebbe20eb1528..4ae6ee1b7692ff 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,11 +20,15 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterDoubleNestedStructList(val a: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterDoubleNestedStructList ( + val a: List) { + override fun toString(): String = buildString { append("UnitTestingClusterDoubleNestedStructList {\n") append("\ta : $a\n") append("}\n") @@ -45,17 +49,16 @@ class UnitTestingClusterDoubleNestedStructList(val a: List { - tlvReader.enterArray(ContextSpecificTag(TAG_A)) - while (!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val a = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_A)) + while(!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterDoubleNestedStructList(a) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index 6ec856c422029a..0a3799929a49c6 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,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterNestedStruct( - val a: UInt, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNestedStruct ( + val a: UInt, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -50,12 +53,12 @@ class UnitTestingClusterNestedStruct( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStruct { tlvReader.enterStructure(tlvTag) val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - + 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 a0e302bc310d60..425b1753d17039 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,19 +20,21 @@ import chip.devicecontroller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterNestedStructList( - val a: UInt, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct, - val d: List, - val e: List, - val f: List, - val g: List, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNestedStructList ( + val a: UInt, + 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") @@ -83,44 +85,40 @@ class UnitTestingClusterNestedStructList( private const val TAG_F = 5 private const val TAG_G = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStructList { tlvReader.enterStructure(tlvTag) val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - val d = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_D)) - while (!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val e = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_E)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getULong(AnonymousTag)) - } - tlvReader.exitContainer() - } - val f = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_F)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val g = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_G)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val d = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_D)) + while(!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_E)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getULong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_F)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_G)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(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 32b5f73dd9ce8d..4758e679ca22cb 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 @@ -17,28 +17,29 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterNullablesAndOptionalsStruct( - val nullableInt: UInt?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, - val nullableString: String?, - val optionalString: Optional, - val nullableOptionalString: Optional?, - val nullableStruct: UnitTestingClusterSimpleStruct?, - val optionalStruct: Optional, - val nullableOptionalStruct: Optional?, - val nullableList: List?, - val optionalList: Optional>, - val nullableOptionalList: Optional>?, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNullablesAndOptionalsStruct ( + val nullableInt: UInt?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>?) { + override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") append("\tnullableInt : $nullableInt\n") append("\toptionalInt : $optionalInt\n") @@ -59,85 +60,85 @@ class UnitTestingClusterNullablesAndOptionalsStruct( tlvWriter.apply { startStructure(tlvTag) 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) { - startArray(ContextSpecificTag(TAG_NULLABLE_LIST)) - for (item in nullableList.iterator()) { - put(AnonymousTag, item) - } - endArray() - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + startArray(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) } + endArray() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + } if (optionalList.isPresent) { - val optoptionalList = optionalList.get() - startArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) - for (item in optoptionalList.iterator()) { - put(AnonymousTag, item) - } - endArray() + val optoptionalList = optionalList.get() + startArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) } + endArray() + } if (nullableOptionalList != null) { - if (nullableOptionalList.isPresent) { - val optnullableOptionalList = nullableOptionalList.get() - startArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - for (item in optnullableOptionalList.iterator()) { - put(AnonymousTag, item) - } - endArray() - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + } endStructure() } } @@ -156,153 +157,114 @@ class UnitTestingClusterNullablesAndOptionalsStruct( private const val TAG_OPTIONAL_LIST = 10 private const val TAG_NULLABLE_OPTIONAL_LIST = 11 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterNullablesAndOptionalsStruct { tlvReader.enterStructure(tlvTag) - val nullableInt = - if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_INT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) - null - } - val optionalInt = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_INT))) - } else { - Optional.empty() - } - val nullableOptionalInt = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - null - } - val nullableString = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - null - } - val optionalString = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) - } else { - Optional.empty() - } - val nullableOptionalString = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - null - } - val nullableStruct = - if (!tlvReader.isNull()) { - UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - null - } - val optionalStruct = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { - Optional.of( - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_OPTIONAL_STRUCT), - tlvReader, - ) - ) - } else { - Optional.empty() - } - val nullableOptionalStruct = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { - Optional.of( - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), - tlvReader, - ) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - null - } - val nullableList = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - null - } - val optionalList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val nullableOptionalList = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { - Optional.of( - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - null - } - + val nullableInt = if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), tlvReader)) + } else { + Optional.empty() + } + val nullableOptionalStruct = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val nullableOptionalList = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of(buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + tlvReader.exitContainer() - return UnitTestingClusterNullablesAndOptionalsStruct( - nullableInt, - optionalInt, - nullableOptionalInt, - nullableString, - optionalString, - nullableOptionalString, - nullableStruct, - optionalStruct, - nullableOptionalStruct, - nullableList, - optionalList, - nullableOptionalList, - ) + 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 24f06fb8752b6c..3026a55dc4380c 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,22 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterSimpleStruct( - val a: UInt, - val b: Boolean, - val c: UInt, - val d: ByteArray, - val e: String, - val f: UInt, - val g: Float, - val h: Double, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterSimpleStruct ( + val a: UInt, + val b: Boolean, + val c: UInt, + val d: ByteArray, + val e: String, + val f: UInt, + val g: Float, + val h: Double) { + override fun toString(): String = buildString { append("UnitTestingClusterSimpleStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -70,7 +73,7 @@ class UnitTestingClusterSimpleStruct( private const val TAG_G = 6 private const val TAG_H = 7 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterSimpleStruct { tlvReader.enterStructure(tlvTag) val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) @@ -80,7 +83,7 @@ class UnitTestingClusterSimpleStruct( val f = tlvReader.getUInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) - + tlvReader.exitContainer() return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index d65a99f9f0e8d5..22970640c5eb3c 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 @@ -17,24 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterTestFabricScoped( - val fabricSensitiveInt8u: UInt, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: UInt?, - val nullableOptionalFabricSensitiveInt8u: Optional?, - val fabricSensitiveCharString: String, - val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: UInt, -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestFabricScoped ( + val fabricSensitiveInt8u: UInt, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: UInt?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: UInt) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") @@ -52,28 +53,22 @@ class UnitTestingClusterTestFabricScoped( startStructure(tlvTag) 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) startArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) @@ -96,66 +91,44 @@ class UnitTestingClusterTestFabricScoped( private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScoped { tlvReader.enterStructure(tlvTag) val fabricSensitiveInt8u = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) - val optionalFabricSensitiveInt8u = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - val nullableFabricSensitiveInt8u = - if (!tlvReader.isNull()) { - tlvReader.getUInt(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.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - null - } - val fabricSensitiveCharString = - tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) - val fabricSensitiveStruct = - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), - tlvReader, - ) - val fabricSensitiveInt8uList = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } + val optionalFabricSensitiveInt8u = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { + tlvReader.getUInt(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.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), tlvReader) + val fabricSensitiveInt8uList = buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } val fabricIndex = tlvReader.getUInt(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 91afedb93a404f..1f823ba5cb92f9 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UnitTestingClusterTestListStructOctet(val member1: ULong, val member2: ByteArray) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestListStructOctet ( + val member1: ULong, + val member2: ByteArray) { + override fun toString(): String = buildString { append("UnitTestingClusterTestListStructOctet {\n") append("\tmember1 : $member1\n") append("\tmember2 : $member2\n") @@ -43,11 +49,11 @@ class UnitTestingClusterTestListStructOctet(val member1: ULong, val member2: Byt private const val TAG_MEMBER1 = 0 private const val TAG_MEMBER2 = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestListStructOctet { tlvReader.enterStructure(tlvTag) val member1 = tlvReader.getULong(ContextSpecificTag(TAG_MEMBER1)) val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) - + tlvReader.exitContainer() return UnitTestingClusterTestListStructOctet(member1, member2) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt index 1cfbb532f5abaf..02509a81a9dbbc 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,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag +import matter.tlv.TlvParsingException import matter.tlv.TlvReader import matter.tlv.TlvWriter -class UserLabelClusterLabelStruct(val label: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class UserLabelClusterLabelStruct ( + val label: String, + val value: String) { + override fun toString(): String = buildString { append("UserLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class UserLabelClusterLabelStruct(val label: String, val value: String) { private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UserLabelClusterLabelStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return UserLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt index 5d36b70eea4726..ed9077402e96af 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt @@ -253,17 +253,6 @@ class ThermostatCluster(private val controller: MatterController, private val en object SubscriptionEstablished : SetpointHoldExpiryTimestampAttributeSubscriptionState() } - class QueuedPresetAttribute(val value: ThermostatClusterQueuedPresetStruct?) - - sealed class QueuedPresetAttributeSubscriptionState { - data class Success(val value: ThermostatClusterQueuedPresetStruct?) : - QueuedPresetAttributeSubscriptionState() - - data class Error(val exception: Exception) : QueuedPresetAttributeSubscriptionState() - - object SubscriptionEstablished : QueuedPresetAttributeSubscriptionState() - } - class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -511,7 +500,6 @@ class ThermostatCluster(private val controller: MatterController, private val en suspend fun setActivePresetRequest( presetHandle: ByteArray, - delayMinutes: UShort?, timedInvokeTimeout: Duration? = null, ) { val commandId: UInt = 6u @@ -521,9 +509,6 @@ class ThermostatCluster(private val controller: MatterController, private val en val TAG_PRESET_HANDLE_REQ: Int = 0 tlvWriter.put(ContextSpecificTag(TAG_PRESET_HANDLE_REQ), presetHandle) - - val TAG_DELAY_MINUTES_REQ: Int = 1 - delayMinutes?.let { tlvWriter.put(ContextSpecificTag(TAG_DELAY_MINUTES_REQ), delayMinutes) } tlvWriter.endStructure() val request: InvokeRequest = @@ -597,24 +582,6 @@ class ThermostatCluster(private val controller: MatterController, private val en logger.log(Level.FINE, "Invoke command succeeded: ${response}") } - suspend fun cancelSetActivePresetRequest(timedInvokeTimeout: Duration? = null) { - val commandId: UInt = 10u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - tlvWriter.endStructure() - - val request: InvokeRequest = - InvokeRequest( - CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), - tlvPayload = tlvWriter.getEncoded(), - timedRequest = timedInvokeTimeout, - ) - - val response: InvokeResponse = controller.invoke(request) - logger.log(Level.FINE, "Invoke command succeeded: ${response}") - } - suspend fun setTemperatureSetpointHoldPolicy( temperatureSetpointHoldPolicy: UByte, timedInvokeTimeout: Duration? = null, @@ -7790,107 +7757,6 @@ class ThermostatCluster(private val controller: MatterController, private val en } } - suspend fun readQueuedPresetAttribute(): QueuedPresetAttribute { - val ATTRIBUTE_ID: UInt = 85u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Queuedpreset attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: ThermostatClusterQueuedPresetStruct? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - ThermostatClusterQueuedPresetStruct.fromTlv(AnonymousTag, tlvReader) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return QueuedPresetAttribute(decodedValue) - } - - suspend fun subscribeQueuedPresetAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 85u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - QueuedPresetAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Queuedpreset attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: ThermostatClusterQueuedPresetStruct? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - ThermostatClusterQueuedPresetStruct.fromTlv(AnonymousTag, tlvReader) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(QueuedPresetAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(QueuedPresetAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 4485a760e2b427..b8c63a2d4a2aef 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -124,7 +124,6 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetTypeStruct.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt", diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 7cdabec93f43ca..82ecc094a9e3ed 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -30490,73 +30490,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::QueuedPreset::Id: { - using TypeInfo = Attributes::QueuedPreset::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - jobject value_presetHandle; - if (cppValue.Value().presetHandle.IsNull()) - { - value_presetHandle = nullptr; - } - else - { - jbyteArray value_presetHandleByteArray = - env->NewByteArray(static_cast(cppValue.Value().presetHandle.Value().size())); - env->SetByteArrayRegion(value_presetHandleByteArray, 0, - static_cast(cppValue.Value().presetHandle.Value().size()), - reinterpret_cast(cppValue.Value().presetHandle.Value().data())); - value_presetHandle = value_presetHandleByteArray; - } - jobject value_transitionTimestamp; - if (cppValue.Value().transitionTimestamp.IsNull()) - { - value_transitionTimestamp = nullptr; - } - else - { - std::string value_transitionTimestampClassName = "java/lang/Long"; - std::string value_transitionTimestampCtorSignature = "(J)V"; - jlong jnivalue_transitionTimestamp = static_cast(cppValue.Value().transitionTimestamp.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_transitionTimestampClassName.c_str(), value_transitionTimestampCtorSignature.c_str(), - jnivalue_transitionTimestamp, value_transitionTimestamp); - } - - jclass queuedPresetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterQueuedPresetStruct", queuedPresetStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterQueuedPresetStruct"); - return nullptr; - } - - jmethodID queuedPresetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, queuedPresetStructStructClass_1, "", - "([BLjava/lang/Long;)V", &queuedPresetStructStructCtor_1); - if (err != CHIP_NO_ERROR || queuedPresetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterQueuedPresetStruct constructor"); - return nullptr; - } - - value = env->NewObject(queuedPresetStructStructClass_1, queuedPresetStructStructCtor_1, value_presetHandle, - value_transitionTimestamp); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 773fe342105443..ebae9243a53ecb 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -8637,7 +8637,6 @@ class ChipClusters: "commandName": "SetActivePresetRequest", "args": { "presetHandle": "bytes", - "delayMinutes": "int", }, }, 0x00000007: { @@ -8659,12 +8658,6 @@ class ChipClusters: "args": { }, }, - 0x0000000A: { - "commandId": 0x0000000A, - "commandName": "CancelSetActivePresetRequest", - "args": { - }, - }, 0x0000000B: { "commandId": 0x0000000B, "commandName": "SetTemperatureSetpointHoldPolicy", @@ -9075,12 +9068,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000055: { - "attributeName": "QueuedPreset", - "attributeId": 0x00000055, - "type": "", - "reportable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 43917192955506..4bdc64454e0b9a 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -31426,7 +31426,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="presetsSchedulesEditable", Tag=0x00000052, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldPolicy", Tag=0x00000053, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="setpointHoldExpiryTimestamp", Tag=0x00000054, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="queuedPreset", Tag=0x00000055, Type=typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -31497,7 +31496,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: presetsSchedulesEditable: 'typing.Optional[bool]' = None temperatureSetpointHoldPolicy: 'typing.Optional[uint]' = None setpointHoldExpiryTimestamp: 'typing.Union[None, Nullable, uint]' = None - queuedPreset: 'typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -31675,7 +31673,6 @@ class Feature(IntFlag): kMatterScheduleConfiguration = 0x80 kPresets = 0x100 kSetpoints = 0x200 - kQueuedPresetsSupported = 0x400 class HVACSystemTypeBitmap(IntFlag): kCoolingStage = 0x3 @@ -31809,19 +31806,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: numberOfPresets: 'uint' = 0 presetTypeFeatures: 'uint' = 0 - @dataclass - class QueuedPresetStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="presetHandle", Tag=0, Type=typing.Union[Nullable, bytes]), - ClusterObjectFieldDescriptor(Label="transitionTimestamp", Tag=1, Type=typing.Union[Nullable, uint]), - ]) - - presetHandle: 'typing.Union[Nullable, bytes]' = NullValue - transitionTimestamp: 'typing.Union[Nullable, uint]' = NullValue - @dataclass class ScheduleTypeStruct(ClusterObject): @ChipUtility.classproperty @@ -31974,11 +31958,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="presetHandle", Tag=0, Type=bytes), - ClusterObjectFieldDescriptor(Label="delayMinutes", Tag=1, Type=typing.Optional[uint]), ]) presetHandle: 'bytes' = b"" - delayMinutes: 'typing.Optional[uint]' = None @dataclass class StartPresetsSchedulesEditRequest(ClusterCommand): @@ -32022,19 +32004,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) - @dataclass - class CancelSetActivePresetRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x0000000A - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - @dataclass class SetTemperatureSetpointHoldPolicy(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 @@ -33044,22 +33013,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None - @dataclass - class QueuedPreset(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000055 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]) - - value: 'typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 4200cb1dccd108..792eff9868124c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -4080,9 +4080,6 @@ static BOOL AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) case Attributes::SetpointHoldExpiryTimestamp::Id: { return YES; } - case Attributes::QueuedPreset::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 02ce62e1c2f0dc..4c9f6805023e3c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -12298,31 +12298,6 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib } return value; } - case Attributes::QueuedPreset::Id: { - using TypeInfo = Attributes::QueuedPreset::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - MTRThermostatClusterQueuedPresetStruct * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [MTRThermostatClusterQueuedPresetStruct new]; - if (cppValue.Value().presetHandle.IsNull()) { - value.presetHandle = nil; - } else { - value.presetHandle = AsData(cppValue.Value().presetHandle.Value()); - } - if (cppValue.Value().transitionTimestamp.IsNull()) { - value.transitionTimestamp = nil; - } else { - value.transitionTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().transitionTimestamp.Value()]; - } - } - return value; - } default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index a481ad0f37f8a4..5506a1a560ef91 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -9797,14 +9797,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPresetsSchedulesRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)commitPresetsSchedulesRequestWithCompletion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command CancelSetActivePresetRequest - * - * This command is sent to cancel a queued preset. - */ -- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)cancelSetActivePresetRequestWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; /** * Command SetTemperatureSetpointHoldPolicy * @@ -10242,12 +10234,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeQueuedPresetWithCompletion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeQueuedPresetWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeQueuedPresetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -19487,7 +19473,6 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureMatterScheduleConfiguration MTR_PROVISIONALLY_AVAILABLE = 0x80, MTRThermostatFeaturePresets MTR_PROVISIONALLY_AVAILABLE = 0x100, MTRThermostatFeatureSetpoints MTR_PROVISIONALLY_AVAILABLE = 0x200, - MTRThermostatFeatureQueuedPresetsSupported MTR_PROVISIONALLY_AVAILABLE = 0x400, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 694f35228a4701..640a1f418c800d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -66968,34 +66968,6 @@ - (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPrese queue:self.callbackQueue completion:responseHandler]; } -- (void)cancelSetActivePresetRequestWithCompletion:(MTRStatusCompletion)completion -{ - [self cancelSetActivePresetRequestWithParams:nil completion:completion]; -} -- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterCancelSetActivePresetRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::CancelSetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { @@ -70213,42 +70185,6 @@ + (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeQueuedPresetWithCompletion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeQueuedPresetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeQueuedPresetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index b6c6dc2aba2dc2..7760aa9b4a4abb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3458,7 +3458,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributePresetsSchedulesEditableID MTR_PROVISIONALLY_AVAILABLE = 0x00000052, MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldPolicyID MTR_PROVISIONALLY_AVAILABLE = 0x00000053, MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID MTR_PROVISIONALLY_AVAILABLE = 0x00000054, - MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID MTR_PROVISIONALLY_AVAILABLE = 0x00000055, MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterThermostatAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -6544,7 +6543,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterThermostatCommandStartPresetsSchedulesEditRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRCommandIDTypeClusterThermostatCommandCancelPresetsSchedulesEditRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRCommandIDTypeClusterThermostatCommandCommitPresetsSchedulesRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, - MTRCommandIDTypeClusterThermostatCommandCancelSetActivePresetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, MTRCommandIDTypeClusterThermostatCommandSetTemperatureSetpointHoldPolicyID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, // Cluster FanControl deprecated command id names diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index c320e8c06e8dea..f7fed32b4aa039 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -5653,10 +5653,6 @@ result = @"SetpointHoldExpiryTimestamp"; break; - case MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID: - result = @"QueuedPreset"; - break; - case MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index c47d2bf28caa4c..0b072ec0ad8489 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -4544,9 +4544,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPresetsSchedulesRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)commitPresetsSchedulesRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)cancelSetActivePresetRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4731,8 +4728,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeSetpointHoldExpiryTimestampWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeQueuedPresetWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f04fd07262ea1f..131bb427fcfb7c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -13070,37 +13070,6 @@ - (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPrese completion:responseHandler]; } -- (void)cancelSetActivePresetRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self cancelSetActivePresetRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterCancelSetActivePresetRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::CancelSetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - - (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { @@ -13757,11 +13726,6 @@ - (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataVal return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID) params:params]; } -- (NSDictionary * _Nullable)readAttributeQueuedPresetWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 4e74aa8828a718..375e0dc99491f2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7687,8 +7687,6 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRThermostatClusterSetActivePresetRequestParams : NSObject @property (nonatomic, copy) NSData * _Nonnull presetHandle MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable delayMinutes MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7801,34 +7799,6 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRThermostatClusterCancelSetActivePresetRequestParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_PROVISIONALLY_AVAILABLE @interface MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 1dd6753fa889ed..298c156d74b572 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -21834,8 +21834,6 @@ - (instancetype)init if (self = [super init]) { _presetHandle = [NSData data]; - - _delayMinutes = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21847,7 +21845,6 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterSetActivePresetRequestParams alloc] init]; other.presetHandle = self.presetHandle; - other.delayMinutes = self.delayMinutes; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21856,7 +21853,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetHandle:%@; delayMinutes:%@; >", NSStringFromClass([self class]), [_presetHandle base64EncodedStringWithOptions:0], _delayMinutes]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetHandle:%@; >", NSStringFromClass([self class]), [_presetHandle base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -21871,12 +21868,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.presetHandle = AsByteSpan(self.presetHandle); } - { - if (self.delayMinutes != nil) { - auto & definedValue_0 = encodableStruct.delayMinutes.Emplace(); - definedValue_0 = self.delayMinutes.unsignedShortValue; - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -22141,79 +22132,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterCancelSetActivePresetRequestParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRThermostatClusterCancelSetActivePresetRequestParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRThermostatClusterCancelSetActivePresetRequestParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - @implementation MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index f281c8e89570d1..0f16a454cc6217 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1462,12 +1462,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRThermostatClusterCancelSetActivePresetRequestParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 2d5da93d9df2f5..c52055a8a9a405 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1652,12 +1652,6 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull presetTypeFeatures MTR_PROVISIONALLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRThermostatClusterQueuedPresetStruct : NSObject -@property (nonatomic, copy) NSData * _Nullable presetHandle MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable transitionTimestamp MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_PROVISIONALLY_AVAILABLE @interface MTRThermostatClusterScheduleTypeStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull systemMode MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 559789940c7fb9..bcb84b6739cdd3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -6980,36 +6980,6 @@ - (NSString *)description @end -@implementation MTRThermostatClusterQueuedPresetStruct -- (instancetype)init -{ - if (self = [super init]) { - - _presetHandle = nil; - - _transitionTimestamp = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRThermostatClusterQueuedPresetStruct alloc] init]; - - other.presetHandle = self.presetHandle; - other.transitionTimestamp = self.transitionTimestamp; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetHandle:%@; transitionTimestamp:%@; >", NSStringFromClass([self class]), [_presetHandle base64EncodedStringWithOptions:0], _transitionTimestamp]; - return descriptionString; -} - -@end - @implementation MTRThermostatClusterScheduleTypeStruct - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 1619aeb30881d7..e0927b4a83c823 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -6169,12 +6169,6 @@ bool emberAfThermostatClusterCancelPresetsSchedulesEditRequestCallback( bool emberAfThermostatClusterCommitPresetsSchedulesRequestCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::DecodableType & commandData); -/** - * @brief Thermostat Cluster CancelSetActivePresetRequest Command callback (from client) - */ -bool emberAfThermostatClusterCancelSetActivePresetRequestCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::DecodableType & commandData); /** * @brief Thermostat Cluster SetTemperatureSetpointHoldPolicy Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 27601f4e651c63..230f87604e0cd8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -3975,7 +3975,6 @@ enum class Feature : uint32_t kMatterScheduleConfiguration = 0x80, kPresets = 0x100, kSetpoints = 0x200, - kQueuedPresetsSupported = 0x400, }; // Bitmap for HVACSystemTypeBitmap diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 289909746b0640..b7f127b2af8d42 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -20522,47 +20522,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace PresetTypeStruct -namespace QueuedPresetStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPresetHandle), presetHandle); - encoder.Encode(to_underlying(Fields::kTransitionTimestamp), transitionTimestamp); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kPresetHandle)) - { - err = DataModel::Decode(reader, presetHandle); - } - else if (__context_tag == to_underlying(Fields::kTransitionTimestamp)) - { - err = DataModel::Decode(reader, transitionTimestamp); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace QueuedPresetStruct - namespace ScheduleTypeStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -20892,7 +20851,6 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kPresetHandle), presetHandle); - encoder.Encode(to_underlying(Fields::kDelayMinutes), delayMinutes); return encoder.Finalize(); } @@ -20914,10 +20872,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, presetHandle); } - else if (__context_tag == to_underlying(Fields::kDelayMinutes)) - { - err = DataModel::Decode(reader, delayMinutes); - } else { } @@ -21000,26 +20954,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace CommitPresetsSchedulesRequest. -namespace CancelSetActivePresetRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace CancelSetActivePresetRequest. namespace SetTemperatureSetpointHoldPolicy { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -21185,8 +21119,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, temperatureSetpointHoldPolicy); case Attributes::SetpointHoldExpiryTimestamp::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, setpointHoldExpiryTimestamp); - case Attributes::QueuedPreset::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, queuedPreset); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index d396989d0a6edf..c35131c7b413ce 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -28674,29 +28674,6 @@ struct Type using DecodableType = Type; } // namespace PresetTypeStruct -namespace QueuedPresetStruct { -enum class Fields : uint8_t -{ - kPresetHandle = 0, - kTransitionTimestamp = 1, -}; - -struct Type -{ -public: - DataModel::Nullable presetHandle; - DataModel::Nullable transitionTimestamp; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace QueuedPresetStruct namespace ScheduleTypeStruct { enum class Fields : uint8_t { @@ -28802,11 +28779,6 @@ struct Type; struct DecodableType; } // namespace CommitPresetsSchedulesRequest -namespace CancelSetActivePresetRequest { -struct Type; -struct DecodableType; -} // namespace CancelSetActivePresetRequest - namespace SetTemperatureSetpointHoldPolicy { struct Type; struct DecodableType; @@ -29031,7 +29003,6 @@ namespace SetActivePresetRequest { enum class Fields : uint8_t { kPresetHandle = 0, - kDelayMinutes = 1, }; struct Type @@ -29042,7 +29013,6 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } chip::ByteSpan presetHandle; - Optional delayMinutes; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -29058,7 +29028,6 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } chip::ByteSpan presetHandle; - Optional delayMinutes; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetActivePresetRequest @@ -29150,34 +29119,6 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CommitPresetsSchedulesRequest -namespace CancelSetActivePresetRequest { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CancelSetActivePresetRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::CancelSetActivePresetRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace CancelSetActivePresetRequest namespace SetTemperatureSetpointHoldPolicy { enum class Fields : uint8_t { @@ -29970,20 +29911,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SetpointHoldExpiryTimestamp -namespace QueuedPreset { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = - chip::app::DataModel::Nullable; - using DecodableArgType = - const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::QueuedPreset::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace QueuedPreset namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -30106,7 +30033,6 @@ struct TypeInfo Attributes::TemperatureSetpointHoldPolicy::TypeInfo::DecodableType temperatureSetpointHoldPolicy = static_cast>(0); Attributes::SetpointHoldExpiryTimestamp::TypeInfo::DecodableType setpointHoldExpiryTimestamp; - Attributes::QueuedPreset::TypeInfo::DecodableType queuedPreset; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 03ddaed214890c..bd4d40736653a6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -5090,10 +5090,6 @@ namespace SetpointHoldExpiryTimestamp { static constexpr AttributeId Id = 0x00000054; } // namespace SetpointHoldExpiryTimestamp -namespace QueuedPreset { -static constexpr AttributeId Id = 0x00000055; -} // namespace QueuedPreset - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 7e0003ebe52fc4..02a3033b1d7519 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1300,10 +1300,6 @@ namespace CommitPresetsSchedulesRequest { static constexpr CommandId Id = 0x00000009; } // namespace CommitPresetsSchedulesRequest -namespace CancelSetActivePresetRequest { -static constexpr CommandId Id = 0x0000000A; -} // namespace CancelSetActivePresetRequest - namespace SetTemperatureSetpointHoldPolicy { static constexpr CommandId Id = 0x0000000B; } // namespace SetTemperatureSetpointHoldPolicy diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a9658c4a1ace4f..64ca20bb03ec01 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9229,7 +9229,6 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand | * StartPresetsSchedulesEditRequest | 0x07 | | * CancelPresetsSchedulesEditRequest | 0x08 | | * CommitPresetsSchedulesRequest | 0x09 | -| * CancelSetActivePresetRequest | 0x0A | | * SetTemperatureSetpointHoldPolicy | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | @@ -9295,7 +9294,6 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand | * PresetsSchedulesEditable | 0x0052 | | * TemperatureSetpointHoldPolicy | 0x0053 | | * SetpointHoldExpiryTimestamp | 0x0054 | -| * QueuedPreset | 0x0055 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -9513,7 +9511,6 @@ class ThermostatSetActivePresetRequest : public ClusterCommand ClusterCommand("set-active-preset-request", credsIssuerConfig) { AddArgument("PresetHandle", &mRequest.presetHandle); - AddArgument("DelayMinutes", 0, UINT16_MAX, &mRequest.delayMinutes); ClusterCommand::AddArguments(); } @@ -9654,43 +9651,6 @@ class ThermostatCommitPresetsSchedulesRequest : public ClusterCommand chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::Type mRequest; }; -/* - * Command CancelSetActivePresetRequest - */ -class ThermostatCancelSetActivePresetRequest : public ClusterCommand -{ -public: - ThermostatCancelSetActivePresetRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("cancel-set-active-preset-request", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Type mRequest; -}; - /* * Command SetTemperatureSetpointHoldPolicy */ @@ -22509,7 +22469,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // // // Attributes @@ -22596,7 +22555,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c credsIssuerConfig), // make_unique(Id, "setpoint-hold-expiry-timestamp", Attributes::SetpointHoldExpiryTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "queued-preset", Attributes::QueuedPreset::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -22769,9 +22727,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique>>(Id, "setpoint-hold-expiry-timestamp", 0, UINT32_MAX, Attributes::SetpointHoldExpiryTimestamp::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "queued-preset", Attributes::QueuedPreset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -22871,7 +22826,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c credsIssuerConfig), // make_unique(Id, "setpoint-hold-expiry-timestamp", Attributes::SetpointHoldExpiryTimestamp::Id, credsIssuerConfig), // - make_unique(Id, "queued-preset", Attributes::QueuedPreset::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 6c7da78177ff10..4c8ae677203679 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -4111,38 +4111,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::P ComplexArgumentParser::Finalize(request.presetTypeFeatures); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("QueuedPresetStruct.presetHandle", "presetHandle", - value.isMember("presetHandle"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("QueuedPresetStruct.transitionTimestamp", "transitionTimestamp", - value.isMember("transitionTimestamp"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetHandle"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetHandle, value["presetHandle"])); - valueCopy.removeMember("presetHandle"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "transitionTimestamp"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.transitionTimestamp, value["transitionTimestamp"])); - valueCopy.removeMember("transitionTimestamp"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.presetHandle); - ComplexArgumentParser::Finalize(request.transitionTimestamp); -} - CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 4d7544b92daa32..bad45ca45c5806 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -470,11 +470,6 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Str static void Finalize(chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request); - static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 1f8be3d7029a79..dea18bff893114 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3635,31 +3635,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("PresetHandle", indent + 1, value.presetHandle); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetHandle'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("TransitionTimestamp", indent + 1, value.transitionTimestamp); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TransitionTimestamp'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::DecodableType & value) { @@ -14547,11 +14522,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SetpointHoldExpiryTimestamp", 1, value); } - case Thermostat::Attributes::QueuedPreset::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("QueuedPreset", 1, value); - } case Thermostat::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index ab1040c7069e3b..a41c662996d5d2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -294,9 +294,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::DecodableType & value); - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::DecodableType & value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 2bea6e6b3fff8a..580563fffdd898 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -104472,7 +104472,6 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs | * StartPresetsSchedulesEditRequest | 0x07 | | * CancelPresetsSchedulesEditRequest | 0x08 | | * CommitPresetsSchedulesRequest | 0x09 | -| * CancelSetActivePresetRequest | 0x0A | | * SetTemperatureSetpointHoldPolicy | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | @@ -104538,7 +104537,6 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs | * PresetsSchedulesEditable | 0x0052 | | * TemperatureSetpointHoldPolicy | 0x0053 | | * SetpointHoldExpiryTimestamp | 0x0054 | -| * QueuedPreset | 0x0055 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -104835,9 +104833,6 @@ class ThermostatSetActivePresetRequest : public ClusterCommand { { #if MTR_ENABLE_PROVISIONAL AddArgument("PresetHandle", &mRequest.presetHandle); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("DelayMinutes", 0, UINT16_MAX, &mRequest.delayMinutes); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -104855,13 +104850,6 @@ class ThermostatSetActivePresetRequest : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.presetHandle = [NSData dataWithBytes:mRequest.presetHandle.data() length:mRequest.presetHandle.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.delayMinutes.HasValue()) { - params.delayMinutes = [NSNumber numberWithUnsignedShort:mRequest.delayMinutes.Value()]; - } else { - params.delayMinutes = nil; - } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -105031,52 +105019,6 @@ class ThermostatCommitPresetsSchedulesRequest : public ClusterCommand { private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CancelSetActivePresetRequest - */ -class ThermostatCancelSetActivePresetRequest : public ClusterCommand { -public: - ThermostatCancelSetActivePresetRequest() - : ClusterCommand("cancel-set-active-preset-request") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterCancelSetActivePresetRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster cancelSetActivePresetRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* @@ -111560,91 +111502,6 @@ class SubscribeAttributeThermostatSetpointHoldExpiryTimestamp : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute QueuedPreset - */ -class ReadThermostatQueuedPreset : public ReadAttribute { -public: - ReadThermostatQueuedPreset() - : ReadAttribute("queued-preset") - { - } - - ~ReadThermostatQueuedPreset() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::QueuedPreset::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeQueuedPresetWithCompletion:^(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.QueuedPreset response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat QueuedPreset read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatQueuedPreset : public SubscribeAttribute { -public: - SubscribeAttributeThermostatQueuedPreset() - : SubscribeAttribute("queued-preset") - { - } - - ~SubscribeAttributeThermostatQueuedPreset() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::QueuedPreset::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeQueuedPresetWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.QueuedPreset response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - #endif // MTR_ENABLE_PROVISIONAL /* @@ -190684,9 +190541,6 @@ void registerClusterThermostat(Commands & commands) #if MTR_ENABLE_PROVISIONAL make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // #endif // MTR_ENABLE_PROVISIONAL @@ -190871,10 +190725,6 @@ void registerClusterThermostat(Commands & commands) #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), //