From 44bf76e063a965bca71fdbe9ca6c9ab64c5b4f0a Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Fri, 1 Sep 2023 10:38:49 -0500 Subject: [PATCH 01/13] Remove provisional (and disallowed by the device type) attribtes from the derivations of Mode Base for: - Refrigerator - Laundry Washer - Dishwasher Tests: - Regen all - build all - build chip-tool and all-clusters - via chip-tool, pair all-clusters and read the attribute list from the affected clusters --- .../all-clusters-app.matter | 12 - .../chip/dishwasher-mode-cluster.xml | 2 - .../chip/laundry-washer-mode-cluster.xml | 2 - ...rature-controlled-cabinet-mode-cluster.xml | 2 - .../zcl/zcl-with-test-extensions.json | 66 +- src/app/zap-templates/zcl/zcl.json | 66 +- .../data_model/controller-clusters.matter | 6 - .../devicecontroller/ClusterIDMapping.java | 6 - .../devicecontroller/ClusterReadMapping.java | 66 -- .../devicecontroller/ClusterWriteMapping.java | 132 --- ...olClusterAccessControlEntryChangedEvent.kt | 99 +-- ...usterAccessControlExtensionChangedEvent.kt | 99 +-- .../ActionsClusterActionFailedEvent.kt | 21 +- .../ActionsClusterStateChangedEvent.kt | 15 +- .../BasicInformationClusterLeaveEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 13 +- .../BasicInformationClusterStartUpEvent.kt | 13 +- .../BooleanStateClusterStateChangeEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 16 +- ...viceBasicInformationClusterStartUpEvent.kt | 13 +- .../DishwasherAlarmClusterNotifyEvent.kt | 21 +- .../DoorLockClusterDoorLockAlarmEvent.kt | 13 +- .../DoorLockClusterDoorStateChangeEvent.kt | 13 +- .../DoorLockClusterLockOperationErrorEvent.kt | 159 ++-- .../DoorLockClusterLockOperationEvent.kt | 156 ++-- .../DoorLockClusterLockUserChangeEvent.kt | 121 ++- ...eneralDiagnosticsClusterBootReasonEvent.kt | 13 +- ...gnosticsClusterHardwareFaultChangeEvent.kt | 46 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 46 +- ...DiagnosticsClusterRadioFaultChangeEvent.kt | 46 +- ...nalStateClusterOperationCompletionEvent.kt | 94 +- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- ...pdateRequestorClusterDownloadErrorEvent.kt | 73 +- ...ateRequestorClusterStateTransitionEvent.kt | 52 +- ...dateRequestorClusterVersionAppliedEvent.kt | 20 +- ...rSourceClusterBatChargeFaultChangeEvent.kt | 43 +- .../PowerSourceClusterBatFaultChangeEvent.kt | 43 +- ...PowerSourceClusterWiredFaultChangeEvent.kt | 43 +- .../RefrigeratorAlarmClusterNotifyEvent.kt | 21 +- ...nalStateClusterOperationCompletionEvent.kt | 97 +-- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- .../SmokeCoAlarmClusterCOAlarmEvent.kt | 13 +- ...eCoAlarmClusterInterconnectCOAlarmEvent.kt | 13 +- ...AlarmClusterInterconnectSmokeAlarmEvent.kt | 13 +- .../SmokeCoAlarmClusterLowBatteryEvent.kt | 13 +- .../SmokeCoAlarmClusterSmokeAlarmEvent.kt | 13 +- ...areDiagnosticsClusterSoftwareFaultEvent.kt | 52 +- .../SwitchClusterInitialPressEvent.kt | 13 +- .../SwitchClusterLongPressEvent.kt | 13 +- .../SwitchClusterLongReleaseEvent.kt | 13 +- .../SwitchClusterMultiPressCompleteEvent.kt | 20 +- .../SwitchClusterMultiPressOngoingEvent.kt | 20 +- .../SwitchClusterShortReleaseEvent.kt | 13 +- .../SwitchClusterSwitchLatchedEvent.kt | 13 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 49 +- ...imeSynchronizationClusterDSTStatusEvent.kt | 13 +- ...nchronizationClusterTimeZoneStatusEvent.kt | 30 +- .../UnitTestingClusterTestEventEvent.kt | 65 +- ...estingClusterTestFabricScopedEventEvent.kt | 13 +- ...agnosticsClusterAssociationFailureEvent.kt | 20 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...orkDiagnosticsClusterDisconnectionEvent.kt | 13 +- ...sControlClusterAccessControlEntryStruct.kt | 108 ++- ...trolClusterAccessControlExtensionStruct.kt | 14 +- ...ControlClusterAccessControlTargetStruct.kt | 82 +- .../structs/ActionsClusterActionStruct.kt | 34 +- .../ActionsClusterEndpointListStruct.kt | 35 +- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...pplicationBasicClusterApplicationStruct.kt | 17 +- ...ationLauncherClusterApplicationEPStruct.kt | 39 +- ...icationLauncherClusterApplicationStruct.kt | 17 +- .../AudioOutputClusterOutputInfoStruct.kt | 15 +- ...nformationClusterCapabilityMinimaStruct.kt | 25 +- ...formationClusterProductAppearanceStruct.kt | 35 +- .../structs/BindingClusterTargetStruct.kt | 90 +- ...formationClusterProductAppearanceStruct.kt | 41 +- .../ChannelClusterChannelInfoStruct.kt | 81 +- .../structs/ChannelClusterLineupInfoStruct.kt | 54 +- ...tentLauncherClusterAdditionalInfoStruct.kt | 14 +- ...auncherClusterBrandingInformationStruct.kt | 143 ++-- ...ntentLauncherClusterContentSearchStruct.kt | 29 +- .../ContentLauncherClusterDimensionStruct.kt | 19 +- .../ContentLauncherClusterParameterStruct.kt | 54 +- ...ntLauncherClusterStyleInformationStruct.kt | 71 +- .../DescriptorClusterDeviceTypeStruct.kt | 14 +- .../DescriptorClusterSemanticTagStruct.kt | 76 +- .../DishwasherModeClusterModeOptionStruct.kt | 33 +- .../DishwasherModeClusterModeTagStruct.kt | 30 +- .../DoorLockClusterCredentialStruct.kt | 14 +- .../structs/FixedLabelClusterLabelStruct.kt | 14 +- ...missioningClusterBasicCommissioningInfo.kt | 28 +- ...neralDiagnosticsClusterNetworkInterface.kt | 117 ++- ...pKeyManagementClusterGroupInfoMapStruct.kt | 51 +- ...upKeyManagementClusterGroupKeyMapStruct.kt | 19 +- ...upKeyManagementClusterGroupKeySetStruct.kt | 169 ++-- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...mentClusterMonitoringRegistrationStruct.kt | 28 +- ...aundryWasherModeClusterModeOptionStruct.kt | 33 +- .../LaundryWasherModeClusterModeTagStruct.kt | 30 +- .../MediaInputClusterInputInfoStruct.kt | 21 +- ...iaPlaybackClusterPlaybackPositionStruct.kt | 35 +- .../ModeSelectClusterModeOptionStruct.kt | 33 +- .../ModeSelectClusterSemanticTagStruct.kt | 14 +- ...rkCommissioningClusterNetworkInfoStruct.kt | 17 +- ...gClusterThreadInterfaceScanResultStruct.kt | 43 +- ...ingClusterWiFiInterfaceScanResultStruct.kt | 37 +- ...redentialsClusterFabricDescriptorStruct.kt | 37 +- .../OperationalCredentialsClusterNOCStruct.kt | 40 +- ...OperationalStateClusterErrorStateStruct.kt | 58 +- ...ionalStateClusterOperationalStateStruct.kt | 38 +- ...eUpdateRequestorClusterProviderLocation.kt | 25 +- ...erSourceClusterBatChargeFaultChangeType.kt | 43 +- .../PowerSourceClusterBatFaultChangeType.kt | 43 +- .../PowerSourceClusterWiredFaultChangeType.kt | 43 +- ...olledCabinetModeClusterModeOptionStruct.kt | 47 +- ...ntrolledCabinetModeClusterModeTagStruct.kt | 36 +- .../RvcCleanModeClusterModeOptionStruct.kt | 33 +- .../RvcCleanModeClusterModeTagStruct.kt | 30 +- ...OperationalStateClusterErrorStateStruct.kt | 58 +- ...ionalStateClusterOperationalStateStruct.kt | 38 +- .../RvcRunModeClusterModeOptionStruct.kt | 33 +- .../structs/RvcRunModeClusterModeTagStruct.kt | 30 +- .../ScenesClusterAttributeValuePair.kt | 14 +- .../structs/ScenesClusterExtensionFieldSet.kt | 31 +- ...reDiagnosticsClusterThreadMetricsStruct.kt | 98 +-- .../TargetNavigatorClusterTargetInfoStruct.kt | 14 +- ...statClusterThermostatScheduleTransition.kt | 67 +- ...rkDiagnosticsClusterNeighborTableStruct.kt | 103 +-- ...ticsClusterOperationalDatasetComponents.kt | 70 +- ...tworkDiagnosticsClusterRouteTableStruct.kt | 46 +- ...NetworkDiagnosticsClusterSecurityPolicy.kt | 14 +- ...meSynchronizationClusterDSTOffsetStruct.kt | 40 +- ...sterFabricScopedTrustedTimeSourceStruct.kt | 20 +- ...imeSynchronizationClusterTimeZoneStruct.kt | 35 +- ...onizationClusterTrustedTimeSourceStruct.kt | 19 +- ...nitTestingClusterDoubleNestedStructList.kt | 27 +- .../structs/UnitTestingClusterNestedStruct.kt | 19 +- .../UnitTestingClusterNestedStructList.kt | 86 +- ...stingClusterNullablesAndOptionalsStruct.kt | 410 ++++----- .../structs/UnitTestingClusterSimpleStruct.kt | 29 +- .../UnitTestingClusterTestFabricScoped.kt | 145 ++-- .../UnitTestingClusterTestListStructOctet.kt | 14 +- .../structs/UserLabelClusterLabelStruct.kt | 14 +- .../CHIPAttributeTLVValueDecoder.cpp | 138 --- .../zap-generated/CHIPClustersWrite-JNI.cpp | 362 -------- .../java/zap-generated/CHIPReadCallbacks.cpp | 408 --------- .../chip/devicecontroller/ChipClusters.java | 198 ----- .../devicecontroller/ClusterInfoMapping.java | 114 --- .../python/chip/clusters/CHIPClusters.py | 42 - .../python/chip/clusters/Objects.py | 108 --- .../MTRAttributeSpecifiedCheck.mm | 18 - .../MTRAttributeTLVValueDecoder.mm | 102 --- .../CHIP/zap-generated/MTRBaseClusters.h | 102 --- .../CHIP/zap-generated/MTRBaseClusters.mm | 510 ----------- .../CHIP/zap-generated/MTRClusterConstants.h | 8 - .../CHIP/zap-generated/MTRClusters.h | 42 - .../CHIP/zap-generated/MTRClusters.mm | 168 ---- .../zap-generated/cluster-objects.cpp | 18 - .../zap-generated/cluster-objects.h | 78 -- .../app-common/zap-generated/ids/Attributes.h | 24 - .../zap-generated/cluster/Commands.h | 30 - .../cluster/logging/DataModelLogger.cpp | 30 - .../zap-generated/cluster/Commands.h | 800 ------------------ 164 files changed, 2955 insertions(+), 6515 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 8ed04348a47f3c..bd15ad69a7a4fd 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 @@ -2542,8 +2542,6 @@ server cluster LaundryWasherMode = 81 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u startUpMode = 2; - attribute nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2587,8 +2585,6 @@ server cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u startUpMode = 2; - attribute nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2814,8 +2810,6 @@ server cluster DishwasherMode = 89 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute nullable int8u startUpMode = 2; - attribute nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6725,8 +6719,6 @@ endpoint 1 { server cluster LaundryWasherMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute startUpMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -6737,8 +6729,6 @@ endpoint 1 { server cluster RefrigeratorAndTemperatureControlledCabinetMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute startUpMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -6808,8 +6798,6 @@ endpoint 1 { server cluster DishwasherMode { callback attribute supportedModes; callback attribute currentMode; - callback attribute startUpMode; - callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml index 49e4d4c86ff105..e6ee5e52ce4006 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml @@ -36,8 +36,6 @@ limitations under the License. SupportedModes CurrentMode - StartUpMode - OnMode diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml index 95eb512618f274..8d35419656a0d4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml @@ -36,8 +36,6 @@ limitations under the License. SupportedModes CurrentMode - StartUpMode - OnMode diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml index c55109379e5aa2..b593858f3f105d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml @@ -34,8 +34,6 @@ limitations under the License. SupportedModes CurrentMode - StartUpMode - OnMode 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 23d31a680befb4..a0477c580041f4 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -113,9 +113,15 @@ "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { "text": { - "defaultResponsePolicy": ["Always", "Conditional", "Never"] + "defaultResponsePolicy": [ + "Always", + "Conditional", + "Never" + ] }, - "bool": ["commandDiscovery"] + "bool": [ + "commandDiscovery" + ] }, "defaults": { "text": { @@ -159,8 +165,12 @@ "CapabilityMinima", "ProductAppearance" ], - "Bridged Device Basic Information": ["ProductAppearance"], - "Descriptor": ["ClusterRevision"], + "Bridged Device Basic Information": [ + "ProductAppearance" + ], + "Descriptor": [ + "ClusterRevision" + ], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -214,7 +224,10 @@ "FeatureMap", "ThreadMetrics" ], - "Scenes": ["SceneCount", "RemainingCapacity"], + "Scenes": [ + "SceneCount", + "RemainingCapacity" + ], "Unit Testing": [ "struct_attr", "nullable_struct", @@ -298,10 +311,19 @@ "CurrentMaxRate", "OverrunCount" ], - "Channel": ["Lineup", "CurrentChannel"], - "Media Playback": ["SampledPosition"], - "Application Launcher": ["CurrentApp"], - "Application Basic": ["Application"], + "Channel": [ + "Lineup", + "CurrentChannel" + ], + "Media Playback": [ + "SampledPosition" + ], + "Application Launcher": [ + "CurrentApp" + ], + "Application Basic": [ + "Application" + ], "Time Synchronization": [ "TrustedTimeSource", "DefaultNTP", @@ -313,26 +335,22 @@ "TimeZoneListMaxSize", "DSTOffsetListMaxSize" ], - "Temperature Control": ["SupportedTemperatureLevels"], + "Temperature Control": [ + "SupportedTemperatureLevels" + ], "Dishwasher Mode": [ "SupportedModes", "CurrentMode", - "StartUpMode", - "OnMode", "FeatureMap" ], "Laundry Washer Mode": [ "SupportedModes", "CurrentMode", - "StartUpMode", - "OnMode", "FeatureMap" ], "Refrigerator And Temperature Controlled Cabinet Mode": [ "SupportedModes", "CurrentMode", - "StartUpMode", - "OnMode", "FeatureMap" ], "RVC Clean Mode": [ @@ -519,14 +537,24 @@ "LevelValue", "FeatureMap" ], - "Air Quality": ["AirQuality", "FeatureMap"] + "Air Quality": [ + "AirQuality", + "FeatureMap" + ] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], + "ZCLDataTypes": [ + "ARRAY", + "BITMAP", + "ENUM", + "NUMBER", + "STRING", + "STRUCT" + ], "fabricHandling": { "automaticallyCreateFields": true, "indexFieldId": 254, "indexFieldName": "FabricIndex", "indexType": "fabric_idx" } -} +} \ No newline at end of file diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 803c56012be49c..c1a9f7cc4727cf 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -111,9 +111,15 @@ "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { "text": { - "defaultResponsePolicy": ["Always", "Conditional", "Never"] + "defaultResponsePolicy": [ + "Always", + "Conditional", + "Never" + ] }, - "bool": ["commandDiscovery"] + "bool": [ + "commandDiscovery" + ] }, "defaults": { "text": { @@ -157,8 +163,12 @@ "CapabilityMinima", "ProductAppearance" ], - "Bridged Device Basic Information": ["ProductAppearance"], - "Descriptor": ["ClusterRevision"], + "Bridged Device Basic Information": [ + "ProductAppearance" + ], + "Descriptor": [ + "ClusterRevision" + ], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -212,7 +222,10 @@ "FeatureMap", "ThreadMetrics" ], - "Scenes": ["SceneCount", "RemainingCapacity"], + "Scenes": [ + "SceneCount", + "RemainingCapacity" + ], "Unit Testing": [ "struct_attr", "nullable_struct", @@ -296,10 +309,19 @@ "CurrentMaxRate", "OverrunCount" ], - "Channel": ["Lineup", "CurrentChannel"], - "Media Playback": ["SampledPosition"], - "Application Launcher": ["CurrentApp"], - "Application Basic": ["Application"], + "Channel": [ + "Lineup", + "CurrentChannel" + ], + "Media Playback": [ + "SampledPosition" + ], + "Application Launcher": [ + "CurrentApp" + ], + "Application Basic": [ + "Application" + ], "Time Synchronization": [ "TrustedTimeSource", "DefaultNTP", @@ -311,26 +333,22 @@ "TimeZoneListMaxSize", "DSTOffsetListMaxSize" ], - "Temperature Control": ["SupportedTemperatureLevels"], + "Temperature Control": [ + "SupportedTemperatureLevels" + ], "Dishwasher Mode": [ "SupportedModes", "CurrentMode", - "StartUpMode", - "OnMode", "FeatureMap" ], "Laundry Washer Mode": [ "SupportedModes", "CurrentMode", - "StartUpMode", - "OnMode", "FeatureMap" ], "Refrigerator And Temperature Controlled Cabinet Mode": [ "SupportedModes", "CurrentMode", - "StartUpMode", - "OnMode", "FeatureMap" ], "RVC Clean Mode": [ @@ -517,14 +535,24 @@ "LevelValue", "FeatureMap" ], - "Air Quality": ["AirQuality", "FeatureMap"] + "Air Quality": [ + "AirQuality", + "FeatureMap" + ] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], + "ZCLDataTypes": [ + "ARRAY", + "BITMAP", + "ENUM", + "NUMBER", + "STRING", + "STRUCT" + ], "fabricHandling": { "automaticallyCreateFields": true, "indexFieldId": 254, "indexFieldName": "FabricIndex", "indexType": "fabric_idx" } -} +} \ No newline at end of file diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cea8a51bb4d640..8d63bb2568c529 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2849,8 +2849,6 @@ client cluster LaundryWasherMode = 81 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2896,8 +2894,6 @@ client cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3134,8 +3130,6 @@ client cluster DishwasherMode = 89 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index dedcfd9290312d..6a24980b579780 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -6224,8 +6224,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6346,8 +6344,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7044,8 +7040,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 338023c10f36c1..d21786bc935fa2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -6101,28 +6101,6 @@ private static Map readLaundryWasherModeInteractionInfo readLaundryWasherModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readLaundryWasherModeCurrentModeAttributeInteractionInfo); - Map readLaundryWasherModeStartUpModeCommandParams = new LinkedHashMap(); - InteractionInfo readLaundryWasherModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.LaundryWasherModeCluster) cluster).readStartUpModeAttribute( - (ChipClusters.LaundryWasherModeCluster.StartUpModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLaundryWasherModeClusterStartUpModeAttributeCallback(), - readLaundryWasherModeStartUpModeCommandParams - ); - result.put("readStartUpModeAttribute", readLaundryWasherModeStartUpModeAttributeInteractionInfo); - Map readLaundryWasherModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readLaundryWasherModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.LaundryWasherModeCluster) cluster).readOnModeAttribute( - (ChipClusters.LaundryWasherModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLaundryWasherModeClusterOnModeAttributeCallback(), - readLaundryWasherModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readLaundryWasherModeOnModeAttributeInteractionInfo); Map readLaundryWasherModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readLaundryWasherModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6215,28 +6193,6 @@ private static Map readRefrigeratorAndTemperatureContro readRefrigeratorAndTemperatureControlledCabinetModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readRefrigeratorAndTemperatureControlledCabinetModeCurrentModeAttributeInteractionInfo); - Map readRefrigeratorAndTemperatureControlledCabinetModeStartUpModeCommandParams = new LinkedHashMap(); - InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster) cluster).readStartUpModeAttribute( - (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.StartUpModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterStartUpModeAttributeCallback(), - readRefrigeratorAndTemperatureControlledCabinetModeStartUpModeCommandParams - ); - result.put("readStartUpModeAttribute", readRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeInteractionInfo); - Map readRefrigeratorAndTemperatureControlledCabinetModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster) cluster).readOnModeAttribute( - (ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterOnModeAttributeCallback(), - readRefrigeratorAndTemperatureControlledCabinetModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeInteractionInfo); Map readRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6910,28 +6866,6 @@ private static Map readDishwasherModeInteractionInfo() readDishwasherModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readDishwasherModeCurrentModeAttributeInteractionInfo); - Map readDishwasherModeStartUpModeCommandParams = new LinkedHashMap(); - InteractionInfo readDishwasherModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DishwasherModeCluster) cluster).readStartUpModeAttribute( - (ChipClusters.DishwasherModeCluster.StartUpModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedDishwasherModeClusterStartUpModeAttributeCallback(), - readDishwasherModeStartUpModeCommandParams - ); - result.put("readStartUpModeAttribute", readDishwasherModeStartUpModeAttributeInteractionInfo); - Map readDishwasherModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readDishwasherModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DishwasherModeCluster) cluster).readOnModeAttribute( - (ChipClusters.DishwasherModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedDishwasherModeClusterOnModeAttributeCallback(), - readDishwasherModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readDishwasherModeOnModeAttributeInteractionInfo); Map readDishwasherModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readDishwasherModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 595222f79f5a38..d99785cc8ef882 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -771,96 +771,8 @@ public Map> getWriteAttributeMap() { writeModeSelectInteractionInfo.put("writeOnModeAttribute", writeModeSelectOnModeAttributeInteractionInfo); writeAttributeMap.put("modeSelect", writeModeSelectInteractionInfo); Map writeLaundryWasherModeInteractionInfo = new LinkedHashMap<>(); - Map writeLaundryWasherModeStartUpModeCommandParams = new LinkedHashMap(); - CommandParameterInfo laundryWasherModestartUpModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeLaundryWasherModeStartUpModeCommandParams.put( - "value", - laundryWasherModestartUpModeCommandParameterInfo - ); - InteractionInfo writeLaundryWasherModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.LaundryWasherModeCluster) cluster).writeStartUpModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeLaundryWasherModeStartUpModeCommandParams - ); - writeLaundryWasherModeInteractionInfo.put("writeStartUpModeAttribute", writeLaundryWasherModeStartUpModeAttributeInteractionInfo); - Map writeLaundryWasherModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo laundryWasherModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeLaundryWasherModeOnModeCommandParams.put( - "value", - laundryWasherModeonModeCommandParameterInfo - ); - InteractionInfo writeLaundryWasherModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.LaundryWasherModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeLaundryWasherModeOnModeCommandParams - ); - writeLaundryWasherModeInteractionInfo.put("writeOnModeAttribute", writeLaundryWasherModeOnModeAttributeInteractionInfo); writeAttributeMap.put("laundryWasherMode", writeLaundryWasherModeInteractionInfo); Map writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo = new LinkedHashMap<>(); - Map writeRefrigeratorAndTemperatureControlledCabinetModeStartUpModeCommandParams = new LinkedHashMap(); - CommandParameterInfo refrigeratorAndTemperatureControlledCabinetModestartUpModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeRefrigeratorAndTemperatureControlledCabinetModeStartUpModeCommandParams.put( - "value", - refrigeratorAndTemperatureControlledCabinetModestartUpModeCommandParameterInfo - ); - InteractionInfo writeRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster) cluster).writeStartUpModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeRefrigeratorAndTemperatureControlledCabinetModeStartUpModeCommandParams - ); - writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo.put("writeStartUpModeAttribute", writeRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeInteractionInfo); - Map writeRefrigeratorAndTemperatureControlledCabinetModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo refrigeratorAndTemperatureControlledCabinetModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeRefrigeratorAndTemperatureControlledCabinetModeOnModeCommandParams.put( - "value", - refrigeratorAndTemperatureControlledCabinetModeonModeCommandParameterInfo - ); - InteractionInfo writeRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeRefrigeratorAndTemperatureControlledCabinetModeOnModeCommandParams - ); - writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo.put("writeOnModeAttribute", writeRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeInteractionInfo); writeAttributeMap.put("refrigeratorAndTemperatureControlledCabinetMode", writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo); Map writeLaundryWasherControlsInteractionInfo = new LinkedHashMap<>(); Map writeLaundryWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); @@ -1005,50 +917,6 @@ public Map> getWriteAttributeMap() { Map writeRefrigeratorAlarmInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("refrigeratorAlarm", writeRefrigeratorAlarmInteractionInfo); Map writeDishwasherModeInteractionInfo = new LinkedHashMap<>(); - Map writeDishwasherModeStartUpModeCommandParams = new LinkedHashMap(); - CommandParameterInfo dishwasherModestartUpModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeDishwasherModeStartUpModeCommandParams.put( - "value", - dishwasherModestartUpModeCommandParameterInfo - ); - InteractionInfo writeDishwasherModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DishwasherModeCluster) cluster).writeStartUpModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeDishwasherModeStartUpModeCommandParams - ); - writeDishwasherModeInteractionInfo.put("writeStartUpModeAttribute", writeDishwasherModeStartUpModeAttributeInteractionInfo); - Map writeDishwasherModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo dishwasherModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeDishwasherModeOnModeCommandParams.put( - "value", - dishwasherModeonModeCommandParameterInfo - ); - InteractionInfo writeDishwasherModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DishwasherModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeDishwasherModeOnModeCommandParams - ); - writeDishwasherModeInteractionInfo.put("writeOnModeAttribute", writeDishwasherModeOnModeAttributeInteractionInfo); writeAttributeMap.put("dishwasherMode", writeDishwasherModeInteractionInfo); Map writeAirQualityInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("airQuality", writeAirQualityInteractionInfo); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt index e926e70d861c20..338c93d265e2c2 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlEntryChangedEvent( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlEntryChangedEvent ( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlEntryChangedEvent( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlEntryChangedEvent( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): AccessControlClusterAccessControlEntryChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = - if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct - .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryChangedEvent( - adminNodeID, - adminPasscodeID, - changeType, - latestValue, - fabricIndex - ) + return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt index e01b81cec705bb..064b86812956d4 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionChangedEvent( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlExtensionChangedEvent ( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlExtensionChangedEvent( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): AccessControlClusterAccessControlExtensionChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = - if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct - .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlExtensionChangedEvent( - adminNodeID, - adminPasscodeID, - changeType, - latestValue, - fabricIndex - ) + return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt index d2e375338f705d..167cdbeaebfee4 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterActionFailedEvent( - val actionID: Int, - val invokeID: Long, - val newState: Int, - val error: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterActionFailedEvent ( + val actionID: Int, + val invokeID: Long, + val newState: Int, + val error: Int) { + override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -54,13 +57,13 @@ class ActionsClusterActionFailedEvent( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) val error = tlvReader.getInt(ContextSpecificTag(TAG_ERROR)) - + tlvReader.exitContainer() return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt index 05ad68aae272ea..cd461b0ff538ef 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterStateChangedEvent ( + val actionID: Int, + val invokeID: Long, + val newState: Int) { + override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -46,12 +53,12 @@ class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterStateChangedEvent { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) - + tlvReader.exitContainer() return ActionsClusterStateChangedEvent(actionID, invokeID, newState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt index 962ed26cddb40d..e45d705386325c 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterLeaveEvent ( + val fabricIndex: Int) { + override fun toString(): String = buildString { append("BasicInformationClusterLeaveEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { companion object { private const val TAG_FABRIC_INDEX = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterLeaveEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BasicInformationClusterLeaveEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt index c40211aa617dcc..025e619be435d4 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt index 23082666b05cae..f0ab0ec9b2e99f 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterStartUpEvent ( + val softwareVersion: Long) { + override fun toString(): String = buildString { append("BasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt index a0ecfb76141580..8194ba7d1f742d 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BooleanStateClusterStateChangeEvent { tlvReader.enterStructure(tag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) - + tlvReader.exitContainer() return BooleanStateClusterStateChangeEvent(stateValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt index e75b2f7af96f93..c66f3595c88152 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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( - tag: Tag, - tlvReader: TlvReader - ): BridgedDeviceBasicInformationClusterReachableChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt index 80c60be6847056..9b1e886926c1bd 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterStartUpEvent ( + val softwareVersion: Long) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -40,10 +45,10 @@ class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt index 0b7206788e842a..b2a29696b191a8 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DishwasherAlarmClusterNotifyEvent( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherAlarmClusterNotifyEvent ( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long) { + override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -54,13 +57,13 @@ class DishwasherAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherAlarmClusterNotifyEvent { tlvReader.enterStructure(tag) val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt index 6417fb85009e88..309eb4e52c29f2 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterDoorLockAlarmEvent ( + val alarmCode: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorLockAlarmEvent {\n") append("\talarmCode : $alarmCode\n") append("}\n") @@ -40,10 +45,10 @@ class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { companion object { private const val TAG_ALARM_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorLockAlarmEvent { tlvReader.enterStructure(tag) val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) - + tlvReader.exitContainer() return DoorLockClusterDoorLockAlarmEvent(alarmCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt index d0b6acbe7ea227..05068118f56c59 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterDoorStateChangeEvent ( + val doorState: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorStateChangeEvent {\n") append("\tdoorState : $doorState\n") append("}\n") @@ -40,10 +45,10 @@ class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { companion object { private const val TAG_DOOR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorStateChangeEvent { tlvReader.enterStructure(tag) val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) - + tlvReader.exitContainer() return DoorLockClusterDoorStateChangeEvent(doorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt index 59e38fa054dd87..34dd208597b65e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -20,21 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DoorLockClusterLockOperationErrorEvent( - val lockOperationType: Int, - val operationSource: Int, - val operationError: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val credentials: - Optional>? -) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationErrorEvent ( + val lockOperationType: Int, + val operationSource: Int, + val operationError: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: Optional>?) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationErrorEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -53,32 +53,32 @@ class DoorLockClusterLockOperationErrorEvent( put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } endStructure() } } @@ -92,68 +92,49 @@ class DoorLockClusterLockOperationErrorEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_CREDENTIALS = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationErrorEvent { tlvReader.enterStructure(tag) val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) val operationError = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_ERROR)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationErrorEvent( - lockOperationType, - operationSource, - operationError, - userIndex, - fabricIndex, - sourceNode, - credentials - ) + return DoorLockClusterLockOperationErrorEvent(lockOperationType, operationSource, operationError, userIndex, fabricIndex, sourceNode, credentials) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt index 4fbf71082c7adc..d1f83b46c08222 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -20,20 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DoorLockClusterLockOperationEvent( - val lockOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val credentials: - Optional>? -) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationEvent ( + val lockOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: Optional>?) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -50,32 +50,32 @@ class DoorLockClusterLockOperationEvent( put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } endStructure() } } @@ -88,66 +88,48 @@ class DoorLockClusterLockOperationEvent( private const val TAG_SOURCE_NODE = 4 private const val TAG_CREDENTIALS = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationEvent { tlvReader.enterStructure(tag) val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationEvent( - lockOperationType, - operationSource, - userIndex, - fabricIndex, - sourceNode, - credentials - ) + return DoorLockClusterLockOperationEvent(lockOperationType, operationSource, userIndex, fabricIndex, sourceNode, credentials) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt index 6fc562b39959ff..c8b7dd9380bb7f 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterLockUserChangeEvent( - val lockDataType: Int, - val dataOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val dataIndex: Int? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterLockUserChangeEvent ( + val lockDataType: Int, + val dataOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val dataIndex: Int?) { + override fun toString(): String = buildString { 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(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockUserChangeEvent { tlvReader.enterStructure(tag) val lockDataType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) val dataOperationType = tlvReader.getInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val dataIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockUserChangeEvent( - lockDataType, - dataOperationType, - operationSource, - userIndex, - fabricIndex, - sourceNode, - dataIndex - ) + return DoorLockClusterLockUserChangeEvent(lockDataType, dataOperationType, operationSource, userIndex, fabricIndex, sourceNode, dataIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt index 3d743983f1a00f..79b58b0d67cdae 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterBootReasonEvent ( + val bootReason: Int) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterBootReasonEvent {\n") append("\tbootReason : $bootReason\n") append("}\n") @@ -40,10 +45,10 @@ class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { companion object { private const val TAG_BOOT_REASON = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterBootReasonEvent { tlvReader.enterStructure(tag) val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) - + tlvReader.exitContainer() return GeneralDiagnosticsClusterBootReasonEvent(bootReason) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt index 1287eba322b742..207d45c24e3c40 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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,25 +57,23 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterHardwareFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt index f9fc3cadc8b934..5fed1abd0f4c09 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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,25 +57,23 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt index 35daf8dd691bf5..7a0b4e386ca3f9 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterRadioFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt index 092e062784a118..8e0999dbb5eed6 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class OperationalStateClusterOperationCompletionEvent( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional? -) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class OperationalStateClusterOperationCompletionEvent( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -65,39 +67,33 @@ class OperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return OperationalStateClusterOperationCompletionEvent( - completionErrorCode, - totalOperationalTime, - pausedTime - ) + return OperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt index b5623a0d701579..ef4633c2ffe087 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = - chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( - ContextSpecificTag(TAG_ERROR_STATE), - tlvReader - ) - + val errorState = chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) + tlvReader.exitContainer() return OperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt index 8a82cbf93c9f1f..3e7ac690e0fbab 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( - val softwareVersion: Long, - val bytesDownloaded: Long, - val progressPercent: Int?, - val platformCode: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( + val softwareVersion: Long, + val bytesDownloaded: Long, + val progressPercent: Int?, + val platformCode: Long?) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tbytesDownloaded : $bytesDownloaded\n") @@ -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( - tag: Tag, - tlvReader: TlvReader - ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) - val progressPercent = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - null - } - val platformCode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - null - } - + val progressPercent = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( - softwareVersion, - bytesDownloaded, - progressPercent, - platformCode - ) + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent(softwareVersion, bytesDownloaded, progressPercent, platformCode) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt index b0b075689fc3be..bcd1db0f6990bf 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( - val previousState: Int, - val newState: Int, - val reason: Int, - val targetSoftwareVersion: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( + val previousState: Int, + val newState: Int, + val reason: Int, + val targetSoftwareVersion: Long?) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") append("\tpreviousState : $previousState\n") append("\tnewState : $newState\n") @@ -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( - tag: Tag, - tlvReader: TlvReader - ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterStateTransitionEvent { tlvReader.enterStructure(tag) val previousState = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) val reason = tlvReader.getInt(ContextSpecificTag(TAG_REASON)) - val targetSoftwareVersion = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - null - } - + val targetSoftwareVersion = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( - previousState, - newState, - reason, - targetSoftwareVersion - ) + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent(previousState, newState, reason, targetSoftwareVersion) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt index ff1034ace97e31..96bb018c4e0bd0 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( - val softwareVersion: Long, - val productID: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( + val softwareVersion: Long, + val productID: Int) { + 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( - tag: Tag, - tlvReader: TlvReader - ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val productID = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_I_D)) - + tlvReader.exitContainer() return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt index c3eb0d1e658b56..eb8be2f538a999 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,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -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") @@ -52,25 +57,23 @@ class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val pr private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt index c010184156ecb3..782fba2707b2f5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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 previous private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt index 8a06b36fba61d0..1906ef9014899d 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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 previo private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt index c116f16ac73229..a67296515fc256 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RefrigeratorAlarmClusterNotifyEvent( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAlarmClusterNotifyEvent ( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long) { + override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -54,13 +57,13 @@ class RefrigeratorAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAlarmClusterNotifyEvent { tlvReader.enterStructure(tag) val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt index c6afaa9750adf8..f43dd669cf87ca 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcOperationalStateClusterOperationCompletionEvent( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional? -) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class RvcOperationalStateClusterOperationCompletionEvent( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -65,42 +67,33 @@ class RvcOperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): RvcOperationalStateClusterOperationCompletionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationCompletionEvent( - completionErrorCode, - totalOperationalTime, - pausedTime - ) + return RvcOperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt index bf6fed9817f60f..ee80a6e06fb3a6 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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,14 +45,10 @@ class RvcOperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = - chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( - ContextSpecificTag(TAG_ERROR_STATE), - tlvReader - ) - + val errorState = chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) + tlvReader.exitContainer() return RvcOperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt index 2bc948e2a667b1..0c2e543c57451c 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterCOAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt index 19223606c4685d..6ddfb212cc0515 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt index 38e2fe872915f7..c3ada5b8d56ba2 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt index ce2d9ad47341d0..a1b2573db15fb6 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterLowBatteryEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterLowBatteryEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterLowBatteryEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt index 324a5d4461a225..01753b1e77aa97 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterSmokeAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt index 50b455842e538f..1ae05ccf0043b2 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class SoftwareDiagnosticsClusterSoftwareFaultEvent( - val id: Long, - val name: Optional, - val faultRecording: Optional -) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterSoftwareFaultEvent ( + val id: Long, + val name: Optional, + val faultRecording: Optional) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -41,13 +43,13 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (faultRecording.isPresent) { - val optfaultRecording = faultRecording.get() - put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) - } + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } endStructure() } } @@ -57,22 +59,20 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterSoftwareFaultEvent { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val faultRecording = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt index 893412c1f25322..62973598b9aff5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterInitialPressEvent(val newPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterInitialPressEvent ( + val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterInitialPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterInitialPressEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterInitialPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterInitialPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt index 3fa420f46ddec3..d67e1ba0076ca9 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterLongPressEvent(val newPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterLongPressEvent ( + val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterLongPressEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt index eb90698fc735ab..c26312888c3d2d 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterLongReleaseEvent(val previousPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterLongReleaseEvent ( + val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterLongReleaseEvent(val previousPosition: Int) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt index 81141e17424fbb..1e7eb6055668a6 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterMultiPressCompleteEvent( - val previousPosition: Int, - val totalNumberOfPressesCounted: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterMultiPressCompleteEvent ( + val previousPosition: Int, + val totalNumberOfPressesCounted: Int) { + 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(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressCompleteEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - val totalNumberOfPressesCounted = - tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) - + val totalNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt index 11fab26fdfce8e..0500e314f696ef 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterMultiPressOngoingEvent( - val newPosition: Int, - val currentNumberOfPressesCounted: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterMultiPressOngoingEvent ( + val newPosition: Int, + val currentNumberOfPressesCounted: Int) { + 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(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressOngoingEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - val currentNumberOfPressesCounted = - tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) - + val currentNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt index 0eeb9e2841fd7c..5d3e2f26c7fd0c 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterShortReleaseEvent(val previousPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterShortReleaseEvent ( + val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterShortReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterShortReleaseEvent(val previousPosition: Int) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterShortReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterShortReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt index 2b921b37ac6c2b..ec54e50aae31af 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterSwitchLatchedEvent ( + val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterSwitchLatchedEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterSwitchLatchedEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterSwitchLatchedEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt index ffdc72b1e54c89..cca6b8f8499a17 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( + val connectionStatus: Int) { + 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( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt index f9110c39fa1d40..ef103a4821a3e2 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt index 53090f750b4e06..b66f227f0d07fe 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTStatusEvent { tlvReader.enterStructure(tag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) - + tlvReader.exitContainer() return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt index 452e9d902c4767..2ccb1685646258 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStatusEvent ( + val offset: Long, + val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") append("\toffset : $offset\n") append("\tname : $name\n") @@ -36,9 +41,9 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: startStructure(tag) put(ContextSpecificTag(TAG_OFFSET), offset) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -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(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStatusEvent { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt index 8c2e410ab80f6d..1787e26580dba6 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestEventEvent( - val arg1: Int, - val arg2: Int, - val arg3: Boolean, - val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, - val arg5: List, - val arg6: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestEventEvent ( + val arg1: Int, + val arg2: Int, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List) { + override fun toString(): String = buildString { 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(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestEventEvent { tlvReader.enterStructure(tag) val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) - val arg4 = - chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_ARG4), - tlvReader - ) - val arg5 = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - val arg6 = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_ARG4), tlvReader) + val arg5 = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val arg6 = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt index d746c65d5ea1f1..1995cf80a3b1fc 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestFabricScopedEventEvent ( + val fabricIndex: Int) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScopedEventEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,10 +45,10 @@ class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { companion object { private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScopedEventEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt index 087484ef1bfa7b..5db782d0005a54 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( - val associationFailure: Int, - val status: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( + val associationFailure: Int, + val status: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") append("\tassociationFailure : $associationFailure\n") append("\tstatus : $status\n") @@ -46,14 +49,11 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( private const val TAG_ASSOCIATION_FAILURE = 0 private const val TAG_STATUS = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tag) val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt index 3599597c99b152..762339bde4f556 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( + val connectionStatus: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -40,13 +45,10 @@ class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: I companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt index 6d54ae4f2bfdcd..2a702882f2557a 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( + val reasonCode: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") @@ -40,10 +45,10 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterDisconnectionEvent { tlvReader.enterStructure(tag) val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt index 6daac4451c1833..a526275e085718 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlEntryStruct( - val privilege: Int, - val authMode: Int, - val subjects: List?, - val targets: List?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlEntryStruct ( + val privilege: Int, + val authMode: Int, + val subjects: List?, + val targets: List?, + val fabricIndex: Int) { + override fun toString(): String = buildString { 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) { - startList(ContextSpecificTag(TAG_SUBJECTS)) - for (item in subjects.iterator()) { - put(AnonymousTag, item) - } - endList() - } else { - putNull(ContextSpecificTag(TAG_SUBJECTS)) + startList(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) } + endList() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) + } if (targets != null) { - startList(ContextSpecificTag(TAG_TARGETS)) - for (item in targets.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() - } else { - putNull(ContextSpecificTag(TAG_TARGETS)) + startList(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } 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(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryStruct { tlvReader.enterStructure(tag) val privilege = tlvReader.getInt(ContextSpecificTag(TAG_PRIVILEGE)) val authMode = tlvReader.getInt(ContextSpecificTag(TAG_AUTH_MODE)) - val subjects = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) - null - } - val targets = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) - while (!tlvReader.isEndOfContainer()) { - add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) - null - } + val subjects = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + while(!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryStruct( - privilege, - authMode, - subjects, - targets, - fabricIndex - ) + return AccessControlClusterAccessControlEntryStruct(privilege, authMode, subjects, targets, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt index 4a1d95221d816c..9b832daa283b9f 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlExtensionStruct ( + val data: ByteArray, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") append("\tfabricIndex : $fabricIndex\n") @@ -43,11 +49,11 @@ class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionStruct { tlvReader.enterStructure(tag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt index e721aa3fefe91d..8070aecfe241b5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlTargetStruct( - val cluster: Long?, - val endpoint: Int?, - val deviceType: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlTargetStruct ( + val cluster: Long?, + val endpoint: Int?, + val deviceType: Long?) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") append("\tcluster : $cluster\n") append("\tendpoint : $endpoint\n") @@ -39,20 +42,20 @@ class AccessControlClusterAccessControlTargetStruct( tlvWriter.apply { startStructure(tag) if (cluster != null) { - put(ContextSpecificTag(TAG_CLUSTER), cluster) - } else { - putNull(ContextSpecificTag(TAG_CLUSTER)) - } + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } if (endpoint != null) { - put(ContextSpecificTag(TAG_ENDPOINT), endpoint) - } else { - putNull(ContextSpecificTag(TAG_ENDPOINT)) - } + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } if (deviceType != null) { - put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) - } else { - putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - } + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } endStructure() } } @@ -62,30 +65,27 @@ class AccessControlClusterAccessControlTargetStruct( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlTargetStruct { tlvReader.enterStructure(tag) - val cluster = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) - null - } - val endpoint = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) - null - } - val deviceType = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - null - } - + val cluster = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + tlvReader.exitContainer() return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt index 2ed7a3f08152be..9dc8c67a270df1 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterActionStruct( - val actionID: Int, - val name: String, - val type: Int, - val endpointListID: Int, - val supportedCommands: Int, - val state: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterActionStruct ( + val actionID: Int, + val name: String, + val type: Int, + val endpointListID: Int, + val supportedCommands: Int, + val state: Int) { + override fun toString(): String = buildString { 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(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionStruct { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) @@ -70,17 +73,10 @@ class ActionsClusterActionStruct( val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val supportedCommands = tlvReader.getInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) val state = tlvReader.getInt(ContextSpecificTag(TAG_STATE)) - + tlvReader.exitContainer() - return ActionsClusterActionStruct( - actionID, - name, - type, - endpointListID, - supportedCommands, - state - ) + return ActionsClusterActionStruct(actionID, name, type, endpointListID, supportedCommands, state) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt index b714e693156957..5d46b079c5e9bf 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterEndpointListStruct( - val endpointListID: Int, - val name: String, - val type: Int, - val endpoints: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterEndpointListStruct ( + val endpointListID: Int, + val name: String, + val type: Int, + val endpoints: List) { + override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") append("\tendpointListID : $endpointListID\n") append("\tname : $name\n") @@ -59,20 +61,19 @@ class ActionsClusterEndpointListStruct( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterEndpointListStruct { tlvReader.enterStructure(tag) val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - val endpoints = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val endpoints = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt index 68a44d37dfff0f..f4f298dadf0fcc 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( + val productIdentifierType: Int, + 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( - tag: Tag, - tlvReader: TlvReader - ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt index 21649a8ecc73df..aa1effe8df43cd 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ApplicationBasicClusterApplicationStruct( - val catalogVendorID: Int, - val applicationID: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationBasicClusterApplicationStruct ( + val catalogVendorID: Int, + 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(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationBasicClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt index f710204737cb52..cf701fb6c1a094 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ApplicationLauncherClusterApplicationEPStruct( - val application: ApplicationLauncherClusterApplicationStruct, - val endpoint: Optional -) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationEPStruct ( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationEPStruct {\n") append("\tapplication : $application\n") append("\tendpoint : $endpoint\n") @@ -39,9 +41,9 @@ class ApplicationLauncherClusterApplicationEPStruct( startStructure(tag) application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } endStructure() } } @@ -50,20 +52,15 @@ class ApplicationLauncherClusterApplicationEPStruct( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationEPStruct { tlvReader.enterStructure(tag) - val application = - ApplicationLauncherClusterApplicationStruct.fromTlv( - ContextSpecificTag(TAG_APPLICATION), - tlvReader - ) - val endpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - + val application = ApplicationLauncherClusterApplicationStruct.fromTlv(ContextSpecificTag(TAG_APPLICATION), tlvReader) + val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt index 68e78e31084c04..b9b7f772372d19 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ApplicationLauncherClusterApplicationStruct( - val catalogVendorID: Int, - val applicationID: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationLauncherClusterApplicationStruct ( + val catalogVendorID: Int, + 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(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt index aef8596f19a83c..028781fa7acfb5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class AudioOutputClusterOutputInfoStruct ( + val index: Int, + val outputType: Int, + val name: String) { + override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") append("\toutputType : $outputType\n") @@ -46,12 +53,12 @@ class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, va private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AudioOutputClusterOutputInfoStruct { tlvReader.enterStructure(tag) val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) val outputType = tlvReader.getInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return AudioOutputClusterOutputInfoStruct(index, outputType, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt index e4f323b6321541..8a58e9a242ed40 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterCapabilityMinimaStruct( - val caseSessionsPerFabric: Int, - val subscriptionsPerFabric: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterCapabilityMinimaStruct ( + val caseSessionsPerFabric: Int, + val subscriptionsPerFabric: Int) { + override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") @@ -46,18 +49,14 @@ class BasicInformationClusterCapabilityMinimaStruct( private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterCapabilityMinimaStruct { tlvReader.enterStructure(tag) val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) - val subscriptionsPerFabric = - tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) - + val subscriptionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + tlvReader.exitContainer() - return BasicInformationClusterCapabilityMinimaStruct( - caseSessionsPerFabric, - subscriptionsPerFabric - ) + return BasicInformationClusterCapabilityMinimaStruct(caseSessionsPerFabric, subscriptionsPerFabric) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt index 3678494c7b90fb..e01685c44e3566 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterProductAppearanceStruct ( + val finish: Int, + val primaryColor: Int?) { + override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -35,10 +41,10 @@ class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primar startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -47,17 +53,16 @@ class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primar private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 8ab0146b8e95f3..861ebbd1875f58 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class BindingClusterTargetStruct( - val node: Optional, - val group: Optional, - val endpoint: Optional, - val cluster: Optional, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +class BindingClusterTargetStruct ( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") append("\tnode : $node\n") append("\tgroup : $group\n") @@ -44,21 +46,21 @@ class BindingClusterTargetStruct( tlvWriter.apply { startStructure(tag) if (node.isPresent) { - val optnode = node.get() - put(ContextSpecificTag(TAG_NODE), optnode) - } + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } if (group.isPresent) { - val optgroup = group.get() - put(ContextSpecificTag(TAG_GROUP), optgroup) - } + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } if (cluster.isPresent) { - val optcluster = cluster.get() - put(ContextSpecificTag(TAG_CLUSTER), optcluster) - } + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -71,34 +73,30 @@ class BindingClusterTargetStruct( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BindingClusterTargetStruct { tlvReader.enterStructure(tag) - val node = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - val group = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) - } else { - Optional.empty() - } - val endpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - val cluster = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) - } else { - Optional.empty() - } + val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt index d1426bc0828631..778935a86e9455 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterProductAppearanceStruct( - val finish: Int, - val primaryColor: Int? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( + val finish: Int, + val primaryColor: Int?) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -38,10 +41,10 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -50,20 +53,16 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt index 9d10bf6f24e5fa..acfddff56c75cb 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,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ChannelClusterChannelInfoStruct( - val majorNumber: Int, - val minorNumber: Int, - val name: Optional, - val callSign: Optional, - val affiliateCallSign: Optional -) { - override fun toString(): String = buildString { +class ChannelClusterChannelInfoStruct ( + val majorNumber: Int, + val minorNumber: Int, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional) { + override fun toString(): String = buildString { append("ChannelClusterChannelInfoStruct {\n") append("\tmajorNumber : $majorNumber\n") append("\tminorNumber : $minorNumber\n") @@ -46,17 +48,17 @@ class ChannelClusterChannelInfoStruct( put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (callSign.isPresent) { - val optcallSign = callSign.get() - put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) - } + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } if (affiliateCallSign.isPresent) { - val optaffiliateCallSign = affiliateCallSign.get() - put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) - } + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } endStructure() } } @@ -68,38 +70,29 @@ class ChannelClusterChannelInfoStruct( private const val TAG_CALL_SIGN = 3 private const val TAG_AFFILIATE_CALL_SIGN = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterChannelInfoStruct { tlvReader.enterStructure(tag) val majorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) val minorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MINOR_NUMBER)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val callSign = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) - } else { - Optional.empty() - } - val affiliateCallSign = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ChannelClusterChannelInfoStruct( - majorNumber, - minorNumber, - name, - callSign, - affiliateCallSign - ) + return ChannelClusterChannelInfoStruct(majorNumber, minorNumber, name, callSign, affiliateCallSign) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt index edc8f9157db120..0010ae68479954 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ChannelClusterLineupInfoStruct( - val operatorName: String, - val lineupName: Optional, - val postalCode: Optional, - val lineupInfoType: Int -) { - override fun toString(): String = buildString { +class ChannelClusterLineupInfoStruct ( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: Int) { + override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") append("\toperatorName : $operatorName\n") append("\tlineupName : $lineupName\n") @@ -43,13 +45,13 @@ class ChannelClusterLineupInfoStruct( startStructure(tag) put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) if (lineupName.isPresent) { - val optlineupName = lineupName.get() - put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) - } + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } if (postalCode.isPresent) { - val optpostalCode = postalCode.get() - put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) - } + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) endStructure() } @@ -61,23 +63,21 @@ class ChannelClusterLineupInfoStruct( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterLineupInfoStruct { tlvReader.enterStructure(tag) val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) - val lineupName = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) - } else { - Optional.empty() - } - val postalCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) - } else { - Optional.empty() - } + val lineupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) - + tlvReader.exitContainer() return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt index 0e1ebee9f97df2..0e54edff044225 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterAdditionalInfoStruct { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ContentLauncherClusterAdditionalInfoStruct(name, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 5f4719e9c00ef8..993719fc427de5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ContentLauncherClusterBrandingInformationStruct( - val providerName: String, - val background: Optional, - val logo: Optional, - val progressBar: Optional, - val splash: Optional, - val waterMark: Optional -) { - override fun toString(): String = buildString { +class ContentLauncherClusterBrandingInformationStruct ( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional) { + override fun toString(): String = buildString { append("ContentLauncherClusterBrandingInformationStruct {\n") append("\tproviderName : $providerName\n") append("\tbackground : $background\n") @@ -47,25 +49,25 @@ class ContentLauncherClusterBrandingInformationStruct( startStructure(tag) put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) if (background.isPresent) { - val optbackground = background.get() - optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) - } + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } if (logo.isPresent) { - val optlogo = logo.get() - optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) - } + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } if (progressBar.isPresent) { - val optprogressBar = progressBar.get() - optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) - } + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } if (splash.isPresent) { - val optsplash = splash.get() - optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) - } + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } if (waterMark.isPresent) { - val optwaterMark = waterMark.get() - optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) - } + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } endStructure() } } @@ -78,75 +80,38 @@ class ContentLauncherClusterBrandingInformationStruct( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterBrandingInformationStruct { tlvReader.enterStructure(tag) val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) - val background = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_BACKGROUND), - tlvReader - ) - ) - } else { - Optional.empty() - } - val logo = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_LOGO), - tlvReader - ) - ) - } else { - Optional.empty() - } - val progressBar = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_PROGRESS_BAR), - tlvReader - ) - ) - } else { - Optional.empty() - } - val splash = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_SPLASH), - tlvReader - ) - ) - } else { - Optional.empty() - } - val waterMark = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_WATER_MARK), - tlvReader - ) - ) - } else { - Optional.empty() - } - + val background = if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_BACKGROUND), tlvReader)) + } else { + Optional.empty() + } + val logo = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_LOGO), tlvReader)) + } else { + Optional.empty() + } + val progressBar = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_PROGRESS_BAR), tlvReader)) + } else { + Optional.empty() + } + val splash = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_SPLASH), tlvReader)) + } else { + Optional.empty() + } + val waterMark = if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_WATER_MARK), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ContentLauncherClusterBrandingInformationStruct( - providerName, - background, - logo, - progressBar, - splash, - waterMark - ) + return ContentLauncherClusterBrandingInformationStruct(providerName, background, logo, progressBar, splash, waterMark) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt index 9457b03907a4fb..b3b713ba8e8079 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterContentSearchStruct { tlvReader.enterStructure(tag) - val parameterList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val parameterList = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ContentLauncherClusterContentSearchStruct(parameterList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index a38245918bb476..2bf3ed85bae436 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ContentLauncherClusterDimensionStruct( - val width: Double, - val height: Double, - val metric: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterDimensionStruct ( + val width: Double, + val height: Double, + val metric: Int) { + override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") append("\twidth : $width\n") append("\theight : $height\n") @@ -50,12 +53,12 @@ class ContentLauncherClusterDimensionStruct( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterDimensionStruct { tlvReader.enterStructure(tag) val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) val metric = tlvReader.getInt(ContextSpecificTag(TAG_METRIC)) - + tlvReader.exitContainer() return ContentLauncherClusterDimensionStruct(width, height, metric) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt index caf0f99848c93c..19f4e650b0615b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -20,16 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ContentLauncherClusterParameterStruct( - val type: Int, - val value: String, - val externalIDList: Optional> -) { - override fun toString(): String = buildString { +class ContentLauncherClusterParameterStruct ( + val type: Int, + val value: String, + val externalIDList: Optional>) { + override fun toString(): String = buildString { append("ContentLauncherClusterParameterStruct {\n") append("\ttype : $type\n") append("\tvalue : $value\n") @@ -43,13 +44,13 @@ class ContentLauncherClusterParameterStruct( put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() + val optexternalIDList = externalIDList.get() + startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } endStructure() } } @@ -59,25 +60,22 @@ class ContentLauncherClusterParameterStruct( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterParameterStruct { tlvReader.enterStructure(tag) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - val externalIDList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - + val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterParameterStruct(type, value, externalIDList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt index d5e686bbb5ac45..b9f2044614dd71 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ContentLauncherClusterStyleInformationStruct( - val imageURL: Optional, - val color: Optional, - val size: Optional -) { - override fun toString(): String = buildString { +class ContentLauncherClusterStyleInformationStruct ( + val imageURL: Optional, + val color: Optional, + val size: Optional) { + override fun toString(): String = buildString { append("ContentLauncherClusterStyleInformationStruct {\n") append("\timageURL : $imageURL\n") append("\tcolor : $color\n") @@ -40,17 +42,17 @@ class ContentLauncherClusterStyleInformationStruct( tlvWriter.apply { startStructure(tag) if (imageURL.isPresent) { - val optimageURL = imageURL.get() - put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) - } + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } if (color.isPresent) { - val optcolor = color.get() - put(ContextSpecificTag(TAG_COLOR), optcolor) - } + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } if (size.isPresent) { - val optsize = size.get() - optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) - } + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } endStructure() } } @@ -60,29 +62,24 @@ class ContentLauncherClusterStyleInformationStruct( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterStyleInformationStruct { tlvReader.enterStructure(tag) - val imageURL = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) - } else { - Optional.empty() - } - val color = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) - } else { - Optional.empty() - } - val size = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { - Optional.of( - ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) - ) - } else { - Optional.empty() - } - + val imageURL = if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of(ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt index 75fed36957e726..d76de77105ded9 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DescriptorClusterDeviceTypeStruct ( + val deviceType: Long, + val revision: Int) { + override fun toString(): String = buildString { append("DescriptorClusterDeviceTypeStruct {\n") append("\tdeviceType : $deviceType\n") append("\trevision : $revision\n") @@ -43,11 +49,11 @@ class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) private const val TAG_DEVICE_TYPE = 0 private const val TAG_REVISION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterDeviceTypeStruct { tlvReader.enterStructure(tag) val deviceType = tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) val revision = tlvReader.getInt(ContextSpecificTag(TAG_REVISION)) - + tlvReader.exitContainer() return DescriptorClusterDeviceTypeStruct(deviceType, revision) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt index abde881ccffcea..8c5fc527b8a5e5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DescriptorClusterSemanticTagStruct( - val mfgCode: Int?, - val namespaceID: Int, - val tag: Int, - val label: Optional? -) { - override fun toString(): String = buildString { +class DescriptorClusterSemanticTagStruct ( + val mfgCode: Int?, + val namespaceID: Int, + val tag: Int, + val label: Optional?) { + override fun toString(): String = buildString { append("DescriptorClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tnamespaceID : $namespaceID\n") @@ -42,20 +44,20 @@ class DescriptorClusterSemanticTagStruct( tlvWriter.apply { startStructure(tag) if (mfgCode != null) { - put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) - } else { - putNull(ContextSpecificTag(TAG_MFG_CODE)) - } + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) put(ContextSpecificTag(TAG_TAG), tag) if (label != null) { - if (label.isPresent) { - val optlabel = label.get() - put(ContextSpecificTag(TAG_LABEL), optlabel) - } - } else { - putNull(ContextSpecificTag(TAG_LABEL)) - } + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } endStructure() } } @@ -66,29 +68,27 @@ class DescriptorClusterSemanticTagStruct( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterSemanticTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) - null - } + val mfgCode = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } val namespaceID = tlvReader.getInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) val tag = tlvReader.getInt(ContextSpecificTag(TAG_TAG)) - val label = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) - null - } - + val label = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + tlvReader.exitContainer() return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt index 423d6a554672ce..d7004fbfc53590 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DishwasherModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class DishwasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 33881f4ac00c8d..110964c9ed2cf6 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -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(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DishwasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt index da3a551267eb09..de3654516fc946 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterCredentialStruct ( + val credentialType: Int, + val credentialIndex: Int) { + override fun toString(): String = buildString { append("DoorLockClusterCredentialStruct {\n") append("\tcredentialType : $credentialType\n") append("\tcredentialIndex : $credentialIndex\n") @@ -43,11 +49,11 @@ class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialInd private const val TAG_CREDENTIAL_TYPE = 0 private const val TAG_CREDENTIAL_INDEX = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterCredentialStruct { tlvReader.enterStructure(tag) val credentialType = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) val credentialIndex = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) - + tlvReader.exitContainer() return DoorLockClusterCredentialStruct(credentialType, credentialIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt index 09292f726d9467..16567ccab1ce30 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class FixedLabelClusterLabelStruct(val label: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class FixedLabelClusterLabelStruct ( + val label: String, + val value: String) { + override fun toString(): String = buildString { append("FixedLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class FixedLabelClusterLabelStruct(val label: String, val value: String) { private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : FixedLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return FixedLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt index 60d10b41112a9d..2153c5ea32fc7d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralCommissioningClusterBasicCommissioningInfo( - val failSafeExpiryLengthSeconds: Int, - val maxCumulativeFailsafeSeconds: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralCommissioningClusterBasicCommissioningInfo ( + val failSafeExpiryLengthSeconds: Int, + val maxCumulativeFailsafeSeconds: Int) { + override fun toString(): String = buildString { append("GeneralCommissioningClusterBasicCommissioningInfo {\n") append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") @@ -46,19 +49,14 @@ class GeneralCommissioningClusterBasicCommissioningInfo( private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralCommissioningClusterBasicCommissioningInfo { tlvReader.enterStructure(tag) - val failSafeExpiryLengthSeconds = - tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) - val maxCumulativeFailsafeSeconds = - tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) - + val failSafeExpiryLengthSeconds = tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + tlvReader.exitContainer() - return GeneralCommissioningClusterBasicCommissioningInfo( - failSafeExpiryLengthSeconds, - maxCumulativeFailsafeSeconds - ) + return GeneralCommissioningClusterBasicCommissioningInfo(failSafeExpiryLengthSeconds, maxCumulativeFailsafeSeconds) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt index d4ff313520e65e..2813b085912e48 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -20,20 +20,22 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterNetworkInterface( - val name: String, - val isOperational: Boolean, - val offPremiseServicesReachableIPv4: Boolean?, - val offPremiseServicesReachableIPv6: Boolean?, - val hardwareAddress: ByteArray, - val IPv4Addresses: List, - val IPv6Addresses: List, - val type: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterNetworkInterface ( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: Int) { + override fun toString(): String = buildString { 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) startList(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(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkInterface { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) - val offPremiseServicesReachableIPv4 = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - null - } - val offPremiseServicesReachableIPv6 = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - null - } + val offPremiseServicesReachableIPv4 = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) - val IPv4Addresses = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val IPv6Addresses = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } + val IPv4Addresses = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - + tlvReader.exitContainer() - return GeneralDiagnosticsClusterNetworkInterface( - name, - isOperational, - offPremiseServicesReachableIPv4, - offPremiseServicesReachableIPv6, - hardwareAddress, - IPv4Addresses, - IPv6Addresses, - type - ) + return GeneralDiagnosticsClusterNetworkInterface(name, isOperational, offPremiseServicesReachableIPv4, offPremiseServicesReachableIPv6, hardwareAddress, IPv4Addresses, IPv6Addresses, type) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt index 6038b55d345b75..c6ecaa9eb20014 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -20,17 +20,18 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class GroupKeyManagementClusterGroupInfoMapStruct( - val groupId: Int, - val endpoints: List, - val groupName: Optional, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupInfoMapStruct ( + val groupId: Int, + val endpoints: List, + val groupName: Optional, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") append("\tgroupId : $groupId\n") append("\tendpoints : $endpoints\n") @@ -49,9 +50,9 @@ class GroupKeyManagementClusterGroupInfoMapStruct( } endList() if (groupName.isPresent) { - val optgroupName = groupName.get() - put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) - } + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -63,25 +64,23 @@ class GroupKeyManagementClusterGroupInfoMapStruct( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupInfoMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) - val endpoints = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val groupName = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) - } else { - Optional.empty() - } + val endpoints = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt index d565d70233abc2..8e692ad743b3c1 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GroupKeyManagementClusterGroupKeyMapStruct( - val groupId: Int, - val groupKeySetID: Int, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupKeyMapStruct ( + val groupId: Int, + val groupKeySetID: Int, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") append("\tgroupId : $groupId\n") append("\tgroupKeySetID : $groupKeySetID\n") @@ -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(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeyMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt index 418b6037ae46c9..0af577bdf3cdce 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GroupKeyManagementClusterGroupKeySetStruct( - val groupKeySetID: Int, - val groupKeySecurityPolicy: Int, - val epochKey0: ByteArray?, - val epochStartTime0: Long?, - val epochKey1: ByteArray?, - val epochStartTime1: Long?, - val epochKey2: ByteArray?, - val epochStartTime2: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupKeySetStruct ( + val groupKeySetID: Int, + val groupKeySecurityPolicy: Int, + val epochKey0: ByteArray?, + val epochStartTime0: Long?, + val epochKey1: ByteArray?, + val epochStartTime1: Long?, + val epochKey2: ByteArray?, + val epochStartTime2: Long?) { + override fun toString(): String = buildString { 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(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeySetStruct { tlvReader.enterStructure(tag) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val groupKeySecurityPolicy = - tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) - val epochKey0 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - null - } - val epochStartTime0 = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - null - } - val epochKey1 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - null - } - val epochStartTime1 = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - null - } - val epochKey2 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - null - } - val epochStartTime2 = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - null - } - + val groupKeySecurityPolicy = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + tlvReader.exitContainer() - return GroupKeyManagementClusterGroupKeySetStruct( - groupKeySetID, - groupKeySecurityPolicy, - epochKey0, - epochStartTime0, - epochKey1, - epochStartTime1, - epochKey2, - epochStartTime2 - ) + return GroupKeyManagementClusterGroupKeySetStruct(groupKeySetID, groupKeySecurityPolicy, epochKey0, epochStartTime0, epochKey1, epochStartTime1, epochKey2, epochStartTime2) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt index a86ba8db2dee0a..9ecba7669d8e6f 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class HepaFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class HepaFilterMonitoringClusterReplacementProductStruct ( + val productIdentifierType: Int, + 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( - tag: Tag, - tlvReader: TlvReader - ): HepaFilterMonitoringClusterReplacementProductStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : HepaFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return HepaFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) + return HepaFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt index d380689bed016f..ebef1ce2ce74a7 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,18 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class IcdManagementClusterMonitoringRegistrationStruct( - val checkInNodeID: Long, - val monitoredSubject: Long, - val key: ByteArray, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class IcdManagementClusterMonitoringRegistrationStruct ( + val checkInNodeID: Long, + val monitoredSubject: Long, + val key: ByteArray, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") append("\tcheckInNodeID : $checkInNodeID\n") append("\tmonitoredSubject : $monitoredSubject\n") @@ -54,21 +57,16 @@ class IcdManagementClusterMonitoringRegistrationStruct( private const val TAG_KEY = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): IcdManagementClusterMonitoringRegistrationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : IcdManagementClusterMonitoringRegistrationStruct { tlvReader.enterStructure(tag) val checkInNodeID = tlvReader.getLong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) val monitoredSubject = tlvReader.getLong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return IcdManagementClusterMonitoringRegistrationStruct( - checkInNodeID, - monitoredSubject, - key, - fabricIndex - ) + return IcdManagementClusterMonitoringRegistrationStruct(checkInNodeID, monitoredSubject, key, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt index eeab9e95eb7cce..91f733b2bf8edd 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class LaundryWasherModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class LaundryWasherModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class LaundryWasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index eed09912c26a9c..06685de8506c7d 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val valu tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val valu private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return LaundryWasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt index 514c05d19f6fdf..7be50d0dbc9ad3 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class MediaInputClusterInputInfoStruct( - val index: Int, - val inputType: Int, - val name: String, - val description: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaInputClusterInputInfoStruct ( + val index: Int, + val inputType: Int, + val name: String, + val description: String) { + override fun toString(): String = buildString { append("MediaInputClusterInputInfoStruct {\n") append("\tindex : $index\n") append("\tinputType : $inputType\n") @@ -54,13 +57,13 @@ class MediaInputClusterInputInfoStruct( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaInputClusterInputInfoStruct { tlvReader.enterStructure(tag) val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) val inputType = tlvReader.getInt(ContextSpecificTag(TAG_INPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) - + tlvReader.exitContainer() return MediaInputClusterInputInfoStruct(index, inputType, name, description) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt index d452d083a73112..6b6e8cfcf12403 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaPlaybackClusterPlaybackPositionStruct ( + val updatedAt: Long, + val position: Long?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") append("\tposition : $position\n") @@ -35,10 +41,10 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val positi startStructure(tag) put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) if (position != null) { - put(ContextSpecificTag(TAG_POSITION), position) - } else { - putNull(ContextSpecificTag(TAG_POSITION)) - } + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } endStructure() } } @@ -47,17 +53,16 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val positi private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterPlaybackPositionStruct { tlvReader.enterStructure(tag) val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) - val position = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) - null - } - + val position = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt index ac95817519112f..eacbd43215cc6c 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ModeSelectClusterModeOptionStruct( - val label: String, - val mode: Int, - val semanticTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ModeSelectClusterModeOptionStruct ( + val label: String, + val mode: Int, + val semanticTags: List) { + override fun toString(): String = buildString { append("ModeSelectClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class ModeSelectClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val semanticTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val semanticTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index 04c893671659d3..6e00f596b61ebf 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ModeSelectClusterSemanticTagStruct ( + val mfgCode: Int, + val value: Int) { + override fun toString(): String = buildString { append("ModeSelectClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterSemanticTagStruct { tlvReader.enterStructure(tag) val mfgCode = tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ModeSelectClusterSemanticTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index 8b942f2a492dd1..9cf40b7e7ce7a3 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,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class NetworkCommissioningClusterNetworkInfoStruct( - val networkID: ByteArray, - val connected: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterNetworkInfoStruct ( + val networkID: ByteArray, + val connected: Boolean) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") @@ -46,11 +49,11 @@ class NetworkCommissioningClusterNetworkInfoStruct( private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) - + tlvReader.exitContainer() return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt index 76593b32131477..e8cc5c1941d7d8 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class NetworkCommissioningClusterThreadInterfaceScanResultStruct( - val panId: Int, - val extendedPanId: Long, - val networkName: String, - val channel: Int, - val version: Int, - val extendedAddress: ByteArray, - val rssi: Int, - val lqi: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( + val panId: Int, + val extendedPanId: Long, + val networkName: String, + val channel: Int, + val version: Int, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: Int) { + override fun toString(): String = buildString { 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( - tag: Tag, - tlvReader: TlvReader - ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterThreadInterfaceScanResultStruct { tlvReader.enterStructure(tag) val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) @@ -83,19 +83,10 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterThreadInterfaceScanResultStruct( - panId, - extendedPanId, - networkName, - channel, - version, - extendedAddress, - rssi, - lqi - ) + return NetworkCommissioningClusterThreadInterfaceScanResultStruct(panId, extendedPanId, networkName, channel, version, extendedAddress, rssi, lqi) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt index d2cf4bcf5b7cb0..efcd50f0c17fba 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( - val security: Int, - val ssid: ByteArray, - val bssid: ByteArray, - val channel: Int, - val wiFiBand: Int, - val rssi: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( + val security: Int, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: Int, + val wiFiBand: Int, + val rssi: Int) { + override fun toString(): String = buildString { 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( - tag: Tag, - tlvReader: TlvReader - ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterWiFiInterfaceScanResultStruct { tlvReader.enterStructure(tag) val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) @@ -73,17 +73,10 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( - security, - ssid, - bssid, - channel, - wiFiBand, - rssi - ) + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct(security, ssid, bssid, channel, wiFiBand, rssi) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt index 8264e9fa5ee545..620c17f8cd0863 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OperationalCredentialsClusterFabricDescriptorStruct( - val rootPublicKey: ByteArray, - val vendorID: Int, - val fabricID: Long, - val nodeID: Long, - val label: String, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalCredentialsClusterFabricDescriptorStruct ( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int) { + override fun toString(): String = buildString { 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( - tag: Tag, - tlvReader: TlvReader - ): OperationalCredentialsClusterFabricDescriptorStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterFabricDescriptorStruct { tlvReader.enterStructure(tag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) @@ -73,17 +73,10 @@ class OperationalCredentialsClusterFabricDescriptorStruct( val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OperationalCredentialsClusterFabricDescriptorStruct( - rootPublicKey, - vendorID, - fabricID, - nodeID, - label, - fabricIndex - ) + return OperationalCredentialsClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt index a05f388d1a5e06..406bad431f78c9 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OperationalCredentialsClusterNOCStruct( - val noc: ByteArray, - val icac: ByteArray?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalCredentialsClusterNOCStruct ( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") append("\tnoc : $noc\n") append("\ticac : $icac\n") @@ -40,10 +43,10 @@ class OperationalCredentialsClusterNOCStruct( startStructure(tag) put(ContextSpecificTag(TAG_NOC), noc) if (icac != null) { - put(ContextSpecificTag(TAG_ICAC), icac) - } else { - putNull(ContextSpecificTag(TAG_ICAC)) - } + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -54,18 +57,17 @@ class OperationalCredentialsClusterNOCStruct( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterNOCStruct { tlvReader.enterStructure(tag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) - val icac = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) - null - } + val icac = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt index cdbccac37fe63f..68879d32ff0bd1 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class OperationalStateClusterErrorStateStruct( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional -) { - override fun toString(): String = buildString { +class OperationalStateClusterErrorStateStruct ( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("OperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class OperationalStateClusterErrorStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -57,29 +59,23 @@ class OperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterErrorStateStruct( - errorStateID, - errorStateLabel, - errorStateDetails - ) + return OperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt index 1c55ac8f8927c4..f66152a1cfb5f1 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class OperationalStateClusterOperationalStateStruct( - val operationalStateID: Int, - val operationalStateLabel: Optional -) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalStateStruct ( + val operationalStateID: Int, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class OperationalStateClusterOperationalStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -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(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterOperationalStateStruct( - operationalStateID, - operationalStateLabel - ) + return OperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt index 17f95d897b258b..f527505ff87b22 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterProviderLocation( - val providerNodeID: Long, - val endpoint: Int, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterProviderLocation ( + val providerNodeID: Long, + val endpoint: Int, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") append("\tproviderNodeID : $providerNodeID\n") append("\tendpoint : $endpoint\n") @@ -50,19 +53,15 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OtaSoftwareUpdateRequestorClusterProviderLocation { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterProviderLocation { tlvReader.enterStructure(tag) val providerNodeID = tlvReader.getLong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterProviderLocation( - providerNodeID, - endpoint, - fabricIndex - ) + return OtaSoftwareUpdateRequestorClusterProviderLocation(providerNodeID, endpoint, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt index 6172f21498fdb0..a3e342cf110c49 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,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -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") @@ -52,25 +57,23 @@ class PowerSourceClusterBatChargeFaultChangeType(val current: List, val pre private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeType { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt index 6ef4a63074b8a2..4feef1564786b2 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeType { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt index 86cdc01f28fd41..6c99e0befd7e37 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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 previou private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeType { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt index 6632b9581bb508..e3f52fc923d0e9 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,34 +57,21 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add( - RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( - label, - mode, - modeTags - ) + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct(label, mode, modeTags) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt index 9f806c52fa6fa2..7b3fc8ad89ac0a 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( - val mfgCode: Optional, - val value: Int -) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -38,9 +40,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -50,19 +52,15 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt index e3f33a1b7dcac5..986ef2fbfe7fae 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RvcCleanModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcCleanModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class RvcCleanModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index bc7eb7ed818b41..d1b5786dd5004d 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: In tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: In private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcCleanModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt index f6b9b8b14456f0..9416a49dd8d2e1 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcOperationalStateClusterErrorStateStruct( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional -) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterErrorStateStruct ( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class RvcOperationalStateClusterErrorStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -57,29 +59,23 @@ class RvcOperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterErrorStateStruct( - errorStateID, - errorStateLabel, - errorStateDetails - ) + return RvcOperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt index 66f2796d71439f..0ac8e7e362c07d 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcOperationalStateClusterOperationalStateStruct( - val operationalStateID: Int, - val operationalStateLabel: Optional -) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalStateStruct ( + val operationalStateID: Int, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class RvcOperationalStateClusterOperationalStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -50,22 +52,18 @@ class RvcOperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationalStateStruct( - operationalStateID, - operationalStateLabel - ) + return RvcOperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt index 64b272df8e62c2..6c0fa21b62753c 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RvcRunModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcRunModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class RvcRunModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index 3ad4e9aee5ba6d..39077679389f9e 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcRunModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt index 213d87b9137cf5..3376a7d1e849f2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesClusterAttributeValuePair ( + val attributeID: Long, + val attributeValue: Long) { + override fun toString(): String = buildString { append("ScenesClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") @@ -43,11 +49,11 @@ class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterAttributeValuePair { tlvReader.enterStructure(tag) val attributeID = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) - + tlvReader.exitContainer() return ScenesClusterAttributeValuePair(attributeID, attributeValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt index edc04a2084e2fd..dde3ec639661d9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ScenesClusterExtensionFieldSet( - val clusterID: Long, - val attributeValueList: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesClusterExtensionFieldSet ( + val clusterID: Long, + val attributeValueList: List) { + override fun toString(): String = buildString { append("ScenesClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") @@ -51,18 +53,17 @@ class ScenesClusterExtensionFieldSet( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterExtensionFieldSet { tlvReader.enterStructure(tag) val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) - val attributeValueList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val attributeValueList = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt index 5359b9a4b70a2a..ae6aa79702b58b 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class SoftwareDiagnosticsClusterThreadMetricsStruct( - val id: Long, - val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional -) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterThreadMetricsStruct ( + val id: Long, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -45,21 +47,21 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (stackFreeCurrent.isPresent) { - val optstackFreeCurrent = stackFreeCurrent.get() - put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) - } + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } if (stackFreeMinimum.isPresent) { - val optstackFreeMinimum = stackFreeMinimum.get() - put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) - } + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } if (stackSize.isPresent) { - val optstackSize = stackSize.get() - put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) - } + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } endStructure() } } @@ -71,43 +73,33 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterThreadMetricsStruct { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val stackFreeCurrent = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) - } else { - Optional.empty() - } - val stackFreeMinimum = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) - } else { - Optional.empty() - } - val stackSize = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return SoftwareDiagnosticsClusterThreadMetricsStruct( - id, - name, - stackFreeCurrent, - stackFreeMinimum, - stackSize - ) + return SoftwareDiagnosticsClusterThreadMetricsStruct(id, name, stackFreeCurrent, stackFreeMinimum, stackSize) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt index 403134993beaed..475ba3c436fac7 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class TargetNavigatorClusterTargetInfoStruct ( + val identifier: Int, + 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: Int, val name: Stri private const val TAG_IDENTIFIER = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetInfoStruct { tlvReader.enterStructure(tag) val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetInfoStruct(identifier, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt index cb432fb1e976b4..f63d1bcf959e9e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThermostatClusterThermostatScheduleTransition( - val transitionTime: Int, - val heatSetpoint: Int?, - val coolSetpoint: Int? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterThermostatScheduleTransition ( + val transitionTime: Int, + val heatSetpoint: Int?, + val coolSetpoint: Int?) { + override fun toString(): String = buildString { append("ThermostatClusterThermostatScheduleTransition {\n") append("\ttransitionTime : $transitionTime\n") append("\theatSetpoint : $heatSetpoint\n") @@ -40,15 +43,15 @@ class ThermostatClusterThermostatScheduleTransition( startStructure(tag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (heatSetpoint != null) { - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - } else { - putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } if (coolSetpoint != null) { - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) - } else { - putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - } + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } endStructure() } } @@ -58,31 +61,25 @@ class ThermostatClusterThermostatScheduleTransition( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThermostatClusterThermostatScheduleTransition { tlvReader.enterStructure(tag) val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - null - } - val coolSetpoint = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - null - } - + val heatSetpoint = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + tlvReader.exitContainer() - return ThermostatClusterThermostatScheduleTransition( - transitionTime, - heatSetpoint, - coolSetpoint - ) + return ThermostatClusterThermostatScheduleTransition(transitionTime, heatSetpoint, coolSetpoint) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt index 4a7066df5d7f25..5fbc0d517459c1 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterNeighborTableStruct( - val extAddress: Long, - val age: Long, - val rloc16: Int, - val linkFrameCounter: Long, - val mleFrameCounter: Long, - val lqi: Int, - val averageRssi: Int?, - val lastRssi: Int?, - val frameErrorRate: Int, - val messageErrorRate: Int, - val rxOnWhenIdle: Boolean, - val fullThreadDevice: Boolean, - val fullNetworkData: Boolean, - val isChild: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( + val extAddress: Long, + val age: Long, + val rloc16: Int, + val linkFrameCounter: Long, + val mleFrameCounter: Long, + val lqi: Int, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: Int, + val messageErrorRate: Int, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean) { + override fun toString(): String = buildString { 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( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNeighborTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) @@ -113,45 +113,28 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( val linkFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) val mleFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - val averageRssi = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - null - } - val lastRssi = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) - null - } + val averageRssi = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } val frameErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) val messageErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterNeighborTableStruct( - extAddress, - age, - rloc16, - linkFrameCounter, - mleFrameCounter, - lqi, - averageRssi, - lastRssi, - frameErrorRate, - messageErrorRate, - rxOnWhenIdle, - fullThreadDevice, - fullNetworkData, - isChild - ) + return ThreadNetworkDiagnosticsClusterNeighborTableStruct(extAddress, age, rloc16, linkFrameCounter, mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt index f9764369891073..7276a7f3eccac4 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { tlvReader.enterStructure(tag) - val activeTimestampPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) - val pendingTimestampPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val activeTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) - val extendedPanIdPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) - val meshLocalPrefixPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val extendedPanIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) - val securityPolicyPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val securityPolicyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( - activeTimestampPresent, - pendingTimestampPresent, - masterKeyPresent, - networkNamePresent, - extendedPanIdPresent, - meshLocalPrefixPresent, - delayPresent, - panIdPresent, - channelPresent, - pskcPresent, - securityPolicyPresent, - channelMaskPresent - ) + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents(activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt index 8a7c423f84e6ad..c204266b42fcf5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterRouteTableStruct( - val extAddress: Long, - val rloc16: Int, - val routerId: Int, - val nextHop: Int, - val pathCost: Int, - val LQIIn: Int, - val LQIOut: Int, - val age: Int, - val allocated: Boolean, - val linkEstablished: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterRouteTableStruct ( + val extAddress: Long, + val rloc16: Int, + val routerId: Int, + val nextHop: Int, + val pathCost: Int, + val LQIIn: Int, + val LQIOut: Int, + val age: Int, + val allocated: Boolean, + val linkEstablished: Boolean) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") append("\textAddress : $extAddress\n") append("\trloc16 : $rloc16\n") @@ -78,7 +81,7 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterRouteTableStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterRouteTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) @@ -90,21 +93,10 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterRouteTableStruct( - extAddress, - rloc16, - routerId, - nextHop, - pathCost, - LQIIn, - LQIOut, - age, - allocated, - linkEstablished - ) + return ThreadNetworkDiagnosticsClusterRouteTableStruct(extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, LQIOut, age, allocated, linkEstablished) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt index 1474db405b9d43..d12f6e24c345f9 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterSecurityPolicy ( + val rotationTime: Int, + val flags: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") append("\trotationTime : $rotationTime\n") append("\tflags : $flags\n") @@ -43,11 +49,11 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val f private const val TAG_ROTATION_TIME = 0 private const val TAG_FLAGS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterSecurityPolicy { tlvReader.enterStructure(tag) val rotationTime = tlvReader.getInt(ContextSpecificTag(TAG_ROTATION_TIME)) val flags = tlvReader.getInt(ContextSpecificTag(TAG_FLAGS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt index d770d7a2ac8e03..be643cca35be70 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterDSTOffsetStruct( - val offset: Long, - val validStarting: Long, - val validUntil: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterDSTOffsetStruct ( + val offset: Long, + val validStarting: Long, + val validUntil: Long?) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") append("\toffset : $offset\n") append("\tvalidStarting : $validStarting\n") @@ -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(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTOffsetStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) - val validUntil = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) - null - } - + val validUntil = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + tlvReader.exitContainer() return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index 7a2e95c671517a..8c3acf12fe54e8 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( - val nodeID: Long, - val endpoint: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( + val nodeID: Long, + val endpoint: Int) { + 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( - tag: Tag, - tlvReader: TlvReader - ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt index 8a256fd7edfefe..11bdbff1851eaf 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class TimeSynchronizationClusterTimeZoneStruct( - val offset: Long, - val validAt: Long, - val name: Optional -) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStruct ( + val offset: Long, + val validAt: Long, + val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStruct {\n") append("\toffset : $offset\n") append("\tvalidAt : $validAt\n") @@ -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(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt index db50619ad5da53..668f0c1e923143 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterTrustedTimeSourceStruct( - val fabricIndex: Int, - val nodeID: Long, - val endpoint: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterTrustedTimeSourceStruct ( + val fabricIndex: Int, + val nodeID: Long, + val endpoint: Int) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") append("\tfabricIndex : $fabricIndex\n") append("\tnodeID : $nodeID\n") @@ -50,12 +53,12 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTrustedTimeSourceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt index bd34e9f5a90c49..ed3e7a0ef74243 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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.enterList(ContextSpecificTag(TAG_A)) - while (!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val a = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_A)) + while(!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterDoubleNestedStructList(a) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index 7ca3b0b29aab01..c0de5e08f6886b 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterNestedStruct( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNestedStruct ( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -50,12 +53,12 @@ class UnitTestingClusterNestedStruct( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - + tlvReader.exitContainer() return UnitTestingClusterNestedStruct(a, b, c) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt index b954fe0ec9879b..9b41c3e439e192 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterNestedStructList( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct, - val d: List, - val e: List, - val f: List, - val g: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNestedStructList ( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List) { + override fun toString(): String = buildString { 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(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStructList { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - val d = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_D)) - while (!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val e = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_E)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - val f = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_F)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val g = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_G)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val d = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_D)) + while(!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_E)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_F)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_G)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt index 08a4b642e69d45..1533278b6a1fac 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -20,25 +20,26 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class UnitTestingClusterNullablesAndOptionalsStruct( - val nullableInt: Int?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, - val nullableString: String?, - val optionalString: Optional, - val nullableOptionalString: Optional?, - val nullableStruct: UnitTestingClusterSimpleStruct?, - val optionalStruct: Optional, - val nullableOptionalStruct: Optional?, - val nullableList: List?, - val optionalList: Optional>, - val nullableOptionalList: Optional>? -) { - override fun toString(): String = buildString { +class UnitTestingClusterNullablesAndOptionalsStruct ( + val nullableInt: Int?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>?) { + override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") append("\tnullableInt : $nullableInt\n") append("\toptionalInt : $optionalInt\n") @@ -59,85 +60,85 @@ class UnitTestingClusterNullablesAndOptionalsStruct( tlvWriter.apply { startStructure(tag) if (nullableInt != null) { - put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_INT)) - } + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } if (optionalInt.isPresent) { - val optoptionalInt = optionalInt.get() - put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) - } + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } if (nullableOptionalInt != null) { - if (nullableOptionalInt.isPresent) { - val optnullableOptionalInt = nullableOptionalInt.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - } + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } if (nullableString != null) { - put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - } + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } if (optionalString.isPresent) { - val optoptionalString = optionalString.get() - put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) - } + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } if (nullableOptionalString != null) { - if (nullableOptionalString.isPresent) { - val optnullableOptionalString = nullableOptionalString.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - } + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } if (nullableStruct != null) { - nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - } + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } if (optionalStruct.isPresent) { - val optoptionalStruct = optionalStruct.get() - optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) - } + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } if (nullableOptionalStruct != null) { - if (nullableOptionalStruct.isPresent) { - val optnullableOptionalStruct = nullableOptionalStruct.get() - optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - } + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } if (nullableList != null) { - startList(ContextSpecificTag(TAG_NULLABLE_LIST)) - for (item in nullableList.iterator()) { - put(AnonymousTag, item) - } - endList() - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) } + endList() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + } if (optionalList.isPresent) { - val optoptionalList = optionalList.get() - startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - for (item in optoptionalList.iterator()) { - put(AnonymousTag, item) - } - endList() + val optoptionalList = optionalList.get() + startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) } + endList() + } if (nullableOptionalList != null) { - if (nullableOptionalList.isPresent) { - val optnullableOptionalList = nullableOptionalList.get() - startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - for (item in optnullableOptionalList.iterator()) { - put(AnonymousTag, item) - } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + } endStructure() } } @@ -156,153 +157,114 @@ class UnitTestingClusterNullablesAndOptionalsStruct( private const val TAG_OPTIONAL_LIST = 10 private const val TAG_NULLABLE_OPTIONAL_LIST = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNullablesAndOptionalsStruct { tlvReader.enterStructure(tag) - val nullableInt = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) - null - } - val optionalInt = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) - } else { - Optional.empty() - } - val nullableOptionalInt = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - null - } - val nullableString = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - null - } - val optionalString = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) - } else { - Optional.empty() - } - val nullableOptionalString = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - null - } - val nullableStruct = - if (!tlvReader.isNull()) { - UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - null - } - val optionalStruct = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { - Optional.of( - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_OPTIONAL_STRUCT), - tlvReader - ) - ) - } else { - Optional.empty() - } - val nullableOptionalStruct = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { - Optional.of( - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), - tlvReader - ) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - null - } - val nullableList = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - null - } - val optionalList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val nullableOptionalList = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - null - } - + val nullableInt = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), tlvReader)) + } else { + Optional.empty() + } + val nullableOptionalStruct = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val nullableOptionalList = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + tlvReader.exitContainer() - return UnitTestingClusterNullablesAndOptionalsStruct( - nullableInt, - optionalInt, - nullableOptionalInt, - nullableString, - optionalString, - nullableOptionalString, - nullableStruct, - optionalStruct, - nullableOptionalStruct, - nullableList, - optionalList, - nullableOptionalList - ) + return UnitTestingClusterNullablesAndOptionalsStruct(nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt index 26bf18a07ed214..381016bd583fa5 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterSimpleStruct( - val a: Int, - val b: Boolean, - val c: Int, - val d: ByteArray, - val e: String, - val f: Int, - val g: Float, - val h: Double -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterSimpleStruct ( + val a: Int, + val b: Boolean, + val c: Int, + val d: ByteArray, + val e: String, + val f: Int, + val g: Float, + val h: Double) { + override fun toString(): String = buildString { 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(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterSimpleStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) @@ -80,7 +83,7 @@ class UnitTestingClusterSimpleStruct( val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) - + tlvReader.exitContainer() return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index 6b7273f3172d5d..8a7b42ba939ae6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -20,21 +20,22 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class UnitTestingClusterTestFabricScoped( - val fabricSensitiveInt8u: Int, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: Int?, - val nullableOptionalFabricSensitiveInt8u: Optional?, - val fabricSensitiveCharString: String, - val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScoped ( + val fabricSensitiveInt8u: Int, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: Int?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") @@ -52,28 +53,22 @@ class UnitTestingClusterTestFabricScoped( startStructure(tag) put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) if (optionalFabricSensitiveInt8u.isPresent) { - val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() - put( - ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), - optoptionalFabricSensitiveInt8u - ) - } + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), optoptionalFabricSensitiveInt8u) + } if (nullableFabricSensitiveInt8u != null) { - put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } if (nullableOptionalFabricSensitiveInt8u != null) { - if (nullableOptionalFabricSensitiveInt8u.isPresent) { - val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() - put( - ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), - optnullableOptionalFabricSensitiveInt8u - ) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - } + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), optnullableOptionalFabricSensitiveInt8u) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) @@ -96,66 +91,44 @@ class UnitTestingClusterTestFabricScoped( private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScoped { tlvReader.enterStructure(tag) val fabricSensitiveInt8u = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) - val optionalFabricSensitiveInt8u = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - val nullableFabricSensitiveInt8u = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - null - } - val nullableOptionalFabricSensitiveInt8u = - if (!tlvReader.isNull()) { - if ( - tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - ) { - Optional.of( - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - null - } - val fabricSensitiveCharString = - tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) - val fabricSensitiveStruct = - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), - tlvReader - ) - val fabricSensitiveInt8uList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } + val optionalFabricSensitiveInt8u = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), tlvReader) + val fabricSensitiveInt8uList = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return UnitTestingClusterTestFabricScoped( - fabricSensitiveInt8u, - optionalFabricSensitiveInt8u, - nullableFabricSensitiveInt8u, - nullableOptionalFabricSensitiveInt8u, - fabricSensitiveCharString, - fabricSensitiveStruct, - fabricSensitiveInt8uList, - fabricIndex - ) + return UnitTestingClusterTestFabricScoped(fabricSensitiveInt8u, optionalFabricSensitiveInt8u, nullableFabricSensitiveInt8u, nullableOptionalFabricSensitiveInt8u, fabricSensitiveCharString, fabricSensitiveStruct, fabricSensitiveInt8uList, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt index 6c5df4cb224166..0540f4f11a30cb 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestListStructOctet ( + val member1: Long, + 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: Long, val member2: Byte private const val TAG_MEMBER1 = 0 private const val TAG_MEMBER2 = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestListStructOctet { tlvReader.enterStructure(tag) val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) - + tlvReader.exitContainer() return UnitTestingClusterTestListStructOctet(member1, member2) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt index d90396f2a010ea..44a824f2303a2e 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 chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.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(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UserLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return UserLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 8701d512deaeeb..90c0d95e581db9 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -13022,52 +13022,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::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 - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::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 - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13338,52 +13292,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::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 - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::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 - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -14913,52 +14821,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::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 - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::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 - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index a3936fe6b03dbb..396c7047956000 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2342,248 +2342,6 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) onFailure.release(); } -JNI_METHOD(void, LaundryWasherModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryWasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, LaundryWasherModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - LaundryWasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RefrigeratorAndTemperatureControlledCabinetModeCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - RefrigeratorAndTemperatureControlledCabinetModeCluster * cppCluster = - reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, LaundryWasherControlsCluster, writeSpinSpeedCurrentAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { @@ -2936,126 +2694,6 @@ JNI_METHOD(void, RvcCleanModeCluster, writeOnModeAttribute) onFailure.release(); } -JNI_METHOD(void, DishwasherModeCluster, writeStartUpModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DishwasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - -JNI_METHOD(void, DishwasherModeCluster, writeOnModeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::DishwasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - DishwasherModeCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, SmokeCoAlarmCluster, writeSmokeSensitivityLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 3903a402f42ebc..ddf8ab68e0a505 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -20262,139 +20262,6 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -20842,148 +20709,6 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback( @@ -23699,139 +23424,6 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 30e933b4810fa4..b57d790df2d1b9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -13955,16 +13955,6 @@ public interface SupportedModesAttributeCallback { void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } public interface GeneratedCommandListAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); @@ -14010,44 +14000,6 @@ public void subscribeCurrentModeAttribute( subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback ) { @@ -14134,24 +14086,6 @@ private native void subscribeCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); @@ -14230,16 +14164,6 @@ public interface SupportedModesAttributeCallback { void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } public interface GeneratedCommandListAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); @@ -14285,44 +14209,6 @@ public void subscribeCurrentModeAttribute( subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback ) { @@ -14409,24 +14295,6 @@ private native void subscribeCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); @@ -15792,16 +15660,6 @@ public interface SupportedModesAttributeCallback { void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } - public interface StartUpModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } - public interface OnModeAttributeCallback { - void onSuccess(@Nullable Integer value); - void onError(Exception ex); - default void onSubscriptionEstablished(long subscriptionId) {} - } public interface GeneratedCommandListAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); @@ -15847,44 +15705,6 @@ public void subscribeCurrentModeAttribute( subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback - ) { - readStartUpModeAttribute(chipClusterPtr, callback); - } - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback - ) { - readOnModeAttribute(chipClusterPtr, callback); - } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(chipClusterPtr, callback, value, null); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); - } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback - , - int minInterval, int maxInterval) { - subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback ) { @@ -15971,24 +15791,6 @@ private native void subscribeCurrentModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); - private native void readStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - ); - - private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeStartUpModeAttribute(long chipClusterPtr, - StartUpModeAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - ); - - private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); - private native void subscribeOnModeAttribute(long chipClusterPtr, - OnModeAttributeCallback callback - , int minInterval, int maxInterval); - private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 67727e6b56cf13..c0d3d665e5a200 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -6071,44 +6071,6 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedLaundryWasherModeClusterStartUpModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - -@Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedLaundryWasherModeClusterOnModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - -@Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } public static class DelegatedLaundryWasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -6228,44 +6190,6 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterStartUpModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - -@Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterOnModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - -@Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -7006,44 +6930,6 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedDishwasherModeClusterStartUpModeAttributeCallback implements ChipClusters.DishwasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - -@Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedDishwasherModeClusterOnModeAttributeCallback implements ChipClusters.DishwasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - -@Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } public static class DelegatedDishwasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 16efbfaa43c3e5..ad35b79a1c787e 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4394,20 +4394,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000002: { - "attributeName": "StartUpMode", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -4471,20 +4457,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000002: { - "attributeName": "StartUpMode", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -4922,20 +4894,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000002: { - "attributeName": "StartUpMode", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": 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 1ee10b3c5bdb19..3ec3d081eff034 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -15218,8 +15218,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), 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]), @@ -15230,8 +15228,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: supportedModes: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15352,38 +15348,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class StartUpMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000051 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000051 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -15491,8 +15455,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), 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]), @@ -15503,8 +15465,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15623,38 +15583,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class StartUpMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000052 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000052 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -16997,8 +16925,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[DishwasherMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), 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]), @@ -17009,8 +16935,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: supportedModes: 'typing.List[DishwasherMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -17130,38 +17054,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - @dataclass - class StartUpMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000059 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000059 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = 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 abf35d26b40424..a63b475592a667 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1956,12 +1956,6 @@ static BOOL AttributeIsSpecifiedInLaundryWasherModeCluster(AttributeId aAttribut case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -1995,12 +1989,6 @@ static BOOL AttributeIsSpecifiedInRefrigeratorAndTemperatureControlledCabinetMod case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -2232,12 +2220,6 @@ static BOOL AttributeIsSpecifiedInDishwasherModeCluster(AttributeId aAttributeId case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::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 14d0fb2f4bb436..f04f8d9520b7e7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -10266,40 +10266,6 @@ static id _Nullable DecodeAttributeValueForLaundryWasherModeCluster( return value; } #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; @@ -10521,40 +10487,6 @@ static id _Nullable DecodeAttributeValueForRefrigeratorAndTemperatureControlledC return value; } #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; @@ -11967,40 +11899,6 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( return value; } #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f8b8aebc1350fd..1411c3a7894563 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -8539,40 +8539,6 @@ MTR_PROVISIONALLY_AVAILABLE completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -8699,40 +8665,6 @@ MTR_PROVISIONALLY_AVAILABLE completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -9622,40 +9554,6 @@ MTR_PROVISIONALLY_AVAILABLE completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 5e6aa53256bb6f..0a8d4282388dbb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -50072,176 +50072,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -50650,176 +50480,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -53905,176 +53565,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 7f0f5a82834061..4458547228936b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3659,8 +3659,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster LaundryWasherMode attributes MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE @@ -3679,10 +3677,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = 0x00000000, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE - = 0x00000002, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE - = 0x00000003, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, @@ -3792,8 +3786,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster DishwasherMode attributes MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 77495c0ef94bfe..b4178c9a89b2e8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -3018,20 +3018,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3077,20 +3063,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3394,20 +3366,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 54316e5bba43da..cff1c348058422 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -10919,60 +10919,6 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) params:params]; } -- (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeLaundryWasherModeID) - attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) - params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeLaundryWasherModeID) - attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeLaundryWasherModeID) - attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) - params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeLaundryWasherModeID) - attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) @@ -11104,66 +11050,6 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo params:params]; } -- (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) - attributeID: - @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) - params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device - writeAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) - attributeID: - @(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device - readAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) - params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device - writeAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) - attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device @@ -12024,60 +11910,6 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par params:params]; } -- (NSDictionary *)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeDishwasherModeID) - attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) - params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeDishwasherModeID) - attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeDishwasherModeID) - attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) - params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) - clusterID:@(MTRClusterIDTypeDishwasherModeID) - attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) 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 8fac2b4581f03a..87acb587ebe9e4 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 @@ -11763,12 +11763,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::CurrentMode::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); break; - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); - break; - case Attributes::OnMode::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); - break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; @@ -11893,12 +11887,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::CurrentMode::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); break; - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); - break; - case Attributes::OnMode::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); - break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; @@ -12528,12 +12516,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::CurrentMode::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, currentMode)); break; - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, startUpMode)); - break; - case Attributes::OnMode::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, onMode)); - break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; 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 be7ffc777ee112..85fbb830cb59e0 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 @@ -14488,30 +14488,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace StartUpMode { -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::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode -namespace OnMode { -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::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -14559,8 +14535,6 @@ struct TypeInfo Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; - Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14691,30 +14665,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace StartUpMode { -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::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode -namespace OnMode { -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::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -14762,8 +14712,6 @@ struct TypeInfo Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; - Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -15740,30 +15688,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace StartUpMode { -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::DishwasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode -namespace OnMode { -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::DishwasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -15811,8 +15735,6 @@ struct TypeInfo Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; - Attributes::OnMode::TypeInfo::DecodableType onMode; 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 5e335aeb3d8d18..a4ec8c7446a364 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 @@ -2486,14 +2486,6 @@ namespace CurrentMode { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentMode -namespace StartUpMode { -static constexpr AttributeId Id = 0x00000002; -} // namespace StartUpMode - -namespace OnMode { -static constexpr AttributeId Id = 0x00000003; -} // namespace OnMode - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -2532,14 +2524,6 @@ namespace CurrentMode { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentMode -namespace StartUpMode { -static constexpr AttributeId Id = 0x00000002; -} // namespace StartUpMode - -namespace OnMode { -static constexpr AttributeId Id = 0x00000003; -} // namespace OnMode - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -2812,14 +2796,6 @@ namespace CurrentMode { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentMode -namespace StartUpMode { -static constexpr AttributeId Id = 0x00000002; -} // namespace StartUpMode - -namespace OnMode { -static constexpr AttributeId Id = 0x00000003; -} // namespace OnMode - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index fdcedab3338bc3..6eb2905f0dfce3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -4688,8 +4688,6 @@ class ModeSelectChangeToMode : public ClusterCommand | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4747,8 +4745,6 @@ class LaundryWasherModeChangeToMode : public ClusterCommand | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5026,8 +5022,6 @@ class TemperatureControlSetTemperature : public ClusterCommand | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -15024,8 +15018,6 @@ void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerComma make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -15038,10 +15030,6 @@ void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerComma Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15058,8 +15046,6 @@ void registerClusterLaundryWasherMode(Commands & commands, CredentialIssuerComma make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -15094,8 +15080,6 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -15108,10 +15092,6 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15128,8 +15108,6 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -15517,8 +15495,6 @@ void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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), // @@ -15531,10 +15507,6 @@ void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15551,8 +15523,6 @@ void registerClusterDishwasherMode(Commands & commands, CredentialIssuerCommands make_unique(Id, credsIssuerConfig), // make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // - make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // - make_unique(Id, "on-mode", Attributes::OnMode::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/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index a26f2ea8bf7c96..743fce461f5590 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8091,16 +8091,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case LaundryWasherMode::Attributes::StartUpMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpMode", 1, value); - } - case LaundryWasherMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); - } case LaundryWasherMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -8149,16 +8139,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpMode", 1, value); - } - case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); - } case RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -8491,16 +8471,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CurrentMode", 1, value); } - case DishwasherMode::Attributes::StartUpMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StartUpMode", 1, value); - } - case DishwasherMode::Attributes::OnMode::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("OnMode", 1, value); - } case DishwasherMode::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, 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 d80f332a2f2526..391a2fd5e566ee 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -48885,8 +48885,6 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -49116,256 +49114,6 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Attribute StartUpMode - */ -class ReadLaundryWasherModeStartUpMode : public ReadAttribute { -public: - ReadLaundryWasherModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadLaundryWasherModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::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 = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); - if (error != nil) { - LogNSError("LaundryWasherMode StartUpMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherModeStartUpMode : public WriteAttribute { -public: - WriteLaundryWasherModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeStartUpModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherMode StartUpMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeLaundryWasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeLaundryWasherModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::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 = [[MTRBaseClusterLaundryWasherMode 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 subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadLaundryWasherModeOnMode : public ReadAttribute { -public: - ReadLaundryWasherModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadLaundryWasherModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::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 = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); - if (error != nil) { - LogNSError("LaundryWasherMode OnMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherModeOnMode : public WriteAttribute { -public: - WriteLaundryWasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOnModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherMode OnMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeLaundryWasherModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeLaundryWasherModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::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 = [[MTRBaseClusterLaundryWasherMode 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 subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -49861,8 +49609,6 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -50104,270 +49850,6 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Attribute StartUpMode - */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { -public: - ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId - = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::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 = - [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId - = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = - [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeStartUpModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId - = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::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 = - [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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 subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { -public: - ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId - = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::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 = - [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId - = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = - [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOnModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId - = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::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 = - [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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 subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -55571,8 +55053,6 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -55802,256 +55282,6 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Attribute StartUpMode - */ -class ReadDishwasherModeStartUpMode : public ReadAttribute { -public: - ReadDishwasherModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadDishwasherModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::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 = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); - if (error != nil) { - LogNSError("DishwasherMode StartUpMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeStartUpMode : public WriteAttribute { -public: - WriteDishwasherModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeStartUpModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode StartUpMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeDishwasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeDishwasherModeStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::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 = [[MTRBaseClusterDishwasherMode 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 subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadDishwasherModeOnMode : public ReadAttribute { -public: - ReadDishwasherModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadDishwasherModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::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 = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); - if (error != nil) { - LogNSError("DishwasherMode OnMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeOnMode : public WriteAttribute { -public: - WriteDishwasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (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 = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOnModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode OnMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { -public: - SubscribeAttributeDishwasherModeOnMode() - : SubscribeAttribute("on-mode") - { - } - - ~SubscribeAttributeDishwasherModeOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::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 = [[MTRBaseClusterDishwasherMode 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 subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -149524,16 +148754,6 @@ void registerClusterLaundryWasherMode(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // @@ -149586,16 +148806,6 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // @@ -149954,16 +149164,6 @@ void registerClusterDishwasherMode(Commands & commands) make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // From 7eb58181fd0608ba9897cfb8ad1f65b6dfbeb3b6 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Sep 2023 13:31:51 -0400 Subject: [PATCH 02/13] Address styling issues. --- .../zcl/zcl-with-test-extensions.json | 72 +-- src/app/zap-templates/zcl/zcl.json | 72 +-- ...olClusterAccessControlEntryChangedEvent.kt | 99 +++-- ...usterAccessControlExtensionChangedEvent.kt | 99 +++-- .../ActionsClusterActionFailedEvent.kt | 21 +- .../ActionsClusterStateChangedEvent.kt | 15 +- .../BasicInformationClusterLeaveEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 13 +- .../BasicInformationClusterStartUpEvent.kt | 13 +- .../BooleanStateClusterStateChangeEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 16 +- ...viceBasicInformationClusterStartUpEvent.kt | 13 +- .../DishwasherAlarmClusterNotifyEvent.kt | 21 +- .../DoorLockClusterDoorLockAlarmEvent.kt | 13 +- .../DoorLockClusterDoorStateChangeEvent.kt | 13 +- .../DoorLockClusterLockOperationErrorEvent.kt | 159 ++++--- .../DoorLockClusterLockOperationEvent.kt | 156 ++++--- .../DoorLockClusterLockUserChangeEvent.kt | 121 +++--- ...eneralDiagnosticsClusterBootReasonEvent.kt | 13 +- ...gnosticsClusterHardwareFaultChangeEvent.kt | 46 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 46 +- ...DiagnosticsClusterRadioFaultChangeEvent.kt | 46 +- ...nalStateClusterOperationCompletionEvent.kt | 94 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- ...pdateRequestorClusterDownloadErrorEvent.kt | 73 ++-- ...ateRequestorClusterStateTransitionEvent.kt | 52 ++- ...dateRequestorClusterVersionAppliedEvent.kt | 20 +- ...rSourceClusterBatChargeFaultChangeEvent.kt | 43 +- .../PowerSourceClusterBatFaultChangeEvent.kt | 43 +- ...PowerSourceClusterWiredFaultChangeEvent.kt | 43 +- .../RefrigeratorAlarmClusterNotifyEvent.kt | 21 +- ...nalStateClusterOperationCompletionEvent.kt | 97 +++-- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- .../SmokeCoAlarmClusterCOAlarmEvent.kt | 13 +- ...eCoAlarmClusterInterconnectCOAlarmEvent.kt | 13 +- ...AlarmClusterInterconnectSmokeAlarmEvent.kt | 13 +- .../SmokeCoAlarmClusterLowBatteryEvent.kt | 13 +- .../SmokeCoAlarmClusterSmokeAlarmEvent.kt | 13 +- ...areDiagnosticsClusterSoftwareFaultEvent.kt | 52 +-- .../SwitchClusterInitialPressEvent.kt | 13 +- .../SwitchClusterLongPressEvent.kt | 13 +- .../SwitchClusterLongReleaseEvent.kt | 13 +- .../SwitchClusterMultiPressCompleteEvent.kt | 20 +- .../SwitchClusterMultiPressOngoingEvent.kt | 20 +- .../SwitchClusterShortReleaseEvent.kt | 13 +- .../SwitchClusterSwitchLatchedEvent.kt | 13 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 49 ++- ...imeSynchronizationClusterDSTStatusEvent.kt | 13 +- ...nchronizationClusterTimeZoneStatusEvent.kt | 30 +- .../UnitTestingClusterTestEventEvent.kt | 65 +-- ...estingClusterTestFabricScopedEventEvent.kt | 13 +- ...agnosticsClusterAssociationFailureEvent.kt | 20 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...orkDiagnosticsClusterDisconnectionEvent.kt | 13 +- ...sControlClusterAccessControlEntryStruct.kt | 108 ++--- ...trolClusterAccessControlExtensionStruct.kt | 14 +- ...ControlClusterAccessControlTargetStruct.kt | 82 ++-- .../structs/ActionsClusterActionStruct.kt | 34 +- .../ActionsClusterEndpointListStruct.kt | 35 +- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...pplicationBasicClusterApplicationStruct.kt | 17 +- ...ationLauncherClusterApplicationEPStruct.kt | 39 +- ...icationLauncherClusterApplicationStruct.kt | 17 +- .../AudioOutputClusterOutputInfoStruct.kt | 15 +- ...nformationClusterCapabilityMinimaStruct.kt | 25 +- ...formationClusterProductAppearanceStruct.kt | 35 +- .../structs/BindingClusterTargetStruct.kt | 90 ++-- ...formationClusterProductAppearanceStruct.kt | 41 +- .../ChannelClusterChannelInfoStruct.kt | 81 ++-- .../structs/ChannelClusterLineupInfoStruct.kt | 54 +-- ...tentLauncherClusterAdditionalInfoStruct.kt | 14 +- ...auncherClusterBrandingInformationStruct.kt | 143 +++--- ...ntentLauncherClusterContentSearchStruct.kt | 29 +- .../ContentLauncherClusterDimensionStruct.kt | 19 +- .../ContentLauncherClusterParameterStruct.kt | 54 +-- ...ntLauncherClusterStyleInformationStruct.kt | 71 +-- .../DescriptorClusterDeviceTypeStruct.kt | 14 +- .../DescriptorClusterSemanticTagStruct.kt | 76 ++-- .../DishwasherModeClusterModeOptionStruct.kt | 33 +- .../DishwasherModeClusterModeTagStruct.kt | 30 +- .../DoorLockClusterCredentialStruct.kt | 14 +- .../structs/FixedLabelClusterLabelStruct.kt | 14 +- ...missioningClusterBasicCommissioningInfo.kt | 28 +- ...neralDiagnosticsClusterNetworkInterface.kt | 117 ++--- ...pKeyManagementClusterGroupInfoMapStruct.kt | 51 +-- ...upKeyManagementClusterGroupKeyMapStruct.kt | 19 +- ...upKeyManagementClusterGroupKeySetStruct.kt | 169 ++++---- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...mentClusterMonitoringRegistrationStruct.kt | 28 +- ...aundryWasherModeClusterModeOptionStruct.kt | 33 +- .../LaundryWasherModeClusterModeTagStruct.kt | 30 +- .../MediaInputClusterInputInfoStruct.kt | 21 +- ...iaPlaybackClusterPlaybackPositionStruct.kt | 35 +- .../ModeSelectClusterModeOptionStruct.kt | 33 +- .../ModeSelectClusterSemanticTagStruct.kt | 14 +- ...rkCommissioningClusterNetworkInfoStruct.kt | 17 +- ...gClusterThreadInterfaceScanResultStruct.kt | 43 +- ...ingClusterWiFiInterfaceScanResultStruct.kt | 37 +- ...redentialsClusterFabricDescriptorStruct.kt | 37 +- .../OperationalCredentialsClusterNOCStruct.kt | 40 +- ...OperationalStateClusterErrorStateStruct.kt | 58 +-- ...ionalStateClusterOperationalStateStruct.kt | 38 +- ...eUpdateRequestorClusterProviderLocation.kt | 25 +- ...erSourceClusterBatChargeFaultChangeType.kt | 43 +- .../PowerSourceClusterBatFaultChangeType.kt | 43 +- .../PowerSourceClusterWiredFaultChangeType.kt | 43 +- ...olledCabinetModeClusterModeOptionStruct.kt | 47 +- ...ntrolledCabinetModeClusterModeTagStruct.kt | 36 +- .../RvcCleanModeClusterModeOptionStruct.kt | 33 +- .../RvcCleanModeClusterModeTagStruct.kt | 30 +- ...OperationalStateClusterErrorStateStruct.kt | 58 +-- ...ionalStateClusterOperationalStateStruct.kt | 38 +- .../RvcRunModeClusterModeOptionStruct.kt | 33 +- .../structs/RvcRunModeClusterModeTagStruct.kt | 30 +- .../ScenesClusterAttributeValuePair.kt | 14 +- .../structs/ScenesClusterExtensionFieldSet.kt | 31 +- ...reDiagnosticsClusterThreadMetricsStruct.kt | 98 +++-- .../TargetNavigatorClusterTargetInfoStruct.kt | 14 +- ...statClusterThermostatScheduleTransition.kt | 67 +-- ...rkDiagnosticsClusterNeighborTableStruct.kt | 103 +++-- ...ticsClusterOperationalDatasetComponents.kt | 70 +-- ...tworkDiagnosticsClusterRouteTableStruct.kt | 46 +- ...NetworkDiagnosticsClusterSecurityPolicy.kt | 14 +- ...meSynchronizationClusterDSTOffsetStruct.kt | 40 +- ...sterFabricScopedTrustedTimeSourceStruct.kt | 20 +- ...imeSynchronizationClusterTimeZoneStruct.kt | 35 +- ...onizationClusterTrustedTimeSourceStruct.kt | 19 +- ...nitTestingClusterDoubleNestedStructList.kt | 27 +- .../structs/UnitTestingClusterNestedStruct.kt | 19 +- .../UnitTestingClusterNestedStructList.kt | 86 ++-- ...stingClusterNullablesAndOptionalsStruct.kt | 410 ++++++++++-------- .../structs/UnitTestingClusterSimpleStruct.kt | 29 +- .../UnitTestingClusterTestFabricScoped.kt | 145 ++++--- .../UnitTestingClusterTestListStructOctet.kt | 14 +- .../structs/UserLabelClusterLabelStruct.kt | 14 +- 136 files changed, 2979 insertions(+), 2975 deletions(-) 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 a0477c580041f4..ee55f5b5abf332 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -113,15 +113,9 @@ "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { "text": { - "defaultResponsePolicy": [ - "Always", - "Conditional", - "Never" - ] + "defaultResponsePolicy": ["Always", "Conditional", "Never"] }, - "bool": [ - "commandDiscovery" - ] + "bool": ["commandDiscovery"] }, "defaults": { "text": { @@ -165,12 +159,8 @@ "CapabilityMinima", "ProductAppearance" ], - "Bridged Device Basic Information": [ - "ProductAppearance" - ], - "Descriptor": [ - "ClusterRevision" - ], + "Bridged Device Basic Information": ["ProductAppearance"], + "Descriptor": ["ClusterRevision"], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -224,10 +214,7 @@ "FeatureMap", "ThreadMetrics" ], - "Scenes": [ - "SceneCount", - "RemainingCapacity" - ], + "Scenes": ["SceneCount", "RemainingCapacity"], "Unit Testing": [ "struct_attr", "nullable_struct", @@ -311,19 +298,10 @@ "CurrentMaxRate", "OverrunCount" ], - "Channel": [ - "Lineup", - "CurrentChannel" - ], - "Media Playback": [ - "SampledPosition" - ], - "Application Launcher": [ - "CurrentApp" - ], - "Application Basic": [ - "Application" - ], + "Channel": ["Lineup", "CurrentChannel"], + "Media Playback": ["SampledPosition"], + "Application Launcher": ["CurrentApp"], + "Application Basic": ["Application"], "Time Synchronization": [ "TrustedTimeSource", "DefaultNTP", @@ -335,19 +313,9 @@ "TimeZoneListMaxSize", "DSTOffsetListMaxSize" ], - "Temperature Control": [ - "SupportedTemperatureLevels" - ], - "Dishwasher Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], - "Laundry Washer Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], + "Temperature Control": ["SupportedTemperatureLevels"], + "Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], "Refrigerator And Temperature Controlled Cabinet Mode": [ "SupportedModes", "CurrentMode", @@ -537,24 +505,14 @@ "LevelValue", "FeatureMap" ], - "Air Quality": [ - "AirQuality", - "FeatureMap" - ] + "Air Quality": ["AirQuality", "FeatureMap"] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": [ - "ARRAY", - "BITMAP", - "ENUM", - "NUMBER", - "STRING", - "STRUCT" - ], + "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], "fabricHandling": { "automaticallyCreateFields": true, "indexFieldId": 254, "indexFieldName": "FabricIndex", "indexType": "fabric_idx" } -} \ No newline at end of file +} diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index c1a9f7cc4727cf..4290116929d57b 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -111,15 +111,9 @@ "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { "text": { - "defaultResponsePolicy": [ - "Always", - "Conditional", - "Never" - ] + "defaultResponsePolicy": ["Always", "Conditional", "Never"] }, - "bool": [ - "commandDiscovery" - ] + "bool": ["commandDiscovery"] }, "defaults": { "text": { @@ -163,12 +157,8 @@ "CapabilityMinima", "ProductAppearance" ], - "Bridged Device Basic Information": [ - "ProductAppearance" - ], - "Descriptor": [ - "ClusterRevision" - ], + "Bridged Device Basic Information": ["ProductAppearance"], + "Descriptor": ["ClusterRevision"], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -222,10 +212,7 @@ "FeatureMap", "ThreadMetrics" ], - "Scenes": [ - "SceneCount", - "RemainingCapacity" - ], + "Scenes": ["SceneCount", "RemainingCapacity"], "Unit Testing": [ "struct_attr", "nullable_struct", @@ -309,19 +296,10 @@ "CurrentMaxRate", "OverrunCount" ], - "Channel": [ - "Lineup", - "CurrentChannel" - ], - "Media Playback": [ - "SampledPosition" - ], - "Application Launcher": [ - "CurrentApp" - ], - "Application Basic": [ - "Application" - ], + "Channel": ["Lineup", "CurrentChannel"], + "Media Playback": ["SampledPosition"], + "Application Launcher": ["CurrentApp"], + "Application Basic": ["Application"], "Time Synchronization": [ "TrustedTimeSource", "DefaultNTP", @@ -333,19 +311,9 @@ "TimeZoneListMaxSize", "DSTOffsetListMaxSize" ], - "Temperature Control": [ - "SupportedTemperatureLevels" - ], - "Dishwasher Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], - "Laundry Washer Mode": [ - "SupportedModes", - "CurrentMode", - "FeatureMap" - ], + "Temperature Control": ["SupportedTemperatureLevels"], + "Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], + "Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], "Refrigerator And Temperature Controlled Cabinet Mode": [ "SupportedModes", "CurrentMode", @@ -535,24 +503,14 @@ "LevelValue", "FeatureMap" ], - "Air Quality": [ - "AirQuality", - "FeatureMap" - ] + "Air Quality": ["AirQuality", "FeatureMap"] }, "defaultReportingPolicy": "mandatory", - "ZCLDataTypes": [ - "ARRAY", - "BITMAP", - "ENUM", - "NUMBER", - "STRING", - "STRUCT" - ], + "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], "fabricHandling": { "automaticallyCreateFields": true, "indexFieldId": 254, "indexFieldName": "FabricIndex", "indexType": "fabric_idx" } -} \ No newline at end of file +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt index 338c93d265e2c2..e926e70d861c20 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlEntryChangedEvent ( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlEntryChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlEntryChangedEvent ( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlEntryChangedEvent ( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlEntryChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) + return AccessControlClusterAccessControlEntryChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt index 064b86812956d4..e01b81cec705bb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlExtensionChangedEvent ( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlExtensionChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent ( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlExtensionChangedEvent ( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) + return AccessControlClusterAccessControlExtensionChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt index 167cdbeaebfee4..d2e375338f705d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterActionFailedEvent ( - val actionID: Int, - val invokeID: Long, - val newState: Int, - val error: Int) { - override fun toString(): String = buildString { +class ActionsClusterActionFailedEvent( + val actionID: Int, + val invokeID: Long, + val newState: Int, + val error: Int +) { + override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -57,13 +54,13 @@ class ActionsClusterActionFailedEvent ( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) val error = tlvReader.getInt(ContextSpecificTag(TAG_ERROR)) - + tlvReader.exitContainer() return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt index cd461b0ff538ef..05ad68aae272ea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -17,20 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterStateChangedEvent ( - val actionID: Int, - val invokeID: Long, - val newState: Int) { - override fun toString(): String = buildString { +class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { + override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -53,12 +46,12 @@ class ActionsClusterStateChangedEvent ( private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterStateChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) - + tlvReader.exitContainer() return ActionsClusterStateChangedEvent(actionID, invokeID, newState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt index e45d705386325c..962ed26cddb40d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterLeaveEvent ( - val fabricIndex: Int) { - override fun toString(): String = buildString { +class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { append("BasicInformationClusterLeaveEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -45,10 +40,10 @@ class BasicInformationClusterLeaveEvent ( companion object { private const val TAG_FABRIC_INDEX = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterLeaveEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BasicInformationClusterLeaveEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt index 025e619be435d4..c40211aa617dcc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterReachableChangedEvent ( - val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -45,10 +40,10 @@ class BasicInformationClusterReachableChangedEvent ( companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterReachableChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt index f0ab0ec9b2e99f..23082666b05cae 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterStartUpEvent ( - val softwareVersion: Long) { - override fun toString(): String = buildString { +class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { append("BasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -45,10 +40,10 @@ class BasicInformationClusterStartUpEvent ( companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt index 8194ba7d1f742d..a0ecfb76141580 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BooleanStateClusterStateChangeEvent ( - val stateValue: Boolean) { - override fun toString(): String = buildString { +class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { + override fun toString(): String = buildString { append("BooleanStateClusterStateChangeEvent {\n") append("\tstateValue : $stateValue\n") append("}\n") @@ -45,10 +40,10 @@ class BooleanStateClusterStateChangeEvent ( companion object { private const val TAG_STATE_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BooleanStateClusterStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { tlvReader.enterStructure(tag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) - + tlvReader.exitContainer() return BooleanStateClusterStateChangeEvent(stateValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt index c66f3595c88152..e75b2f7af96f93 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BridgedDeviceBasicInformationClusterReachableChangedEvent ( - val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -45,10 +40,13 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent ( companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterReachableChangedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt index 9b1e886926c1bd..80c60be6847056 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BridgedDeviceBasicInformationClusterStartUpEvent ( - val softwareVersion: Long) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -45,10 +40,10 @@ class BridgedDeviceBasicInformationClusterStartUpEvent ( companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt index b2a29696b191a8..0b7206788e842a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DishwasherAlarmClusterNotifyEvent ( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long) { - override fun toString(): String = buildString { +class DishwasherAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -57,13 +54,13 @@ class DishwasherAlarmClusterNotifyEvent ( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherAlarmClusterNotifyEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { tlvReader.enterStructure(tag) val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt index 309eb4e52c29f2..6417fb85009e88 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterDoorLockAlarmEvent ( - val alarmCode: Int) { - override fun toString(): String = buildString { +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorLockAlarmEvent {\n") append("\talarmCode : $alarmCode\n") append("}\n") @@ -45,10 +40,10 @@ class DoorLockClusterDoorLockAlarmEvent ( companion object { private const val TAG_ALARM_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorLockAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { tlvReader.enterStructure(tag) val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) - + tlvReader.exitContainer() return DoorLockClusterDoorLockAlarmEvent(alarmCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt index 05068118f56c59..d0b6acbe7ea227 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterDoorStateChangeEvent ( - val doorState: Int) { - override fun toString(): String = buildString { +class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorStateChangeEvent {\n") append("\tdoorState : $doorState\n") append("}\n") @@ -45,10 +40,10 @@ class DoorLockClusterDoorStateChangeEvent ( companion object { private const val TAG_DOOR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { tlvReader.enterStructure(tag) val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) - + tlvReader.exitContainer() return DoorLockClusterDoorStateChangeEvent(doorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt index 34dd208597b65e..59e38fa054dd87 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -20,21 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class DoorLockClusterLockOperationErrorEvent ( - val lockOperationType: Int, - val operationSource: Int, - val operationError: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val credentials: Optional>?) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationErrorEvent( + val lockOperationType: Int, + val operationSource: Int, + val operationError: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationErrorEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -53,32 +53,32 @@ class DoorLockClusterLockOperationErrorEvent ( put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) - } endStructure() } } @@ -92,49 +92,68 @@ class DoorLockClusterLockOperationErrorEvent ( private const val TAG_SOURCE_NODE = 5 private const val TAG_CREDENTIALS = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { tlvReader.enterStructure(tag) val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) val operationError = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_ERROR)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationErrorEvent(lockOperationType, operationSource, operationError, userIndex, fabricIndex, sourceNode, credentials) + return DoorLockClusterLockOperationErrorEvent( + lockOperationType, + operationSource, + operationError, + userIndex, + fabricIndex, + sourceNode, + credentials + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt index d1f83b46c08222..4fbf71082c7adc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -20,20 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class DoorLockClusterLockOperationEvent ( - val lockOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val credentials: Optional>?) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationEvent( + val lockOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -50,32 +50,32 @@ class DoorLockClusterLockOperationEvent ( put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) - } endStructure() } } @@ -88,48 +88,66 @@ class DoorLockClusterLockOperationEvent ( private const val TAG_SOURCE_NODE = 4 private const val TAG_CREDENTIALS = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { tlvReader.enterStructure(tag) val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationEvent(lockOperationType, operationSource, userIndex, fabricIndex, sourceNode, credentials) + return DoorLockClusterLockOperationEvent( + lockOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + credentials + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt index c8b7dd9380bb7f..6fc562b39959ff 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -17,24 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterLockUserChangeEvent ( - val lockDataType: Int, - val dataOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val dataIndex: Int?) { - override fun toString(): String = buildString { +class DoorLockClusterLockUserChangeEvent( + val lockDataType: Int, + val dataOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val dataIndex: Int? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockUserChangeEvent {\n") append("\tlockDataType : $lockDataType\n") append("\tdataOperationType : $dataOperationType\n") @@ -53,25 +50,25 @@ class DoorLockClusterLockUserChangeEvent ( put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (dataIndex != null) { - put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) - } else { - putNull(ContextSpecificTag(TAG_DATA_INDEX)) - } + put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) + } else { + putNull(ContextSpecificTag(TAG_DATA_INDEX)) + } endStructure() } } @@ -85,39 +82,51 @@ class DoorLockClusterLockUserChangeEvent ( private const val TAG_SOURCE_NODE = 5 private const val TAG_DATA_INDEX = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockUserChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { tlvReader.enterStructure(tag) val lockDataType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) val dataOperationType = tlvReader.getInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val dataIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockUserChangeEvent(lockDataType, dataOperationType, operationSource, userIndex, fabricIndex, sourceNode, dataIndex) + return DoorLockClusterLockUserChangeEvent( + lockDataType, + dataOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + dataIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt index 79b58b0d67cdae..3d743983f1a00f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterBootReasonEvent ( - val bootReason: Int) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterBootReasonEvent {\n") append("\tbootReason : $bootReason\n") append("}\n") @@ -45,10 +40,10 @@ class GeneralDiagnosticsClusterBootReasonEvent ( companion object { private const val TAG_BOOT_REASON = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterBootReasonEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { tlvReader.enterStructure(tag) val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) - + tlvReader.exitContainer() return GeneralDiagnosticsClusterBootReasonEvent(bootReason) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt index 207d45c24e3c40..1287eba322b742 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterHardwareFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,25 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterHardwareFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt index 5fed1abd0f4c09..f9fc3cadc8b934 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,25 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt index 7a0b4e386ca3f9..35daf8dd691bf5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterRadioFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterRadioFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,25 @@ class GeneralDiagnosticsClusterRadioFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterRadioFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt index 8e0999dbb5eed6..092e062784a118 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class OperationalStateClusterOperationCompletionEvent ( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional?) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -43,21 +41,21 @@ class OperationalStateClusterOperationCompletionEvent ( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -67,33 +65,39 @@ class OperationalStateClusterOperationCompletionEvent ( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationCompletionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return OperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) + return OperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt index ef4633c2ffe087..b5623a0d701579 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -17,18 +17,15 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OperationalStateClusterOperationalErrorEvent ( - val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -45,10 +42,14 @@ class OperationalStateClusterOperationalErrorEvent ( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = + chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + tlvReader.exitContainer() return OperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt index 3e7ac690e0fbab..8a82cbf93c9f1f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( - val softwareVersion: Long, - val bytesDownloaded: Long, - val progressPercent: Int?, - val platformCode: Long?) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + val softwareVersion: Long, + val bytesDownloaded: Long, + val progressPercent: Int?, + val platformCode: Long? +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tbytesDownloaded : $bytesDownloaded\n") @@ -46,15 +43,15 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) if (progressPercent != null) { - put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) - } else { - putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } + put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) + } else { + putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } if (platformCode != null) { - put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) - } else { - putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - } + put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) + } else { + putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + } endStructure() } } @@ -65,26 +62,36 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( private const val TAG_PROGRESS_PERCENT = 2 private const val TAG_PLATFORM_CODE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) - val progressPercent = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - null - } - val platformCode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - null - } - + val progressPercent = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent(softwareVersion, bytesDownloaded, progressPercent, platformCode) + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + softwareVersion, + bytesDownloaded, + progressPercent, + platformCode + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt index bcd1db0f6990bf..b0b075689fc3be 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( - val previousState: Int, - val newState: Int, - val reason: Int, - val targetSoftwareVersion: Long?) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + val previousState: Int, + val newState: Int, + val reason: Int, + val targetSoftwareVersion: Long? +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") append("\tpreviousState : $previousState\n") append("\tnewState : $newState\n") @@ -47,10 +44,10 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( put(ContextSpecificTag(TAG_NEW_STATE), newState) put(ContextSpecificTag(TAG_REASON), reason) if (targetSoftwareVersion != null) { - put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) - } else { - putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } + put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) + } else { + putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } endStructure() } } @@ -61,21 +58,30 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( private const val TAG_REASON = 2 private const val TAG_TARGET_SOFTWARE_VERSION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { tlvReader.enterStructure(tag) val previousState = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) val reason = tlvReader.getInt(ContextSpecificTag(TAG_REASON)) - val targetSoftwareVersion = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - null - } - + val targetSoftwareVersion = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterStateTransitionEvent(previousState, newState, reason, targetSoftwareVersion) + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + previousState, + newState, + reason, + targetSoftwareVersion + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt index 96bb018c4e0bd0..ff1034ace97e31 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( - val softwareVersion: Long, - val productID: Int) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( + val softwareVersion: Long, + val productID: Int +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tproductID : $productID\n") @@ -49,11 +46,14 @@ class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( private const val TAG_SOFTWARE_VERSION = 0 private const val TAG_PRODUCT_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val productID = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_I_D)) - + tlvReader.exitContainer() return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt index eb8be2f538a999..c3eb0d1e658b56 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatChargeFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatChargeFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt index 782fba2707b2f5..c010184156ecb3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt index 1906ef9014899d..8a06b36fba61d0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterWiredFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterWiredFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt index a67296515fc256..c116f16ac73229 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RefrigeratorAlarmClusterNotifyEvent ( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long) { - override fun toString(): String = buildString { +class RefrigeratorAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -57,13 +54,13 @@ class RefrigeratorAlarmClusterNotifyEvent ( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAlarmClusterNotifyEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { tlvReader.enterStructure(tag) val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt index f43dd669cf87ca..c6afaa9750adf8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcOperationalStateClusterOperationCompletionEvent ( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional?) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -43,21 +41,21 @@ class RvcOperationalStateClusterOperationCompletionEvent ( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -67,33 +65,42 @@ class RvcOperationalStateClusterOperationCompletionEvent ( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationCompletionEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) + return RvcOperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt index ee80a6e06fb3a6..bf6fed9817f60f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -17,18 +17,15 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RvcOperationalStateClusterOperationalErrorEvent ( - val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -45,10 +42,14 @@ class RvcOperationalStateClusterOperationalErrorEvent ( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = + chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + tlvReader.exitContainer() return RvcOperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt index 0c2e543c57451c..2bc948e2a667b1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterCOAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterCOAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt index 6ddfb212cc0515..19223606c4685d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt index c3ada5b8d56ba2..38e2fe872915f7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt index a1b2573db15fb6..ce2d9ad47341d0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterLowBatteryEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterLowBatteryEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterLowBatteryEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterLowBatteryEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt index 01753b1e77aa97..324a5d4461a225 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterSmokeAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterSmokeAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt index 1ae05ccf0043b2..50b455842e538f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class SoftwareDiagnosticsClusterSoftwareFaultEvent ( - val id: Long, - val name: Optional, - val faultRecording: Optional) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterSoftwareFaultEvent( + val id: Long, + val name: Optional, + val faultRecording: Optional +) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -43,13 +41,13 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent ( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (faultRecording.isPresent) { - val optfaultRecording = faultRecording.get() - put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) - } + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } endStructure() } } @@ -59,20 +57,22 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent ( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterSoftwareFaultEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val faultRecording = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt index 62973598b9aff5..893412c1f25322 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterInitialPressEvent ( - val newPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterInitialPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterInitialPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterInitialPressEvent ( companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterInitialPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterInitialPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt index d67e1ba0076ca9..3fa420f46ddec3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterLongPressEvent ( - val newPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterLongPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterLongPressEvent ( companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt index c26312888c3d2d..eb90698fc735ab 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterLongReleaseEvent ( - val previousPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterLongReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterLongReleaseEvent ( companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt index 1e7eb6055668a6..81141e17424fbb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterMultiPressCompleteEvent ( - val previousPosition: Int, - val totalNumberOfPressesCounted: Int) { - override fun toString(): String = buildString { +class SwitchClusterMultiPressCompleteEvent( + val previousPosition: Int, + val totalNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressCompleteEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") @@ -49,11 +46,12 @@ class SwitchClusterMultiPressCompleteEvent ( private const val TAG_PREVIOUS_POSITION = 0 private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressCompleteEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - val totalNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) - + val totalNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt index 0500e314f696ef..11fab26fdfce8e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterMultiPressOngoingEvent ( - val newPosition: Int, - val currentNumberOfPressesCounted: Int) { - override fun toString(): String = buildString { +class SwitchClusterMultiPressOngoingEvent( + val newPosition: Int, + val currentNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressOngoingEvent {\n") append("\tnewPosition : $newPosition\n") append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") @@ -49,11 +46,12 @@ class SwitchClusterMultiPressOngoingEvent ( private const val TAG_NEW_POSITION = 0 private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressOngoingEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - val currentNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) - + val currentNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt index 5d3e2f26c7fd0c..0eeb9e2841fd7c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterShortReleaseEvent ( - val previousPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterShortReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterShortReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterShortReleaseEvent ( companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterShortReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterShortReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt index ec54e50aae31af..2b921b37ac6c2b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterSwitchLatchedEvent ( - val newPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterSwitchLatchedEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterSwitchLatchedEvent ( companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterSwitchLatchedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterSwitchLatchedEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt index cca6b8f8499a17..ffdc72b1e54c89 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( - val connectionStatus: Int) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -45,10 +40,13 @@ class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt index ef103a4821a3e2..f9110c39fa1d40 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,28 @@ class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt index b66f227f0d07fe..53090f750b4e06 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterDSTStatusEvent ( - val DSTOffsetActive: Boolean) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTStatusEvent {\n") append("\tDSTOffsetActive : $DSTOffsetActive\n") append("}\n") @@ -45,10 +40,10 @@ class TimeSynchronizationClusterDSTStatusEvent ( companion object { private const val TAG_D_S_T_OFFSET_ACTIVE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { tlvReader.enterStructure(tag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) - + tlvReader.exitContainer() return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt index 2ccb1685646258..452e9d902c4767 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class TimeSynchronizationClusterTimeZoneStatusEvent ( - val offset: Long, - val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") append("\toffset : $offset\n") append("\tname : $name\n") @@ -41,9 +36,9 @@ class TimeSynchronizationClusterTimeZoneStatusEvent ( startStructure(tag) put(ContextSpecificTag(TAG_OFFSET), offset) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -52,15 +47,16 @@ class TimeSynchronizationClusterTimeZoneStatusEvent ( private const val TAG_OFFSET = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt index 1787e26580dba6..8c2e410ab80f6d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -20,20 +20,18 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterTestEventEvent ( - val arg1: Int, - val arg2: Int, - val arg3: Boolean, - val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, - val arg5: List, - val arg6: List) { - override fun toString(): String = buildString { +class UnitTestingClusterTestEventEvent( + val arg1: Int, + val arg2: Int, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List +) { + override fun toString(): String = buildString { append("UnitTestingClusterTestEventEvent {\n") append("\targ1 : $arg1\n") append("\targ2 : $arg2\n") @@ -73,27 +71,38 @@ class UnitTestingClusterTestEventEvent ( private const val TAG_ARG5 = 5 private const val TAG_ARG6 = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { tlvReader.enterStructure(tag) val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) - val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_ARG4), tlvReader) - val arg5 = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val arg6 = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val arg4 = + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_ARG4), + tlvReader + ) + val arg5 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + val arg6 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt index 1995cf80a3b1fc..d746c65d5ea1f1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterTestFabricScopedEventEvent ( - val fabricIndex: Int) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScopedEventEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -45,10 +40,10 @@ class UnitTestingClusterTestFabricScopedEventEvent ( companion object { private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScopedEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt index 5db782d0005a54..087484ef1bfa7b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( - val associationFailure: Int, - val status: Int) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( + val associationFailure: Int, + val status: Int +) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") append("\tassociationFailure : $associationFailure\n") append("\tstatus : $status\n") @@ -49,11 +46,14 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( private const val TAG_ASSOCIATION_FAILURE = 0 private const val TAG_STATUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tag) val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt index 762339bde4f556..3599597c99b152 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( - val connectionStatus: Int) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -45,10 +40,13 @@ class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt index 2a702882f2557a..6d54ae4f2bfdcd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( - val reasonCode: Int) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") @@ -45,10 +40,10 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterDisconnectionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { tlvReader.enterStructure(tag) val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt index a526275e085718..6daac4451c1833 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -20,19 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlEntryStruct ( - val privilege: Int, - val authMode: Int, - val subjects: List?, - val targets: List?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlEntryStruct( + val privilege: Int, + val authMode: Int, + val subjects: List?, + val targets: List?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryStruct {\n") append("\tprivilege : $privilege\n") append("\tauthMode : $authMode\n") @@ -48,23 +46,23 @@ class AccessControlClusterAccessControlEntryStruct ( put(ContextSpecificTag(TAG_PRIVILEGE), privilege) put(ContextSpecificTag(TAG_AUTH_MODE), authMode) if (subjects != null) { - startList(ContextSpecificTag(TAG_SUBJECTS)) - for (item in subjects.iterator()) { - put(AnonymousTag, item) + startList(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) } - endList() - } else { - putNull(ContextSpecificTag(TAG_SUBJECTS)) - } if (targets != null) { - startList(ContextSpecificTag(TAG_TARGETS)) - for (item in targets.iterator()) { - item.toTlv(AnonymousTag, this) + startList(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) } - endList() - } else { - putNull(ContextSpecificTag(TAG_TARGETS)) - } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -77,39 +75,47 @@ class AccessControlClusterAccessControlEntryStruct ( private const val TAG_TARGETS = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { tlvReader.enterStructure(tag) val privilege = tlvReader.getInt(ContextSpecificTag(TAG_PRIVILEGE)) val authMode = tlvReader.getInt(ContextSpecificTag(TAG_AUTH_MODE)) - val subjects = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) - null - } - val targets = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) - while(!tlvReader.isEndOfContainer()) { - add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) - null - } + val subjects = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryStruct(privilege, authMode, subjects, targets, fabricIndex) + return AccessControlClusterAccessControlEntryStruct( + privilege, + authMode, + subjects, + targets, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt index 9b832daa283b9f..4a1d95221d816c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlExtensionStruct ( - val data: ByteArray, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") append("\tfabricIndex : $fabricIndex\n") @@ -49,11 +43,11 @@ class AccessControlClusterAccessControlExtensionStruct ( private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { tlvReader.enterStructure(tag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt index 8070aecfe241b5..e721aa3fefe91d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlTargetStruct ( - val cluster: Long?, - val endpoint: Int?, - val deviceType: Long?) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlTargetStruct( + val cluster: Long?, + val endpoint: Int?, + val deviceType: Long? +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") append("\tcluster : $cluster\n") append("\tendpoint : $endpoint\n") @@ -42,20 +39,20 @@ class AccessControlClusterAccessControlTargetStruct ( tlvWriter.apply { startStructure(tag) if (cluster != null) { - put(ContextSpecificTag(TAG_CLUSTER), cluster) - } else { - putNull(ContextSpecificTag(TAG_CLUSTER)) - } + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } if (endpoint != null) { - put(ContextSpecificTag(TAG_ENDPOINT), endpoint) - } else { - putNull(ContextSpecificTag(TAG_ENDPOINT)) - } + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } if (deviceType != null) { - put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) - } else { - putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - } + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } endStructure() } } @@ -65,27 +62,30 @@ class AccessControlClusterAccessControlTargetStruct ( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { tlvReader.enterStructure(tag) - val cluster = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) - null - } - val endpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) - null - } - val deviceType = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - null - } - + val cluster = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + tlvReader.exitContainer() return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt index 9dc8c67a270df1..2ed7a3f08152be 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -17,23 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterActionStruct ( - val actionID: Int, - val name: String, - val type: Int, - val endpointListID: Int, - val supportedCommands: Int, - val state: Int) { - override fun toString(): String = buildString { +class ActionsClusterActionStruct( + val actionID: Int, + val name: String, + val type: Int, + val endpointListID: Int, + val supportedCommands: Int, + val state: Int +) { + override fun toString(): String = buildString { append("ActionsClusterActionStruct {\n") append("\tactionID : $actionID\n") append("\tname : $name\n") @@ -65,7 +62,7 @@ class ActionsClusterActionStruct ( private const val TAG_SUPPORTED_COMMANDS = 4 private const val TAG_STATE = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) @@ -73,10 +70,17 @@ class ActionsClusterActionStruct ( val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val supportedCommands = tlvReader.getInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) val state = tlvReader.getInt(ContextSpecificTag(TAG_STATE)) - + tlvReader.exitContainer() - return ActionsClusterActionStruct(actionID, name, type, endpointListID, supportedCommands, state) + return ActionsClusterActionStruct( + actionID, + name, + type, + endpointListID, + supportedCommands, + state + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt index 5d46b079c5e9bf..b714e693156957 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -20,18 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterEndpointListStruct ( - val endpointListID: Int, - val name: String, - val type: Int, - val endpoints: List) { - override fun toString(): String = buildString { +class ActionsClusterEndpointListStruct( + val endpointListID: Int, + val name: String, + val type: Int, + val endpoints: List +) { + override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") append("\tendpointListID : $endpointListID\n") append("\tname : $name\n") @@ -61,19 +59,20 @@ class ActionsClusterEndpointListStruct ( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterEndpointListStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { tlvReader.enterStructure(tag) val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - val endpoints = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt index f4f298dadf0fcc..68a44d37dfff0f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( - val productIdentifierType: Int, - val productIdentifierValue: String) { - override fun toString(): String = buildString { +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -49,14 +46,21 @@ class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt index aa1effe8df43cd..21649a8ecc73df 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ApplicationBasicClusterApplicationStruct ( - val catalogVendorID: Int, - val applicationID: String) { - override fun toString(): String = buildString { +class ApplicationBasicClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { append("ApplicationBasicClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -49,11 +46,11 @@ class ApplicationBasicClusterApplicationStruct ( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationBasicClusterApplicationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt index cf701fb6c1a094..f710204737cb52 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ApplicationLauncherClusterApplicationEPStruct ( - val application: ApplicationLauncherClusterApplicationStruct, - val endpoint: Optional) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationEPStruct( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional +) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationEPStruct {\n") append("\tapplication : $application\n") append("\tendpoint : $endpoint\n") @@ -41,9 +39,9 @@ class ApplicationLauncherClusterApplicationEPStruct ( startStructure(tag) application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } endStructure() } } @@ -52,15 +50,20 @@ class ApplicationLauncherClusterApplicationEPStruct ( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationEPStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { tlvReader.enterStructure(tag) - val application = ApplicationLauncherClusterApplicationStruct.fromTlv(ContextSpecificTag(TAG_APPLICATION), tlvReader) - val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - + val application = + ApplicationLauncherClusterApplicationStruct.fromTlv( + ContextSpecificTag(TAG_APPLICATION), + tlvReader + ) + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt index b9b7f772372d19..68e78e31084c04 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ApplicationLauncherClusterApplicationStruct ( - val catalogVendorID: Int, - val applicationID: String) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -49,11 +46,11 @@ class ApplicationLauncherClusterApplicationStruct ( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt index 028781fa7acfb5..aef8596f19a83c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -17,20 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AudioOutputClusterOutputInfoStruct ( - val index: Int, - val outputType: Int, - val name: String) { - override fun toString(): String = buildString { +class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { + override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") append("\toutputType : $outputType\n") @@ -53,12 +46,12 @@ class AudioOutputClusterOutputInfoStruct ( private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AudioOutputClusterOutputInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { tlvReader.enterStructure(tag) val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) val outputType = tlvReader.getInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return AudioOutputClusterOutputInfoStruct(index, outputType, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt index 8a58e9a242ed40..e4f323b6321541 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterCapabilityMinimaStruct ( - val caseSessionsPerFabric: Int, - val subscriptionsPerFabric: Int) { - override fun toString(): String = buildString { +class BasicInformationClusterCapabilityMinimaStruct( + val caseSessionsPerFabric: Int, + val subscriptionsPerFabric: Int +) { + override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") @@ -49,14 +46,18 @@ class BasicInformationClusterCapabilityMinimaStruct ( private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterCapabilityMinimaStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { tlvReader.enterStructure(tag) val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) - val subscriptionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) - + val subscriptionsPerFabric = + tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + tlvReader.exitContainer() - return BasicInformationClusterCapabilityMinimaStruct(caseSessionsPerFabric, subscriptionsPerFabric) + return BasicInformationClusterCapabilityMinimaStruct( + caseSessionsPerFabric, + subscriptionsPerFabric + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt index e01685c44e3566..3678494c7b90fb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterProductAppearanceStruct ( - val finish: Int, - val primaryColor: Int?) { - override fun toString(): String = buildString { +class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { + override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -41,10 +35,10 @@ class BasicInformationClusterProductAppearanceStruct ( startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -53,16 +47,17 @@ class BasicInformationClusterProductAppearanceStruct ( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterProductAppearanceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 861ebbd1875f58..8ab0146b8e95f3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class BindingClusterTargetStruct ( - val node: Optional, - val group: Optional, - val endpoint: Optional, - val cluster: Optional, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class BindingClusterTargetStruct( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") append("\tnode : $node\n") append("\tgroup : $group\n") @@ -46,21 +44,21 @@ class BindingClusterTargetStruct ( tlvWriter.apply { startStructure(tag) if (node.isPresent) { - val optnode = node.get() - put(ContextSpecificTag(TAG_NODE), optnode) - } + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } if (group.isPresent) { - val optgroup = group.get() - put(ContextSpecificTag(TAG_GROUP), optgroup) - } + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } if (cluster.isPresent) { - val optcluster = cluster.get() - put(ContextSpecificTag(TAG_CLUSTER), optcluster) - } + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,30 +71,34 @@ class BindingClusterTargetStruct ( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BindingClusterTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { tlvReader.enterStructure(tag) - val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) - } else { - Optional.empty() - } - val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) - } else { - Optional.empty() - } + val node = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt index 778935a86e9455..d1426bc0828631 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( - val finish: Int, - val primaryColor: Int?) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterProductAppearanceStruct( + val finish: Int, + val primaryColor: Int? +) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -41,10 +38,10 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -53,16 +50,20 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterProductAppearanceStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt index acfddff56c75cb..9d10bf6f24e5fa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ChannelClusterChannelInfoStruct ( - val majorNumber: Int, - val minorNumber: Int, - val name: Optional, - val callSign: Optional, - val affiliateCallSign: Optional) { - override fun toString(): String = buildString { +class ChannelClusterChannelInfoStruct( + val majorNumber: Int, + val minorNumber: Int, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional +) { + override fun toString(): String = buildString { append("ChannelClusterChannelInfoStruct {\n") append("\tmajorNumber : $majorNumber\n") append("\tminorNumber : $minorNumber\n") @@ -48,17 +46,17 @@ class ChannelClusterChannelInfoStruct ( put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (callSign.isPresent) { - val optcallSign = callSign.get() - put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) - } + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } if (affiliateCallSign.isPresent) { - val optaffiliateCallSign = affiliateCallSign.get() - put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) - } + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } endStructure() } } @@ -70,29 +68,38 @@ class ChannelClusterChannelInfoStruct ( private const val TAG_CALL_SIGN = 3 private const val TAG_AFFILIATE_CALL_SIGN = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterChannelInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { tlvReader.enterStructure(tag) val majorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) val minorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MINOR_NUMBER)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val callSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) - } else { - Optional.empty() - } - val affiliateCallSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ChannelClusterChannelInfoStruct(majorNumber, minorNumber, name, callSign, affiliateCallSign) + return ChannelClusterChannelInfoStruct( + majorNumber, + minorNumber, + name, + callSign, + affiliateCallSign + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt index 0010ae68479954..edc8f9157db120 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -17,21 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ChannelClusterLineupInfoStruct ( - val operatorName: String, - val lineupName: Optional, - val postalCode: Optional, - val lineupInfoType: Int) { - override fun toString(): String = buildString { +class ChannelClusterLineupInfoStruct( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: Int +) { + override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") append("\toperatorName : $operatorName\n") append("\tlineupName : $lineupName\n") @@ -45,13 +43,13 @@ class ChannelClusterLineupInfoStruct ( startStructure(tag) put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) if (lineupName.isPresent) { - val optlineupName = lineupName.get() - put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) - } + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } if (postalCode.isPresent) { - val optpostalCode = postalCode.get() - put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) - } + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) endStructure() } @@ -63,21 +61,23 @@ class ChannelClusterLineupInfoStruct ( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterLineupInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { tlvReader.enterStructure(tag) val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) - val lineupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) - } else { - Optional.empty() - } - val postalCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) - } else { - Optional.empty() - } + val lineupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) - + tlvReader.exitContainer() return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt index 0e54edff044225..0e1ebee9f97df2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ContentLauncherClusterAdditionalInfoStruct ( - val name: String, - val value: String) { - override fun toString(): String = buildString { +class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { + override fun toString(): String = buildString { append("ContentLauncherClusterAdditionalInfoStruct {\n") append("\tname : $name\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class ContentLauncherClusterAdditionalInfoStruct ( private const val TAG_NAME = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterAdditionalInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ContentLauncherClusterAdditionalInfoStruct(name, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 993719fc427de5..5f4719e9c00ef8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -17,23 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ContentLauncherClusterBrandingInformationStruct ( - val providerName: String, - val background: Optional, - val logo: Optional, - val progressBar: Optional, - val splash: Optional, - val waterMark: Optional) { - override fun toString(): String = buildString { +class ContentLauncherClusterBrandingInformationStruct( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional +) { + override fun toString(): String = buildString { append("ContentLauncherClusterBrandingInformationStruct {\n") append("\tproviderName : $providerName\n") append("\tbackground : $background\n") @@ -49,25 +47,25 @@ class ContentLauncherClusterBrandingInformationStruct ( startStructure(tag) put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) if (background.isPresent) { - val optbackground = background.get() - optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) - } + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } if (logo.isPresent) { - val optlogo = logo.get() - optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) - } + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } if (progressBar.isPresent) { - val optprogressBar = progressBar.get() - optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) - } + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } if (splash.isPresent) { - val optsplash = splash.get() - optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) - } + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } if (waterMark.isPresent) { - val optwaterMark = waterMark.get() - optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) - } + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } endStructure() } } @@ -80,38 +78,75 @@ class ContentLauncherClusterBrandingInformationStruct ( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterBrandingInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { tlvReader.enterStructure(tag) val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) - val background = if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_BACKGROUND), tlvReader)) - } else { - Optional.empty() - } - val logo = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_LOGO), tlvReader)) - } else { - Optional.empty() - } - val progressBar = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_PROGRESS_BAR), tlvReader)) - } else { - Optional.empty() - } - val splash = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_SPLASH), tlvReader)) - } else { - Optional.empty() - } - val waterMark = if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_WATER_MARK), tlvReader)) - } else { - Optional.empty() - } - + val background = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_BACKGROUND), + tlvReader + ) + ) + } else { + Optional.empty() + } + val logo = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_LOGO), + tlvReader + ) + ) + } else { + Optional.empty() + } + val progressBar = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_PROGRESS_BAR), + tlvReader + ) + ) + } else { + Optional.empty() + } + val splash = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_SPLASH), + tlvReader + ) + ) + } else { + Optional.empty() + } + val waterMark = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_WATER_MARK), + tlvReader + ) + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ContentLauncherClusterBrandingInformationStruct(providerName, background, logo, progressBar, splash, waterMark) + return ContentLauncherClusterBrandingInformationStruct( + providerName, + background, + logo, + progressBar, + splash, + waterMark + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt index b3b713ba8e8079..9457b03907a4fb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -20,15 +20,13 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ContentLauncherClusterContentSearchStruct ( - val parameterList: List) { - override fun toString(): String = buildString { +class ContentLauncherClusterContentSearchStruct( + val parameterList: List +) { + override fun toString(): String = buildString { append("ContentLauncherClusterContentSearchStruct {\n") append("\tparameterList : $parameterList\n") append("}\n") @@ -49,16 +47,17 @@ class ContentLauncherClusterContentSearchStruct ( companion object { private const val TAG_PARAMETER_LIST = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterContentSearchStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { tlvReader.enterStructure(tag) - val parameterList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val parameterList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ContentLauncherClusterContentSearchStruct(parameterList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index 2bf3ed85bae436..a38245918bb476 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ContentLauncherClusterDimensionStruct ( - val width: Double, - val height: Double, - val metric: Int) { - override fun toString(): String = buildString { +class ContentLauncherClusterDimensionStruct( + val width: Double, + val height: Double, + val metric: Int +) { + override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") append("\twidth : $width\n") append("\theight : $height\n") @@ -53,12 +50,12 @@ class ContentLauncherClusterDimensionStruct ( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterDimensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { tlvReader.enterStructure(tag) val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) val metric = tlvReader.getInt(ContextSpecificTag(TAG_METRIC)) - + tlvReader.exitContainer() return ContentLauncherClusterDimensionStruct(width, height, metric) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt index 19f4e650b0615b..caf0f99848c93c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -20,17 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ContentLauncherClusterParameterStruct ( - val type: Int, - val value: String, - val externalIDList: Optional>) { - override fun toString(): String = buildString { +class ContentLauncherClusterParameterStruct( + val type: Int, + val value: String, + val externalIDList: Optional> +) { + override fun toString(): String = buildString { append("ContentLauncherClusterParameterStruct {\n") append("\ttype : $type\n") append("\tvalue : $value\n") @@ -44,13 +43,13 @@ class ContentLauncherClusterParameterStruct ( put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) + val optexternalIDList = externalIDList.get() + startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() } - endList() - } endStructure() } } @@ -60,22 +59,25 @@ class ContentLauncherClusterParameterStruct ( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterParameterStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { tlvReader.enterStructure(tag) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - + val externalIDList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterParameterStruct(type, value, externalIDList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt index b9f2044614dd71..d5e686bbb5ac45 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ContentLauncherClusterStyleInformationStruct ( - val imageURL: Optional, - val color: Optional, - val size: Optional) { - override fun toString(): String = buildString { +class ContentLauncherClusterStyleInformationStruct( + val imageURL: Optional, + val color: Optional, + val size: Optional +) { + override fun toString(): String = buildString { append("ContentLauncherClusterStyleInformationStruct {\n") append("\timageURL : $imageURL\n") append("\tcolor : $color\n") @@ -42,17 +40,17 @@ class ContentLauncherClusterStyleInformationStruct ( tlvWriter.apply { startStructure(tag) if (imageURL.isPresent) { - val optimageURL = imageURL.get() - put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) - } + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } if (color.isPresent) { - val optcolor = color.get() - put(ContextSpecificTag(TAG_COLOR), optcolor) - } + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } if (size.isPresent) { - val optsize = size.get() - optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) - } + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } endStructure() } } @@ -62,24 +60,29 @@ class ContentLauncherClusterStyleInformationStruct ( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterStyleInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { tlvReader.enterStructure(tag) - val imageURL = if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) - } else { - Optional.empty() - } - val color = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) - } else { - Optional.empty() - } - val size = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { - Optional.of(ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader)) - } else { - Optional.empty() - } - + val imageURL = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of( + ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt index d76de77105ded9..75fed36957e726 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DescriptorClusterDeviceTypeStruct ( - val deviceType: Long, - val revision: Int) { - override fun toString(): String = buildString { +class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { + override fun toString(): String = buildString { append("DescriptorClusterDeviceTypeStruct {\n") append("\tdeviceType : $deviceType\n") append("\trevision : $revision\n") @@ -49,11 +43,11 @@ class DescriptorClusterDeviceTypeStruct ( private const val TAG_DEVICE_TYPE = 0 private const val TAG_REVISION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterDeviceTypeStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { tlvReader.enterStructure(tag) val deviceType = tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) val revision = tlvReader.getInt(ContextSpecificTag(TAG_REVISION)) - + tlvReader.exitContainer() return DescriptorClusterDeviceTypeStruct(deviceType, revision) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt index 8c5fc527b8a5e5..abde881ccffcea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -17,21 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class DescriptorClusterSemanticTagStruct ( - val mfgCode: Int?, - val namespaceID: Int, - val tag: Int, - val label: Optional?) { - override fun toString(): String = buildString { +class DescriptorClusterSemanticTagStruct( + val mfgCode: Int?, + val namespaceID: Int, + val tag: Int, + val label: Optional? +) { + override fun toString(): String = buildString { append("DescriptorClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tnamespaceID : $namespaceID\n") @@ -44,20 +42,20 @@ class DescriptorClusterSemanticTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode != null) { - put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) - } else { - putNull(ContextSpecificTag(TAG_MFG_CODE)) - } + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) put(ContextSpecificTag(TAG_TAG), tag) if (label != null) { - if (label.isPresent) { - val optlabel = label.get() - put(ContextSpecificTag(TAG_LABEL), optlabel) - } - } else { - putNull(ContextSpecificTag(TAG_LABEL)) - } + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } endStructure() } } @@ -68,27 +66,29 @@ class DescriptorClusterSemanticTagStruct ( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) - null - } + val mfgCode = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } val namespaceID = tlvReader.getInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) val tag = tlvReader.getInt(ContextSpecificTag(TAG_TAG)) - val label = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) - null - } - + val label = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + tlvReader.exitContainer() return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt index d7004fbfc53590..423d6a554672ce 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DishwasherModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class DishwasherModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 110964c9ed2cf6..33881f4ac00c8d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class DishwasherModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class DishwasherModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class DishwasherModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DishwasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt index de3654516fc946..da3a551267eb09 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterCredentialStruct ( - val credentialType: Int, - val credentialIndex: Int) { - override fun toString(): String = buildString { +class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { + override fun toString(): String = buildString { append("DoorLockClusterCredentialStruct {\n") append("\tcredentialType : $credentialType\n") append("\tcredentialIndex : $credentialIndex\n") @@ -49,11 +43,11 @@ class DoorLockClusterCredentialStruct ( private const val TAG_CREDENTIAL_TYPE = 0 private const val TAG_CREDENTIAL_INDEX = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterCredentialStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { tlvReader.enterStructure(tag) val credentialType = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) val credentialIndex = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) - + tlvReader.exitContainer() return DoorLockClusterCredentialStruct(credentialType, credentialIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt index 16567ccab1ce30..09292f726d9467 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class FixedLabelClusterLabelStruct ( - val label: String, - val value: String) { - override fun toString(): String = buildString { +class FixedLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { append("FixedLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class FixedLabelClusterLabelStruct ( private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : FixedLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return FixedLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt index 2153c5ea32fc7d..60d10b41112a9d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralCommissioningClusterBasicCommissioningInfo ( - val failSafeExpiryLengthSeconds: Int, - val maxCumulativeFailsafeSeconds: Int) { - override fun toString(): String = buildString { +class GeneralCommissioningClusterBasicCommissioningInfo( + val failSafeExpiryLengthSeconds: Int, + val maxCumulativeFailsafeSeconds: Int +) { + override fun toString(): String = buildString { append("GeneralCommissioningClusterBasicCommissioningInfo {\n") append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") @@ -49,14 +46,19 @@ class GeneralCommissioningClusterBasicCommissioningInfo ( private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralCommissioningClusterBasicCommissioningInfo { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { tlvReader.enterStructure(tag) - val failSafeExpiryLengthSeconds = tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) - val maxCumulativeFailsafeSeconds = tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) - + val failSafeExpiryLengthSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + tlvReader.exitContainer() - return GeneralCommissioningClusterBasicCommissioningInfo(failSafeExpiryLengthSeconds, maxCumulativeFailsafeSeconds) + return GeneralCommissioningClusterBasicCommissioningInfo( + failSafeExpiryLengthSeconds, + maxCumulativeFailsafeSeconds + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt index 2813b085912e48..d4ff313520e65e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -20,22 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterNetworkInterface ( - val name: String, - val isOperational: Boolean, - val offPremiseServicesReachableIPv4: Boolean?, - val offPremiseServicesReachableIPv6: Boolean?, - val hardwareAddress: ByteArray, - val IPv4Addresses: List, - val IPv6Addresses: List, - val type: Int) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterNetworkInterface( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: Int +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkInterface {\n") append("\tname : $name\n") append("\tisOperational : $isOperational\n") @@ -54,15 +52,21 @@ class GeneralDiagnosticsClusterNetworkInterface ( put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) if (offPremiseServicesReachableIPv4 != null) { - put(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), offPremiseServicesReachableIPv4) - } else { - putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), + offPremiseServicesReachableIPv4 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } if (offPremiseServicesReachableIPv6 != null) { - put(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), offPremiseServicesReachableIPv6) - } else { - putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), + offPremiseServicesReachableIPv6 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) startList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) for (item in IPv4Addresses.iterator()) { @@ -89,42 +93,55 @@ class GeneralDiagnosticsClusterNetworkInterface ( private const val TAG_I_PV6_ADDRESSES = 6 private const val TAG_TYPE = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkInterface { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) - val offPremiseServicesReachableIPv4 = if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - null - } - val offPremiseServicesReachableIPv6 = if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - null - } + val offPremiseServicesReachableIPv4 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) - val IPv4Addresses = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val IPv6Addresses = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } + val IPv4Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - + tlvReader.exitContainer() - return GeneralDiagnosticsClusterNetworkInterface(name, isOperational, offPremiseServicesReachableIPv4, offPremiseServicesReachableIPv6, hardwareAddress, IPv4Addresses, IPv6Addresses, type) + return GeneralDiagnosticsClusterNetworkInterface( + name, + isOperational, + offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, + hardwareAddress, + IPv4Addresses, + IPv6Addresses, + type + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt index c6ecaa9eb20014..6038b55d345b75 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -20,18 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class GroupKeyManagementClusterGroupInfoMapStruct ( - val groupId: Int, - val endpoints: List, - val groupName: Optional, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupInfoMapStruct( + val groupId: Int, + val endpoints: List, + val groupName: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") append("\tgroupId : $groupId\n") append("\tendpoints : $endpoints\n") @@ -50,9 +49,9 @@ class GroupKeyManagementClusterGroupInfoMapStruct ( } endList() if (groupName.isPresent) { - val optgroupName = groupName.get() - put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) - } + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -64,23 +63,25 @@ class GroupKeyManagementClusterGroupInfoMapStruct ( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupInfoMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) - val endpoints = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val groupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) - } else { - Optional.empty() - } + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt index 8e692ad743b3c1..d565d70233abc2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GroupKeyManagementClusterGroupKeyMapStruct ( - val groupId: Int, - val groupKeySetID: Int, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupKeyMapStruct( + val groupId: Int, + val groupKeySetID: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") append("\tgroupId : $groupId\n") append("\tgroupKeySetID : $groupKeySetID\n") @@ -53,12 +50,12 @@ class GroupKeyManagementClusterGroupKeyMapStruct ( private const val TAG_GROUP_KEY_SET_I_D = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeyMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt index 0af577bdf3cdce..418b6037ae46c9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -17,25 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GroupKeyManagementClusterGroupKeySetStruct ( - val groupKeySetID: Int, - val groupKeySecurityPolicy: Int, - val epochKey0: ByteArray?, - val epochStartTime0: Long?, - val epochKey1: ByteArray?, - val epochStartTime1: Long?, - val epochKey2: ByteArray?, - val epochStartTime2: Long?) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupKeySetStruct( + val groupKeySetID: Int, + val groupKeySecurityPolicy: Int, + val epochKey0: ByteArray?, + val epochStartTime0: Long?, + val epochKey1: ByteArray?, + val epochStartTime1: Long?, + val epochKey2: ByteArray?, + val epochStartTime2: Long? +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeySetStruct {\n") append("\tgroupKeySetID : $groupKeySetID\n") append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") @@ -54,35 +51,35 @@ class GroupKeyManagementClusterGroupKeySetStruct ( put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) if (epochKey0 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + } if (epochStartTime0 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } if (epochKey1 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + } if (epochStartTime1 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } if (epochKey2 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + } if (epochStartTime2 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } endStructure() } } @@ -97,50 +94,66 @@ class GroupKeyManagementClusterGroupKeySetStruct ( private const val TAG_EPOCH_KEY2 = 6 private const val TAG_EPOCH_START_TIME2 = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeySetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { tlvReader.enterStructure(tag) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val groupKeySecurityPolicy = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) - val epochKey0 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - null - } - val epochStartTime0 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - null - } - val epochKey1 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - null - } - val epochStartTime1 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - null - } - val epochKey2 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - null - } - val epochStartTime2 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - null - } - + val groupKeySecurityPolicy = + tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + tlvReader.exitContainer() - return GroupKeyManagementClusterGroupKeySetStruct(groupKeySetID, groupKeySecurityPolicy, epochKey0, epochStartTime0, epochKey1, epochStartTime1, epochKey2, epochStartTime2) + return GroupKeyManagementClusterGroupKeySetStruct( + groupKeySetID, + groupKeySecurityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2 + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt index 9ecba7669d8e6f..a86ba8db2dee0a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class HepaFilterMonitoringClusterReplacementProductStruct ( - val productIdentifierType: Int, - val productIdentifierValue: String) { - override fun toString(): String = buildString { +class HepaFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { append("HepaFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -49,14 +46,21 @@ class HepaFilterMonitoringClusterReplacementProductStruct ( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : HepaFilterMonitoringClusterReplacementProductStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): HepaFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return HepaFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) + return HepaFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt index ebef1ce2ce74a7..d380689bed016f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class IcdManagementClusterMonitoringRegistrationStruct ( - val checkInNodeID: Long, - val monitoredSubject: Long, - val key: ByteArray, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class IcdManagementClusterMonitoringRegistrationStruct( + val checkInNodeID: Long, + val monitoredSubject: Long, + val key: ByteArray, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") append("\tcheckInNodeID : $checkInNodeID\n") append("\tmonitoredSubject : $monitoredSubject\n") @@ -57,16 +54,21 @@ class IcdManagementClusterMonitoringRegistrationStruct ( private const val TAG_KEY = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : IcdManagementClusterMonitoringRegistrationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): IcdManagementClusterMonitoringRegistrationStruct { tlvReader.enterStructure(tag) val checkInNodeID = tlvReader.getLong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) val monitoredSubject = tlvReader.getLong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return IcdManagementClusterMonitoringRegistrationStruct(checkInNodeID, monitoredSubject, key, fabricIndex) + return IcdManagementClusterMonitoringRegistrationStruct( + checkInNodeID, + monitoredSubject, + key, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt index 91f733b2bf8edd..eeab9e95eb7cce 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class LaundryWasherModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class LaundryWasherModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index 06685de8506c7d..eed09912c26a9c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class LaundryWasherModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class LaundryWasherModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class LaundryWasherModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return LaundryWasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt index 7be50d0dbc9ad3..514c05d19f6fdf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class MediaInputClusterInputInfoStruct ( - val index: Int, - val inputType: Int, - val name: String, - val description: String) { - override fun toString(): String = buildString { +class MediaInputClusterInputInfoStruct( + val index: Int, + val inputType: Int, + val name: String, + val description: String +) { + override fun toString(): String = buildString { append("MediaInputClusterInputInfoStruct {\n") append("\tindex : $index\n") append("\tinputType : $inputType\n") @@ -57,13 +54,13 @@ class MediaInputClusterInputInfoStruct ( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaInputClusterInputInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { tlvReader.enterStructure(tag) val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) val inputType = tlvReader.getInt(ContextSpecificTag(TAG_INPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) - + tlvReader.exitContainer() return MediaInputClusterInputInfoStruct(index, inputType, name, description) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt index 6b6e8cfcf12403..d452d083a73112 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class MediaPlaybackClusterPlaybackPositionStruct ( - val updatedAt: Long, - val position: Long?) { - override fun toString(): String = buildString { +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") append("\tposition : $position\n") @@ -41,10 +35,10 @@ class MediaPlaybackClusterPlaybackPositionStruct ( startStructure(tag) put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) if (position != null) { - put(ContextSpecificTag(TAG_POSITION), position) - } else { - putNull(ContextSpecificTag(TAG_POSITION)) - } + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } endStructure() } } @@ -53,16 +47,17 @@ class MediaPlaybackClusterPlaybackPositionStruct ( private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterPlaybackPositionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { tlvReader.enterStructure(tag) val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) - val position = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) - null - } - + val position = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt index eacbd43215cc6c..ac95817519112f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ModeSelectClusterModeOptionStruct ( - val label: String, - val mode: Int, - val semanticTags: List) { - override fun toString(): String = buildString { +class ModeSelectClusterModeOptionStruct( + val label: String, + val mode: Int, + val semanticTags: List +) { + override fun toString(): String = buildString { append("ModeSelectClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class ModeSelectClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val semanticTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val semanticTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index 6e00f596b61ebf..04c893671659d3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ModeSelectClusterSemanticTagStruct ( - val mfgCode: Int, - val value: Int) { - override fun toString(): String = buildString { +class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { + override fun toString(): String = buildString { append("ModeSelectClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class ModeSelectClusterSemanticTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { tlvReader.enterStructure(tag) val mfgCode = tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ModeSelectClusterSemanticTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index 9cf40b7e7ce7a3..8b942f2a492dd1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class NetworkCommissioningClusterNetworkInfoStruct ( - val networkID: ByteArray, - val connected: Boolean) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterNetworkInfoStruct( + val networkID: ByteArray, + val connected: Boolean +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") @@ -49,11 +46,11 @@ class NetworkCommissioningClusterNetworkInfoStruct ( private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterNetworkInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) - + tlvReader.exitContainer() return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt index e8cc5c1941d7d8..76593b32131477 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -17,25 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( - val panId: Int, - val extendedPanId: Long, - val networkName: String, - val channel: Int, - val version: Int, - val extendedAddress: ByteArray, - val rssi: Int, - val lqi: Int) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterThreadInterfaceScanResultStruct( + val panId: Int, + val extendedPanId: Long, + val networkName: String, + val channel: Int, + val version: Int, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: Int +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") append("\tpanId : $panId\n") append("\textendedPanId : $extendedPanId\n") @@ -73,7 +70,10 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( private const val TAG_RSSI = 6 private const val TAG_LQI = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterThreadInterfaceScanResultStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { tlvReader.enterStructure(tag) val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) @@ -83,10 +83,19 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterThreadInterfaceScanResultStruct(panId, extendedPanId, networkName, channel, version, extendedAddress, rssi, lqi) + return NetworkCommissioningClusterThreadInterfaceScanResultStruct( + panId, + extendedPanId, + networkName, + channel, + version, + extendedAddress, + rssi, + lqi + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt index efcd50f0c17fba..d2cf4bcf5b7cb0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -17,23 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( - val security: Int, - val ssid: ByteArray, - val bssid: ByteArray, - val channel: Int, - val wiFiBand: Int, - val rssi: Int) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + val security: Int, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: Int, + val wiFiBand: Int, + val rssi: Int +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") append("\tsecurity : $security\n") append("\tssid : $ssid\n") @@ -65,7 +62,10 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( private const val TAG_WI_FI_BAND = 4 private const val TAG_RSSI = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { tlvReader.enterStructure(tag) val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) @@ -73,10 +73,17 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterWiFiInterfaceScanResultStruct(security, ssid, bssid, channel, wiFiBand, rssi) + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + security, + ssid, + bssid, + channel, + wiFiBand, + rssi + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt index 620c17f8cd0863..8264e9fa5ee545 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -17,23 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OperationalCredentialsClusterFabricDescriptorStruct ( - val rootPublicKey: ByteArray, - val vendorID: Int, - val fabricID: Long, - val nodeID: Long, - val label: String, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class OperationalCredentialsClusterFabricDescriptorStruct( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterFabricDescriptorStruct {\n") append("\trootPublicKey : $rootPublicKey\n") append("\tvendorID : $vendorID\n") @@ -65,7 +62,10 @@ class OperationalCredentialsClusterFabricDescriptorStruct ( private const val TAG_LABEL = 5 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterFabricDescriptorStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OperationalCredentialsClusterFabricDescriptorStruct { tlvReader.enterStructure(tag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) @@ -73,10 +73,17 @@ class OperationalCredentialsClusterFabricDescriptorStruct ( val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OperationalCredentialsClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) + return OperationalCredentialsClusterFabricDescriptorStruct( + rootPublicKey, + vendorID, + fabricID, + nodeID, + label, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt index 406bad431f78c9..a05f388d1a5e06 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OperationalCredentialsClusterNOCStruct ( - val noc: ByteArray, - val icac: ByteArray?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class OperationalCredentialsClusterNOCStruct( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") append("\tnoc : $noc\n") append("\ticac : $icac\n") @@ -43,10 +40,10 @@ class OperationalCredentialsClusterNOCStruct ( startStructure(tag) put(ContextSpecificTag(TAG_NOC), noc) if (icac != null) { - put(ContextSpecificTag(TAG_ICAC), icac) - } else { - putNull(ContextSpecificTag(TAG_ICAC)) - } + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -57,17 +54,18 @@ class OperationalCredentialsClusterNOCStruct ( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterNOCStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { tlvReader.enterStructure(tag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) - val icac = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) - null - } + val icac = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt index 68879d32ff0bd1..cdbccac37fe63f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class OperationalStateClusterErrorStateStruct ( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional) { - override fun toString(): String = buildString { +class OperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { append("OperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -43,13 +41,13 @@ class OperationalStateClusterErrorStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -59,23 +57,29 @@ class OperationalStateClusterErrorStateStruct ( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterErrorStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) + return OperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt index f66152a1cfb5f1..1c55ac8f8927c4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class OperationalStateClusterOperationalStateStruct ( - val operationalStateID: Int, - val operationalStateLabel: Optional) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -41,9 +39,9 @@ class OperationalStateClusterOperationalStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -52,18 +50,22 @@ class OperationalStateClusterOperationalStateStruct ( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) + return OperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt index f527505ff87b22..17f95d897b258b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterProviderLocation ( - val providerNodeID: Long, - val endpoint: Int, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterProviderLocation( + val providerNodeID: Long, + val endpoint: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") append("\tproviderNodeID : $providerNodeID\n") append("\tendpoint : $endpoint\n") @@ -53,15 +50,19 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation ( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterProviderLocation { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OtaSoftwareUpdateRequestorClusterProviderLocation { tlvReader.enterStructure(tag) val providerNodeID = tlvReader.getLong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterProviderLocation(providerNodeID, endpoint, fabricIndex) + return OtaSoftwareUpdateRequestorClusterProviderLocation( + providerNodeID, + endpoint, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt index a3e342cf110c49..6172f21498fdb0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatChargeFaultChangeType ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatChargeFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatChargeFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt index 4feef1564786b2..6ef4a63074b8a2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatFaultChangeType ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt index 6c99e0befd7e37..86cdc01f28fd41 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterWiredFaultChangeType ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterWiredFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt index e3f52fc923d0e9..6632b9581bb508 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,21 +55,34 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add( + RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct(label, mode, modeTags) + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + label, + mode, + modeTags + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt index 7b3fc8ad89ac0a..9f806c52fa6fa2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( + val mfgCode: Optional, + val value: Int +) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +38,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +50,19 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt index 986ef2fbfe7fae..e3f33a1b7dcac5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RvcCleanModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class RvcCleanModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index d1b5786dd5004d..bc7eb7ed818b41 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcCleanModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class RvcCleanModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class RvcCleanModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcCleanModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt index 9416a49dd8d2e1..f6b9b8b14456f0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcOperationalStateClusterErrorStateStruct ( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -43,13 +41,13 @@ class RvcOperationalStateClusterErrorStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -59,23 +57,29 @@ class RvcOperationalStateClusterErrorStateStruct ( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterErrorStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) + return RvcOperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt index 0ac8e7e362c07d..66f2796d71439f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcOperationalStateClusterOperationalStateStruct ( - val operationalStateID: Int, - val operationalStateLabel: Optional) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -41,9 +39,9 @@ class RvcOperationalStateClusterOperationalStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -52,18 +50,22 @@ class RvcOperationalStateClusterOperationalStateStruct ( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) + return RvcOperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt index 6c0fa21b62753c..64b272df8e62c2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RvcRunModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class RvcRunModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index 39077679389f9e..3ad4e9aee5ba6d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcRunModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class RvcRunModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class RvcRunModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcRunModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt index 3376a7d1e849f2..213d87b9137cf5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ScenesClusterAttributeValuePair ( - val attributeID: Long, - val attributeValue: Long) { - override fun toString(): String = buildString { +class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { + override fun toString(): String = buildString { append("ScenesClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") @@ -49,11 +43,11 @@ class ScenesClusterAttributeValuePair ( private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterAttributeValuePair { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { tlvReader.enterStructure(tag) val attributeID = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) - + tlvReader.exitContainer() return ScenesClusterAttributeValuePair(attributeID, attributeValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt index dde3ec639661d9..edc04a2084e2fd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ScenesClusterExtensionFieldSet ( - val clusterID: Long, - val attributeValueList: List) { - override fun toString(): String = buildString { +class ScenesClusterExtensionFieldSet( + val clusterID: Long, + val attributeValueList: List +) { + override fun toString(): String = buildString { append("ScenesClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") @@ -53,17 +51,18 @@ class ScenesClusterExtensionFieldSet ( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterExtensionFieldSet { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { tlvReader.enterStructure(tag) val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) - val attributeValueList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val attributeValueList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt index ae6aa79702b58b..5359b9a4b70a2a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class SoftwareDiagnosticsClusterThreadMetricsStruct ( - val id: Long, - val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterThreadMetricsStruct( + val id: Long, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional +) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -47,21 +45,21 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct ( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (stackFreeCurrent.isPresent) { - val optstackFreeCurrent = stackFreeCurrent.get() - put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) - } + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } if (stackFreeMinimum.isPresent) { - val optstackFreeMinimum = stackFreeMinimum.get() - put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) - } + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } if (stackSize.isPresent) { - val optstackSize = stackSize.get() - put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) - } + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } endStructure() } } @@ -73,33 +71,43 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct ( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterThreadMetricsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val stackFreeCurrent = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) - } else { - Optional.empty() - } - val stackFreeMinimum = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) - } else { - Optional.empty() - } - val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return SoftwareDiagnosticsClusterThreadMetricsStruct(id, name, stackFreeCurrent, stackFreeMinimum, stackSize) + return SoftwareDiagnosticsClusterThreadMetricsStruct( + id, + name, + stackFreeCurrent, + stackFreeMinimum, + stackSize + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt index 475ba3c436fac7..403134993beaed 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TargetNavigatorClusterTargetInfoStruct ( - val identifier: Int, - val name: String) { - override fun toString(): String = buildString { +class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { + override fun toString(): String = buildString { append("TargetNavigatorClusterTargetInfoStruct {\n") append("\tidentifier : $identifier\n") append("\tname : $name\n") @@ -49,11 +43,11 @@ class TargetNavigatorClusterTargetInfoStruct ( private const val TAG_IDENTIFIER = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { tlvReader.enterStructure(tag) val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetInfoStruct(identifier, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt index f63d1bcf959e9e..cb432fb1e976b4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThermostatClusterThermostatScheduleTransition ( - val transitionTime: Int, - val heatSetpoint: Int?, - val coolSetpoint: Int?) { - override fun toString(): String = buildString { +class ThermostatClusterThermostatScheduleTransition( + val transitionTime: Int, + val heatSetpoint: Int?, + val coolSetpoint: Int? +) { + override fun toString(): String = buildString { append("ThermostatClusterThermostatScheduleTransition {\n") append("\ttransitionTime : $transitionTime\n") append("\theatSetpoint : $heatSetpoint\n") @@ -43,15 +40,15 @@ class ThermostatClusterThermostatScheduleTransition ( startStructure(tag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (heatSetpoint != null) { - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - } else { - putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } if (coolSetpoint != null) { - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) - } else { - putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - } + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } endStructure() } } @@ -61,25 +58,31 @@ class ThermostatClusterThermostatScheduleTransition ( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThermostatClusterThermostatScheduleTransition { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { tlvReader.enterStructure(tag) val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - null - } - val coolSetpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - null - } - + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + tlvReader.exitContainer() - return ThermostatClusterThermostatScheduleTransition(transitionTime, heatSetpoint, coolSetpoint) + return ThermostatClusterThermostatScheduleTransition( + transitionTime, + heatSetpoint, + coolSetpoint + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt index 5fbc0d517459c1..4a7066df5d7f25 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -17,31 +17,28 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( - val extAddress: Long, - val age: Long, - val rloc16: Int, - val linkFrameCounter: Long, - val mleFrameCounter: Long, - val lqi: Int, - val averageRssi: Int?, - val lastRssi: Int?, - val frameErrorRate: Int, - val messageErrorRate: Int, - val rxOnWhenIdle: Boolean, - val fullThreadDevice: Boolean, - val fullNetworkData: Boolean, - val isChild: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterNeighborTableStruct( + val extAddress: Long, + val age: Long, + val rloc16: Int, + val linkFrameCounter: Long, + val mleFrameCounter: Long, + val lqi: Int, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: Int, + val messageErrorRate: Int, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") append("\textAddress : $extAddress\n") append("\tage : $age\n") @@ -70,15 +67,15 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( put(ContextSpecificTag(TAG_MLE_FRAME_COUNTER), mleFrameCounter) put(ContextSpecificTag(TAG_LQI), lqi) if (averageRssi != null) { - put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) - } else { - putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } + put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } if (lastRssi != null) { - put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) - } else { - putNull(ContextSpecificTag(TAG_LAST_RSSI)) - } + put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) + } else { + putNull(ContextSpecificTag(TAG_LAST_RSSI)) + } put(ContextSpecificTag(TAG_FRAME_ERROR_RATE), frameErrorRate) put(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE), messageErrorRate) put(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE), rxOnWhenIdle) @@ -105,7 +102,10 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( private const val TAG_FULL_NETWORK_DATA = 12 private const val TAG_IS_CHILD = 13 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNeighborTableStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) @@ -113,28 +113,45 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( val linkFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) val mleFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - val averageRssi = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - null - } - val lastRssi = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) - null - } + val averageRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } val frameErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) val messageErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterNeighborTableStruct(extAddress, age, rloc16, linkFrameCounter, mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild) + return ThreadNetworkDiagnosticsClusterNeighborTableStruct( + extAddress, + age, + rloc16, + linkFrameCounter, + mleFrameCounter, + lqi, + averageRssi, + lastRssi, + frameErrorRate, + messageErrorRate, + rxOnWhenIdle, + fullThreadDevice, + fullNetworkData, + isChild + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt index 7276a7f3eccac4..f9764369891073 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -17,29 +17,26 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents ( - val activeTimestampPresent: Boolean, - val pendingTimestampPresent: Boolean, - val masterKeyPresent: Boolean, - val networkNamePresent: Boolean, - val extendedPanIdPresent: Boolean, - val meshLocalPrefixPresent: Boolean, - val delayPresent: Boolean, - val panIdPresent: Boolean, - val channelPresent: Boolean, - val pskcPresent: Boolean, - val securityPolicyPresent: Boolean, - val channelMaskPresent: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + val activeTimestampPresent: Boolean, + val pendingTimestampPresent: Boolean, + val masterKeyPresent: Boolean, + val networkNamePresent: Boolean, + val extendedPanIdPresent: Boolean, + val meshLocalPrefixPresent: Boolean, + val delayPresent: Boolean, + val panIdPresent: Boolean, + val channelPresent: Boolean, + val pskcPresent: Boolean, + val securityPolicyPresent: Boolean, + val channelMaskPresent: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") append("\tactiveTimestampPresent : $activeTimestampPresent\n") append("\tpendingTimestampPresent : $pendingTimestampPresent\n") @@ -89,24 +86,45 @@ class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents ( private const val TAG_SECURITY_POLICY_PRESENT = 10 private const val TAG_CHANNEL_MASK_PRESENT = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { tlvReader.enterStructure(tag) - val activeTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) - val pendingTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val activeTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) - val extendedPanIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) - val meshLocalPrefixPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val extendedPanIdPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) - val securityPolicyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val securityPolicyPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents(activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent) + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + activeTimestampPresent, + pendingTimestampPresent, + masterKeyPresent, + networkNamePresent, + extendedPanIdPresent, + meshLocalPrefixPresent, + delayPresent, + panIdPresent, + channelPresent, + pskcPresent, + securityPolicyPresent, + channelMaskPresent + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt index c204266b42fcf5..8a7c423f84e6ad 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -17,27 +17,24 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterRouteTableStruct ( - val extAddress: Long, - val rloc16: Int, - val routerId: Int, - val nextHop: Int, - val pathCost: Int, - val LQIIn: Int, - val LQIOut: Int, - val age: Int, - val allocated: Boolean, - val linkEstablished: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterRouteTableStruct( + val extAddress: Long, + val rloc16: Int, + val routerId: Int, + val nextHop: Int, + val pathCost: Int, + val LQIIn: Int, + val LQIOut: Int, + val age: Int, + val allocated: Boolean, + val linkEstablished: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") append("\textAddress : $extAddress\n") append("\trloc16 : $rloc16\n") @@ -81,7 +78,7 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct ( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterRouteTableStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterRouteTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) @@ -93,10 +90,21 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct ( val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterRouteTableStruct(extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, LQIOut, age, allocated, linkEstablished) + return ThreadNetworkDiagnosticsClusterRouteTableStruct( + extAddress, + rloc16, + routerId, + nextHop, + pathCost, + LQIIn, + LQIOut, + age, + allocated, + linkEstablished + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt index d12f6e24c345f9..1474db405b9d43 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterSecurityPolicy ( - val rotationTime: Int, - val flags: Int) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") append("\trotationTime : $rotationTime\n") append("\tflags : $flags\n") @@ -49,11 +43,11 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy ( private const val TAG_ROTATION_TIME = 0 private const val TAG_FLAGS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterSecurityPolicy { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { tlvReader.enterStructure(tag) val rotationTime = tlvReader.getInt(ContextSpecificTag(TAG_ROTATION_TIME)) val flags = tlvReader.getInt(ContextSpecificTag(TAG_FLAGS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt index be643cca35be70..d770d7a2ac8e03 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterDSTOffsetStruct ( - val offset: Long, - val validStarting: Long, - val validUntil: Long?) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterDSTOffsetStruct( + val offset: Long, + val validStarting: Long, + val validUntil: Long? +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") append("\toffset : $offset\n") append("\tvalidStarting : $validStarting\n") @@ -44,10 +41,10 @@ class TimeSynchronizationClusterDSTOffsetStruct ( put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) if (validUntil != null) { - put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) - } else { - putNull(ContextSpecificTag(TAG_VALID_UNTIL)) - } + put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) + } else { + putNull(ContextSpecificTag(TAG_VALID_UNTIL)) + } endStructure() } } @@ -57,17 +54,18 @@ class TimeSynchronizationClusterDSTOffsetStruct ( private const val TAG_VALID_STARTING = 1 private const val TAG_VALID_UNTIL = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTOffsetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) - val validUntil = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) - null - } - + val validUntil = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + tlvReader.exitContainer() return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index 8c3acf12fe54e8..7a2e95c671517a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( - val nodeID: Long, - val endpoint: Int) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") append("\tnodeID : $nodeID\n") append("\tendpoint : $endpoint\n") @@ -49,11 +46,14 @@ class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( private const val TAG_NODE_I_D = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt index 11bdbff1851eaf..8a256fd7edfefe 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class TimeSynchronizationClusterTimeZoneStruct ( - val offset: Long, - val validAt: Long, - val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStruct( + val offset: Long, + val validAt: Long, + val name: Optional +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStruct {\n") append("\toffset : $offset\n") append("\tvalidAt : $validAt\n") @@ -44,9 +42,9 @@ class TimeSynchronizationClusterTimeZoneStruct ( put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_AT), validAt) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -56,16 +54,17 @@ class TimeSynchronizationClusterTimeZoneStruct ( private const val TAG_VALID_AT = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt index 668f0c1e923143..db50619ad5da53 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterTrustedTimeSourceStruct ( - val fabricIndex: Int, - val nodeID: Long, - val endpoint: Int) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTrustedTimeSourceStruct( + val fabricIndex: Int, + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") append("\tfabricIndex : $fabricIndex\n") append("\tnodeID : $nodeID\n") @@ -53,12 +50,12 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct ( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTrustedTimeSourceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt index ed3e7a0ef74243..bd34e9f5a90c49 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -20,15 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterDoubleNestedStructList ( - val a: List) { - override fun toString(): String = buildString { +class UnitTestingClusterDoubleNestedStructList(val a: List) { + override fun toString(): String = buildString { append("UnitTestingClusterDoubleNestedStructList {\n") append("\ta : $a\n") append("}\n") @@ -49,16 +45,17 @@ class UnitTestingClusterDoubleNestedStructList ( companion object { private const val TAG_A = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterDoubleNestedStructList { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterDoubleNestedStructList { tlvReader.enterStructure(tag) - val a = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_A)) - while(!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val a = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_A)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterDoubleNestedStructList(a) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index c0de5e08f6886b..7ca3b0b29aab01 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterNestedStruct ( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct) { - override fun toString(): String = buildString { +class UnitTestingClusterNestedStruct( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct +) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -53,12 +50,12 @@ class UnitTestingClusterNestedStruct ( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - + tlvReader.exitContainer() return UnitTestingClusterNestedStruct(a, b, c) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt index 9b41c3e439e192..b954fe0ec9879b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -20,21 +20,19 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterNestedStructList ( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct, - val d: List, - val e: List, - val f: List, - val g: List) { - override fun toString(): String = buildString { +class UnitTestingClusterNestedStructList( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List +) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStructList {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -85,40 +83,44 @@ class UnitTestingClusterNestedStructList ( private const val TAG_F = 5 private const val TAG_G = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStructList { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - val d = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_D)) - while(!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val e = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_E)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - val f = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_F)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val g = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_G)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val d = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_D)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_E)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_F)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_G)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt index 1533278b6a1fac..08a4b642e69d45 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -20,26 +20,25 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class UnitTestingClusterNullablesAndOptionalsStruct ( - val nullableInt: Int?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, - val nullableString: String?, - val optionalString: Optional, - val nullableOptionalString: Optional?, - val nullableStruct: UnitTestingClusterSimpleStruct?, - val optionalStruct: Optional, - val nullableOptionalStruct: Optional?, - val nullableList: List?, - val optionalList: Optional>, - val nullableOptionalList: Optional>?) { - override fun toString(): String = buildString { +class UnitTestingClusterNullablesAndOptionalsStruct( + val nullableInt: Int?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? +) { + override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") append("\tnullableInt : $nullableInt\n") append("\toptionalInt : $optionalInt\n") @@ -60,85 +59,85 @@ class UnitTestingClusterNullablesAndOptionalsStruct ( tlvWriter.apply { startStructure(tag) if (nullableInt != null) { - put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_INT)) - } + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } if (optionalInt.isPresent) { - val optoptionalInt = optionalInt.get() - put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) - } + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } if (nullableOptionalInt != null) { - if (nullableOptionalInt.isPresent) { - val optnullableOptionalInt = nullableOptionalInt.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - } + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } if (nullableString != null) { - put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - } + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } if (optionalString.isPresent) { - val optoptionalString = optionalString.get() - put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) - } + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } if (nullableOptionalString != null) { - if (nullableOptionalString.isPresent) { - val optnullableOptionalString = nullableOptionalString.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - } + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } if (nullableStruct != null) { - nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - } + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } if (optionalStruct.isPresent) { - val optoptionalStruct = optionalStruct.get() - optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) - } + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } if (nullableOptionalStruct != null) { - if (nullableOptionalStruct.isPresent) { - val optnullableOptionalStruct = nullableOptionalStruct.get() - optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - } + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } if (nullableList != null) { - startList(ContextSpecificTag(TAG_NULLABLE_LIST)) - for (item in nullableList.iterator()) { - put(AnonymousTag, item) + startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) } - endList() - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - } if (optionalList.isPresent) { - val optoptionalList = optionalList.get() - startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - for (item in optoptionalList.iterator()) { - put(AnonymousTag, item) + val optoptionalList = optionalList.get() + startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() } - endList() - } if (nullableOptionalList != null) { - if (nullableOptionalList.isPresent) { - val optnullableOptionalList = nullableOptionalList.get() - startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - for (item in optnullableOptionalList.iterator()) { - put(AnonymousTag, item) + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - } endStructure() } } @@ -157,114 +156,153 @@ class UnitTestingClusterNullablesAndOptionalsStruct ( private const val TAG_OPTIONAL_LIST = 10 private const val TAG_NULLABLE_OPTIONAL_LIST = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNullablesAndOptionalsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { tlvReader.enterStructure(tag) - val nullableInt = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) - null - } - val optionalInt = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) - } else { - Optional.empty() - } - val nullableOptionalInt = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - null - } - val nullableString = if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - null - } - val optionalString = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) - } else { - Optional.empty() - } - val nullableOptionalString = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - null - } - val nullableStruct = if (!tlvReader.isNull()) { - UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - null - } - val optionalStruct = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { - Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), tlvReader)) - } else { - Optional.empty() - } - val nullableOptionalStruct = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { - Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), tlvReader)) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - null - } - val nullableList = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - null - } - val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - val nullableOptionalList = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - null - } - + val nullableInt = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = + if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = + if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + val nullableOptionalStruct = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val nullableOptionalList = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + tlvReader.exitContainer() - return UnitTestingClusterNullablesAndOptionalsStruct(nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList) + return UnitTestingClusterNullablesAndOptionalsStruct( + nullableInt, + optionalInt, + nullableOptionalInt, + nullableString, + optionalString, + nullableOptionalString, + nullableStruct, + optionalStruct, + nullableOptionalStruct, + nullableList, + optionalList, + nullableOptionalList + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt index 381016bd583fa5..26bf18a07ed214 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -17,25 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterSimpleStruct ( - val a: Int, - val b: Boolean, - val c: Int, - val d: ByteArray, - val e: String, - val f: Int, - val g: Float, - val h: Double) { - override fun toString(): String = buildString { +class UnitTestingClusterSimpleStruct( + val a: Int, + val b: Boolean, + val c: Int, + val d: ByteArray, + val e: String, + val f: Int, + val g: Float, + val h: Double +) { + override fun toString(): String = buildString { append("UnitTestingClusterSimpleStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -73,7 +70,7 @@ class UnitTestingClusterSimpleStruct ( private const val TAG_G = 6 private const val TAG_H = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterSimpleStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) @@ -83,7 +80,7 @@ class UnitTestingClusterSimpleStruct ( val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) - + tlvReader.exitContainer() return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index 8a7b42ba939ae6..6b7273f3172d5d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -20,22 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class UnitTestingClusterTestFabricScoped ( - val fabricSensitiveInt8u: Int, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: Int?, - val nullableOptionalFabricSensitiveInt8u: Optional?, - val fabricSensitiveCharString: String, - val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScoped( + val fabricSensitiveInt8u: Int, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: Int?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") @@ -53,22 +52,28 @@ class UnitTestingClusterTestFabricScoped ( startStructure(tag) put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) if (optionalFabricSensitiveInt8u.isPresent) { - val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() - put(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), optoptionalFabricSensitiveInt8u) - } + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optoptionalFabricSensitiveInt8u + ) + } if (nullableFabricSensitiveInt8u != null) { - put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } if (nullableOptionalFabricSensitiveInt8u != null) { - if (nullableOptionalFabricSensitiveInt8u.isPresent) { - val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), optnullableOptionalFabricSensitiveInt8u) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - } + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optnullableOptionalFabricSensitiveInt8u + ) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) @@ -91,44 +96,66 @@ class UnitTestingClusterTestFabricScoped ( private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScoped { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { tlvReader.enterStructure(tag) val fabricSensitiveInt8u = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) - val optionalFabricSensitiveInt8u = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - null - } - val nullableOptionalFabricSensitiveInt8u = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - null - } - val fabricSensitiveCharString = tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) - val fabricSensitiveStruct = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), tlvReader) - val fabricSensitiveInt8uList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } + val optionalFabricSensitiveInt8u = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + if ( + tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) { + Optional.of( + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = + tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), + tlvReader + ) + val fabricSensitiveInt8uList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return UnitTestingClusterTestFabricScoped(fabricSensitiveInt8u, optionalFabricSensitiveInt8u, nullableFabricSensitiveInt8u, nullableOptionalFabricSensitiveInt8u, fabricSensitiveCharString, fabricSensitiveStruct, fabricSensitiveInt8uList, fabricIndex) + return UnitTestingClusterTestFabricScoped( + fabricSensitiveInt8u, + optionalFabricSensitiveInt8u, + nullableFabricSensitiveInt8u, + nullableOptionalFabricSensitiveInt8u, + fabricSensitiveCharString, + fabricSensitiveStruct, + fabricSensitiveInt8uList, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt index 0540f4f11a30cb..6c5df4cb224166 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterTestListStructOctet ( - val member1: Long, - val member2: ByteArray) { - override fun toString(): String = buildString { +class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { + override fun toString(): String = buildString { append("UnitTestingClusterTestListStructOctet {\n") append("\tmember1 : $member1\n") append("\tmember2 : $member2\n") @@ -49,11 +43,11 @@ class UnitTestingClusterTestListStructOctet ( private const val TAG_MEMBER1 = 0 private const val TAG_MEMBER2 = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestListStructOctet { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { tlvReader.enterStructure(tag) val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) - + tlvReader.exitContainer() return UnitTestingClusterTestListStructOctet(member1, member2) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt index 44a824f2303a2e..d90396f2a010ea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UserLabelClusterLabelStruct ( - val label: String, - val value: String) { - override fun toString(): String = buildString { +class UserLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { append("UserLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class UserLabelClusterLabelStruct ( private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UserLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return UserLabelClusterLabelStruct(label, value) From bcd289d538e5fcd824d89b63c6f7ac9e46bc25d3 Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Fri, 22 Sep 2023 20:00:10 -0500 Subject: [PATCH 03/13] Zap Regen --- .../MTRAttributeTLVValueDecoder.mm | 157 ------------------ 1 file changed, 157 deletions(-) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 70d9ab7d1c0b13..b036e5024d0cfb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -5402,51 +5402,6 @@ static id _Nullable DecodeAttributeValueForLaundryWasherModeCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } #endif // MTR_ENABLE_PROVISIONAL default: { break; @@ -5530,62 +5485,6 @@ static id _Nullable DecodeAttributeValueForRefrigeratorAndTemperatureControlledC value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } #endif // MTR_ENABLE_PROVISIONAL default: { break; @@ -6170,62 +6069,6 @@ static id _Nullable DecodeAttributeValueForDishwasherModeCluster( value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } #endif // MTR_ENABLE_PROVISIONAL default: { break; From 1b0f2daf9d35c48b66be382b47ce98532efb987b Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Mon, 25 Sep 2023 14:06:13 -0500 Subject: [PATCH 04/13] Set PICS values for attributes that are not used by mode specializations to 0 --- .../tests/suites/certification/ci-pics-values | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 509c37ed6fd293..2cebbd51dfdbe5 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -325,13 +325,13 @@ DISHALM.S.C01.Rsp=1 # DISHWASHER MODE CLUSTER DISHM.S=1 -DISHM.S.F00=1 +DISHM.S.F00=0 #Server DISHM.S.A0000=1 DISHM.S.A0001=1 -DISHM.S.A0002=1 -DISHM.S.A0003=1 +DISHM.S.A0002=0 +DISHM.S.A0003=0 #Command DISHM.S.C00.Rsp=1 @@ -741,11 +741,11 @@ CGEN.C=1 LWM.S=1 LWM.S.A0000=1 LWM.S.A0001=1 -LWM.S.A0003=1 -LWM.S.A0002=1 +LWM.S.A0003=0 +LWM.S.A0002=0 #Feature -LWM.S.F00=1 +LWM.S.F00=0 #Command LWM.S.C00.Rsp=1 @@ -2495,13 +2495,13 @@ PIXIT.RVCRUNM.MODE_CHANGE_OK=1 #Refrigerator and Temperature Controlled Cabinet Mode Cluster(TCCM) TCCM.S=1 -TCCM.S.F00=1 +TCCM.S.F00=0 #Server TCCM.S.A0000=1 TCCM.S.A0001=1 -TCCM.S.A0002=1 -TCCM.S.A0003=1 +TCCM.S.A0002=0 +TCCM.S.A0003=0 #Commands TCCM.S.C00.Rsp=1 From afc8fb8545cde8de2ca461a1d48eced32b825de9 Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Tue, 26 Sep 2023 14:53:00 -0500 Subject: [PATCH 05/13] Remove setting of DepOnOff Feature Flag from the derivations of ModeBase (where it is explicitly disallowed) --- .../all-clusters-common/all-clusters-app.zap | 111 ++---------------- .../src/dishwasher-mode.cpp | 2 +- .../src/laundry-washer-mode.cpp | 2 +- .../all-clusters-common/src/tcc-mode.cpp | 3 +- 4 files changed, 11 insertions(+), 107 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index c7ccc67b4b7089..f0508239946362 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -16,6 +16,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -23,12 +29,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -15099,38 +15099,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -15331,38 +15299,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -16656,38 +16592,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -35392,5 +35296,6 @@ "endpointId": 65534, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp index 607bb5578787f2..3164912fa58dae 100644 --- a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp @@ -101,6 +101,6 @@ void emberAfDishwasherModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gDishwasherModeDelegate == nullptr && gDishwasherModeInstance == nullptr); gDishwasherModeDelegate = new DishwasherMode::DishwasherModeDelegate; gDishwasherModeInstance = - new ModeBase::Instance(gDishwasherModeDelegate, 0x1, DishwasherMode::Id, chip::to_underlying(Feature::kOnOff)); + new ModeBase::Instance(gDishwasherModeDelegate, 0x1, DishwasherMode::Id, 0x0); gDishwasherModeInstance->Init(); } diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp index 16bb21158b612b..49e30ffe6eb412 100644 --- a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp @@ -100,6 +100,6 @@ void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(gLaundryWasherModeDelegate == nullptr && gLaundryWasherModeInstance == nullptr); gLaundryWasherModeDelegate = new LaundryWasherMode::LaundryWasherModeDelegate; gLaundryWasherModeInstance = - new ModeBase::Instance(gLaundryWasherModeDelegate, 0x1, LaundryWasherMode::Id, chip::to_underlying(Feature::kOnOff)); + new ModeBase::Instance(gLaundryWasherModeDelegate, 0x1, LaundryWasherMode::Id, 0x0); gLaundryWasherModeInstance->Init(); } diff --git a/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp index 8f3c865aecaf0e..df4b29500d7971 100644 --- a/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp @@ -94,7 +94,6 @@ void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(c VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gTccModeDelegate == nullptr && gTccModeInstance == nullptr); gTccModeDelegate = new RefrigeratorAndTemperatureControlledCabinetMode::TccModeDelegate; - gTccModeInstance = new ModeBase::Instance(gTccModeDelegate, 0x1, RefrigeratorAndTemperatureControlledCabinetMode::Id, - chip::to_underlying(Feature::kOnOff)); + gTccModeInstance = new ModeBase::Instance(gTccModeDelegate, 0x1, RefrigeratorAndTemperatureControlledCabinetMode::Id, 0x0); gTccModeInstance->Init(); } From d73a3399f39d120aaed73ac0659236ad7439ef53 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 26 Sep 2023 19:55:25 +0000 Subject: [PATCH 06/13] Restyled by clang-format --- .../all-clusters-common/src/dishwasher-mode.cpp | 3 +-- .../all-clusters-common/src/laundry-washer-mode.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp index 3164912fa58dae..14cae43da85a66 100644 --- a/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp @@ -100,7 +100,6 @@ void emberAfDishwasherModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gDishwasherModeDelegate == nullptr && gDishwasherModeInstance == nullptr); gDishwasherModeDelegate = new DishwasherMode::DishwasherModeDelegate; - gDishwasherModeInstance = - new ModeBase::Instance(gDishwasherModeDelegate, 0x1, DishwasherMode::Id, 0x0); + gDishwasherModeInstance = new ModeBase::Instance(gDishwasherModeDelegate, 0x1, DishwasherMode::Id, 0x0); gDishwasherModeInstance->Init(); } diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp index 49e30ffe6eb412..4cfbcd2496cc8e 100644 --- a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp @@ -99,7 +99,6 @@ void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gLaundryWasherModeDelegate == nullptr && gLaundryWasherModeInstance == nullptr); gLaundryWasherModeDelegate = new LaundryWasherMode::LaundryWasherModeDelegate; - gLaundryWasherModeInstance = - new ModeBase::Instance(gLaundryWasherModeDelegate, 0x1, LaundryWasherMode::Id, 0x0); + gLaundryWasherModeInstance = new ModeBase::Instance(gLaundryWasherModeDelegate, 0x1, LaundryWasherMode::Id, 0x0); gLaundryWasherModeInstance->Init(); } From ac48bae90a5f8ac62027d9129f76131d0aa95086 Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Tue, 26 Sep 2023 17:18:15 -0500 Subject: [PATCH 07/13] Mark LWM tests on provisional attributes as in development --- scripts/tests/chiptest/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 3180be2da54847..25c4f9c8317c3d 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -160,6 +160,9 @@ def _GetInDevelopmentTests() -> Set[str]: # TestEventTriggersEnabled is true, which it's not in CI. "Test_TC_IDM_1_2.yaml", # Broken harness: https://github.com/project-chip/connectedhomeip/issues/29115 "Test_TC_S_2_4.yaml", # https://github.com/project-chip/connectedhomeip/issues/29117 + "Test_TC_LWM_3_1.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_2.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_3.yaml" # Target attribute now provisional and removed from the XML } From 33eba24abb509abab82f7184d723dfe6203458d2 Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Tue, 26 Sep 2023 18:17:46 -0500 Subject: [PATCH 08/13] Fix Python Lint issue --- scripts/tests/chiptest/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 25c4f9c8317c3d..90e4d03e57b8ea 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -160,9 +160,9 @@ def _GetInDevelopmentTests() -> Set[str]: # TestEventTriggersEnabled is true, which it's not in CI. "Test_TC_IDM_1_2.yaml", # Broken harness: https://github.com/project-chip/connectedhomeip/issues/29115 "Test_TC_S_2_4.yaml", # https://github.com/project-chip/connectedhomeip/issues/29117 - "Test_TC_LWM_3_1.yaml", # Target attribute now provisional and removed from the XML - "Test_TC_LWM_3_2.yaml", # Target attribute now provisional and removed from the XML - "Test_TC_LWM_3_3.yaml" # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_1.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_2.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_3.yaml" # Target attribute now provisional and removed from the XML } From e0d232f21880caea315d6336a9dafaf8b804adc4 Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Tue, 26 Sep 2023 18:51:30 -0500 Subject: [PATCH 09/13] Remove erroneous duplicated PICS values for TCCM --- src/app/tests/suites/certification/ci-pics-values | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 2cebbd51dfdbe5..c67bfcd5bce129 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2604,16 +2604,6 @@ SMOKECO.M.ManuallyControlledTest=1 SMOKECO.M.ManuallyControlledMute=1 SMOKECO.S.C00.Rsp=1 -#Temperature Controlled Cabinet Mode Cluster -TCCM.S=1 -TCCM.S.F00=1 -TCCM.S.A0000=1 -TCCM.S.A0001=1 -TCCM.S.A0002=1 -TCCM.S.A0003=1 -TCCM.S.C00.Rsp=1 -TCCM.S.C01.Tx=1 - #Temperature Control TCTL.S=1 TCTL.C=1 From 5074f8ca9b929eb426ea69db285f17649f465f0e Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Tue, 26 Sep 2023 21:10:37 -0500 Subject: [PATCH 10/13] Fix the bug in the YAML for TCCM_1_1 that expects attributes 2 and 3 in all cases even though they were optional (and now provisional). --- src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml index 41c94bc0ad274a..e0f6df2d917fb4 100644 --- a/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TCCM_1_1.yaml @@ -75,7 +75,7 @@ tests: response: constraints: type: list - contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - label: "Step 4b: TH reads from the DUT the AttributeList attribute. 0x0002: From 9b92ed4965fa43ce3c8cf527c25ab3b7064fd033 Mon Sep 17 00:00:00 2001 From: Mark Trayer Date: Wed, 27 Sep 2023 08:09:50 -0500 Subject: [PATCH 11/13] Remove TCCM 3-1, 3-2, 3-3 from being executed. --- scripts/tests/chiptest/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 90e4d03e57b8ea..f60a6e1a904a2a 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -158,11 +158,14 @@ def _GetInDevelopmentTests() -> Set[str]: # TestEventTriggersEnabled is true, which it's not in CI. "Test_TC_SMOKECO_2_6.yaml", # chip-repl does not support local timeout (07/20/2023) and test assumes # TestEventTriggersEnabled is true, which it's not in CI. - "Test_TC_IDM_1_2.yaml", # Broken harness: https://github.com/project-chip/connectedhomeip/issues/29115 - "Test_TC_S_2_4.yaml", # https://github.com/project-chip/connectedhomeip/issues/29117 - "Test_TC_LWM_3_1.yaml", # Target attribute now provisional and removed from the XML - "Test_TC_LWM_3_2.yaml", # Target attribute now provisional and removed from the XML - "Test_TC_LWM_3_3.yaml" # Target attribute now provisional and removed from the XML + "Test_TC_IDM_1_2.yaml", # Broken harness: https://github.com/project-chip/connectedhomeip/issues/29115 + "Test_TC_S_2_4.yaml", # https://github.com/project-chip/connectedhomeip/issues/29117 + "Test_TC_LWM_3_1.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_2.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_LWM_3_3.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_TCCM_3_1.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_TCCM_3_2.yaml", # Target attribute now provisional and removed from the XML + "Test_TC_TCCM_3_3.yaml" # Target attribute now provisional and removed from the XML } From afa91b2542770908f0d53d696cbca279f9565a38 Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Wed, 27 Sep 2023 08:56:23 -0500 Subject: [PATCH 12/13] Add zap regen for the yaml tc tccm 1-1 --- .../darwin-framework-tool/zap-generated/test/Commands.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 30fefeece04e5d..01f752efc28f22 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -97072,8 +97072,6 @@ class Test_TC_TCCM_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); From e67a53d35f7dcd9e6326c95f5e72cfb296f2d98f Mon Sep 17 00:00:00 2001 From: "m.trayer" Date: Mon, 2 Oct 2023 12:19:21 -0500 Subject: [PATCH 13/13] Zap Regen --- .../CHIP/zap-generated/MTRBaseClusters.h | 9 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 157 ------------------ .../CHIP/zap-generated/MTRClusterConstants.h | 62 +++---- .../CHIP/zap-generated/MTRClusters.h | 9 +- 4 files changed, 26 insertions(+), 211 deletions(-) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 61d9802dea93d2..ed4bd84efc5604 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -4696,8 +4696,7 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; @@ -4774,8 +4773,7 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; @@ -5298,8 +5296,7 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 5ff9f7c6c4c812..ca73efda78fa36 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -45569,163 +45569,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta }); } -<<<<<<< HEAD -======= -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - return MTRReadAttribute(params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - return MTRReadAttribute(params, completion, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self.endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - ->>>>>>> master - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 7d4d5fe8fc5ce6..6dcded3147200d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -2296,38 +2296,22 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster LaundryWasherMode attributes MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster RefrigeratorAndTemperatureControlledCabinetMode attributes - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE - = 0x00000000, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE - = 0x00000001, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID - MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID - MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster LaundryWasherControls attributes MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -2393,18 +2377,12 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster DishwasherMode attributes MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster AirQuality attributes MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index c9f239f48f432c..4fc476e3f91604 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2102,8 +2102,7 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params - MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2141,8 +2140,7 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params - MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2400,8 +2398,7 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary *)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params - MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;