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 c21152999a2876..0bd50dd6621eb5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -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: ULong?, - val adminPasscodeID: UInt?, - val changeType: UInt, - val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlEntryChangedEvent( + val adminNodeID: ULong?, + val adminPasscodeID: UInt?, + val changeType: UInt, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlEntryChangedEvent ( tlvWriter.apply { startStructure(tlvTag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlEntryChangedEvent ( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlEntryChangedEvent { tlvReader.enterStructure(tlvTag) - val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) + return AccessControlClusterAccessControlEntryChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt index 5ec85430c46c75..25df77d26fe2a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -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: ULong?, - val adminPasscodeID: UInt?, - val changeType: UInt, - val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlExtensionChangedEvent( + val adminNodeID: ULong?, + val adminPasscodeID: UInt?, + val changeType: UInt, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent ( tlvWriter.apply { startStructure(tlvTag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlExtensionChangedEvent ( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionChangedEvent { tlvReader.enterStructure(tlvTag) - val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) + return AccessControlClusterAccessControlExtensionChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt index 76405fd0e2ebba..b53c0695c1fdc9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -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: UInt, - val invokeID: ULong, - val newState: UInt, - val error: UInt) { - override fun toString(): String = buildString { +class ActionsClusterActionFailedEvent( + val actionID: UInt, + val invokeID: ULong, + val newState: UInt, + val error: UInt +) { + override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -57,13 +54,13 @@ class ActionsClusterActionFailedEvent ( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { tlvReader.enterStructure(tlvTag) val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) val error = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR)) - + tlvReader.exitContainer() return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt index 4d647b2b0fdc6a..88b00efa98afb1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -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: UInt, - val invokeID: ULong, - val newState: UInt) { - override fun toString(): String = buildString { +class ActionsClusterStateChangedEvent(val actionID: UInt, val invokeID: ULong, val newState: UInt) { + override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -53,12 +46,12 @@ class ActionsClusterStateChangedEvent ( private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterStateChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { tlvReader.enterStructure(tlvTag) val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) - + tlvReader.exitContainer() return ActionsClusterStateChangedEvent(actionID, invokeID, newState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt index ee3b292cf27eb0..8205d49b66b962 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class BasicInformationClusterLeaveEvent(val fabricIndex: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterLeaveEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { tlvReader.enterStructure(tlvTag) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BasicInformationClusterLeaveEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt index 6002fe97afdb64..831b10b53fc552 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterReachableChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tlvTag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt index 4c61c14b899d50..f9a26f3926b372 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -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: ULong) { - override fun toString(): String = buildString { +class BasicInformationClusterStartUpEvent(val softwareVersion: ULong) { + 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(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterStartUpEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt index cae75cc69fdb47..e39fd94d4e7ee5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : BooleanStateClusterStateChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { tlvReader.enterStructure(tlvTag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) - + tlvReader.exitContainer() return BooleanStateClusterStateChangeEvent(stateValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt index acbc95e26a3eba..b41e5dc45cfdcc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterReachableChangedEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tlvTag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt index 9bd1dc9d9ff559..2d885e12e526a1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -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: ULong) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: ULong) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -45,10 +40,13 @@ class BridgedDeviceBasicInformationClusterStartUpEvent ( companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterStartUpEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterStartUpEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt index 356ae994f9fa27..54a228620a151f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -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: ULong, - val inactive: ULong, - val state: ULong, - val mask: ULong) { - override fun toString(): String = buildString { +class DishwasherAlarmClusterNotifyEvent( + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong +) { + override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -57,13 +54,13 @@ class DishwasherAlarmClusterNotifyEvent ( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DishwasherAlarmClusterNotifyEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { tlvReader.enterStructure(tlvTag) val active = tlvReader.getULong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getULong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getULong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getULong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt index 8cb3cfc653712b..4b85d263e23807 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorLockAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmCode = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_CODE)) - + tlvReader.exitContainer() return DoorLockClusterDoorLockAlarmEvent(alarmCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt index 6fe07ef7005b7d..a76da923dce2a8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class DoorLockClusterDoorStateChangeEvent(val doorState: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorStateChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { tlvReader.enterStructure(tlvTag) val doorState = tlvReader.getUInt(ContextSpecificTag(TAG_DOOR_STATE)) - + tlvReader.exitContainer() return DoorLockClusterDoorStateChangeEvent(doorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt index 338d3806ce989c..0ed53ef5426906 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -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: UInt, - val operationSource: UInt, - val operationError: UInt, - val userIndex: UInt?, - val fabricIndex: UInt?, - val sourceNode: ULong?, - val credentials: Optional>?) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationErrorEvent( + val lockOperationType: UInt, + val operationSource: UInt, + val operationError: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationErrorEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -53,32 +53,32 @@ class DoorLockClusterLockOperationErrorEvent ( put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startArray(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startArray(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) } - endArray() - } - } 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(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { tlvReader.enterStructure(tlvTag) val lockOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) val operationError = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_ERROR)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of(buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationErrorEvent(lockOperationType, operationSource, operationError, userIndex, fabricIndex, sourceNode, credentials) + return DoorLockClusterLockOperationErrorEvent( + lockOperationType, + operationSource, + operationError, + userIndex, + fabricIndex, + sourceNode, + credentials + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt index 363e102e72bd2e..338201ef0a1633 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -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: UInt, - val operationSource: UInt, - val userIndex: UInt?, - val fabricIndex: UInt?, - val sourceNode: ULong?, - val credentials: Optional>?) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationEvent( + val lockOperationType: UInt, + val operationSource: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -50,32 +50,32 @@ class DoorLockClusterLockOperationEvent ( put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startArray(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startArray(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) } - endArray() - } - } 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(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { tlvReader.enterStructure(tlvTag) val lockOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of(buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationEvent(lockOperationType, operationSource, userIndex, fabricIndex, sourceNode, credentials) + return DoorLockClusterLockOperationEvent( + lockOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + credentials + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt index bdc004d470104c..8308f267b5933a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -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: UInt, - val dataOperationType: UInt, - val operationSource: UInt, - val userIndex: UInt?, - val fabricIndex: UInt?, - val sourceNode: ULong?, - val dataIndex: UInt?) { - override fun toString(): String = buildString { +class DoorLockClusterLockUserChangeEvent( + val lockDataType: UInt, + val dataOperationType: UInt, + val operationSource: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + val dataIndex: UInt? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockUserChangeEvent {\n") append("\tlockDataType : $lockDataType\n") append("\tdataOperationType : $dataOperationType\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterLockUserChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { tlvReader.enterStructure(tlvTag) val lockDataType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) val dataOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val dataIndex = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_DATA_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockUserChangeEvent(lockDataType, dataOperationType, operationSource, userIndex, fabricIndex, sourceNode, dataIndex) + return DoorLockClusterLockUserChangeEvent( + lockDataType, + dataOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + dataIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt index cb39ec4f1bfef5..4c465958211d43 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterBootReasonEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { tlvReader.enterStructure(tlvTag) val bootReason = tlvReader.getUInt(ContextSpecificTag(TAG_BOOT_REASON)) - + tlvReader.exitContainer() return GeneralDiagnosticsClusterBootReasonEvent(bootReason) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt index 461a8ae4b0893b..fc0b76ef132018 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -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,28 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterHardwareFaultChangeEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralDiagnosticsClusterHardwareFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt index d272b3c3c380a3..833c4c913ed254 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -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,28 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt index 9cb3ec1f863021..84f3f9de9871ed 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterRadioFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt index cf1abbf3c5f5fe..964febc8880806 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -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: UInt, - val totalOperationalTime: Optional?, - val pausedTime: Optional?) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationCompletionEvent( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -43,21 +41,21 @@ class OperationalStateClusterOperationCompletionEvent ( startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -67,33 +65,42 @@ class OperationalStateClusterOperationCompletionEvent ( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationCompletionEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tlvTag) val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return OperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) + return OperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt index 2f063b83a993bc..2e59748ac177bc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalErrorEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tlvTag) - val errorState = chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = + chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + tlvReader.exitContainer() return OperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt index ac686063198bea..b06cb961d04a0d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -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: ULong, - val bytesDownloaded: ULong, - val progressPercent: UInt?, - val platformCode: Long?) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + val softwareVersion: ULong, + val bytesDownloaded: ULong, + val progressPercent: UInt?, + val platformCode: Long? +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tbytesDownloaded : $bytesDownloaded\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val bytesDownloaded = tlvReader.getULong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) - val progressPercent = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - null - } - val platformCode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - null - } - + val progressPercent = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent(softwareVersion, bytesDownloaded, progressPercent, platformCode) + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + softwareVersion, + bytesDownloaded, + progressPercent, + platformCode + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt index 4aa7a60250472f..fff2c21bcd7384 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -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: UInt, - val newState: UInt, - val reason: UInt, - val targetSoftwareVersion: ULong?) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + val previousState: UInt, + val newState: UInt, + val reason: UInt, + val targetSoftwareVersion: ULong? +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") append("\tpreviousState : $previousState\n") append("\tnewState : $newState\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { tlvReader.enterStructure(tlvTag) val previousState = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) val reason = tlvReader.getUInt(ContextSpecificTag(TAG_REASON)) - val targetSoftwareVersion = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - null - } - + val targetSoftwareVersion = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterStateTransitionEvent(previousState, newState, reason, targetSoftwareVersion) + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + previousState, + newState, + reason, + targetSoftwareVersion + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt index 78fbb948ff0c9c..c4f72f4eee07f4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -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: ULong, - val productID: UInt) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( + val softwareVersion: ULong, + val productID: UInt +) { + 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(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { tlvReader.enterStructure(tlvTag) val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val productID = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_I_D)) - + tlvReader.exitContainer() return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt index d5738da0509490..861736ae115cb5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -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 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 +55,25 @@ class PowerSourceClusterBatChargeFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt index 418cd7ab751101..30711612c0d1d8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt index cb531dcbf46742..dac17ad7574457 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt index 644aa131e6545d..f52966b7e0ddeb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -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: ULong, - val inactive: ULong, - val state: ULong, - val mask: ULong) { - override fun toString(): String = buildString { +class RefrigeratorAlarmClusterNotifyEvent( + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong +) { + override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -57,13 +54,13 @@ class RefrigeratorAlarmClusterNotifyEvent ( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RefrigeratorAlarmClusterNotifyEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { tlvReader.enterStructure(tlvTag) val active = tlvReader.getULong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getULong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getULong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getULong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt index 1ac59f154b863e..c7735481fd9f57 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -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: UInt, - val totalOperationalTime: Optional?, - val pausedTime: Optional?) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationCompletionEvent( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -43,21 +41,21 @@ class RvcOperationalStateClusterOperationCompletionEvent ( startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -67,33 +65,42 @@ class RvcOperationalStateClusterOperationCompletionEvent ( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationCompletionEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tlvTag) val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) + return RvcOperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt index a459b2662f1693..ee8bd3c8dc4a57 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -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,17 @@ class RvcOperationalStateClusterOperationalErrorEvent ( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalErrorEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tlvTag) - val errorState = chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = + chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + tlvReader.exitContainer() return RvcOperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt index fc00cff84c9c92..be8db4eadec848 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterCOAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt index ca63c62f081d91..1300634d16fbff 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectCOAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt index 1a2f07ad3e6836..a4a2ca7611e38d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt index b3ca0ce9406a07..163d29c5a51c35 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterLowBatteryEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt index e4adb5c715bd82..b26dcdd65fb66b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterSmokeAlarmEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { tlvReader.enterStructure(tlvTag) val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt index 92677db4668be6..e053514f92cfe5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -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: ULong, - val name: Optional, - val faultRecording: Optional) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterSoftwareFaultEvent( + val id: ULong, + val name: Optional, + val faultRecording: Optional +) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -43,13 +41,13 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent ( startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (faultRecording.isPresent) { - val optfaultRecording = faultRecording.get() - put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) - } + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } endStructure() } } @@ -59,20 +57,22 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent ( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterSoftwareFaultEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { tlvReader.enterStructure(tlvTag) val id = tlvReader.getULong(ContextSpecificTag(TAG_ID)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val faultRecording = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt index 859a15f765f201..4a97cda7a47526 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SwitchClusterInitialPressEvent(val newPosition: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterInitialPressEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterInitialPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt index 651abcdf62b9a9..aa8c25dfe20895 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SwitchClusterLongPressEvent(val newPosition: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterLongPressEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt index 43290ff3131c88..10ba08a0f4eabf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SwitchClusterLongReleaseEvent(val previousPosition: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterLongReleaseEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { tlvReader.enterStructure(tlvTag) val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt index 9bef8767f980c1..bc1bab19a93fe4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -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: UInt, - val totalNumberOfPressesCounted: UInt) { - override fun toString(): String = buildString { +class SwitchClusterMultiPressCompleteEvent( + val previousPosition: UInt, + val totalNumberOfPressesCounted: UInt +) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressCompleteEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { tlvReader.enterStructure(tlvTag) val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - val totalNumberOfPressesCounted = tlvReader.getUInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) - + val totalNumberOfPressesCounted = + tlvReader.getUInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt index ad8e6350349477..cf119acd96c073 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -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: UInt, - val currentNumberOfPressesCounted: UInt) { - override fun toString(): String = buildString { +class SwitchClusterMultiPressOngoingEvent( + val newPosition: UInt, + val currentNumberOfPressesCounted: UInt +) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressOngoingEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) - val currentNumberOfPressesCounted = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) - + val currentNumberOfPressesCounted = + tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt index 8bfb005a992f55..68d59803b7c9e7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SwitchClusterShortReleaseEvent(val previousPosition: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterShortReleaseEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { tlvReader.enterStructure(tlvTag) val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterShortReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt index d1bb87e866bab2..484b87f3551b2d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class SwitchClusterSwitchLatchedEvent(val newPosition: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : SwitchClusterSwitchLatchedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { tlvReader.enterStructure(tlvTag) val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterSwitchLatchedEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt index e97030f155cdaa..0ab635e7160ad1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tlvTag) val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt index 54775c8a0f9ed9..9a4be9c84bd8e1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt index 9cf19e23014587..246f8489f5aa84 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTStatusEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { tlvReader.enterStructure(tlvTag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) - + tlvReader.exitContainer() return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt index 76048a38cbc796..1319c6e4551fab 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -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(tlvTag) put(ContextSpecificTag(TAG_OFFSET), offset) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -52,15 +47,16 @@ class TimeSynchronizationClusterTimeZoneStatusEvent ( private const val TAG_OFFSET = 0 private const val TAG_NAME = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStatusEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt index 50674b6aae4606..37359a5c74780a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -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: UInt, - val arg2: UInt, - val arg3: Boolean, - val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, - val arg5: List, - val arg6: List) { - override fun toString(): String = buildString { +class UnitTestingClusterTestEventEvent( + val arg1: UInt, + val arg2: UInt, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List +) { + override fun toString(): String = buildString { append("UnitTestingClusterTestEventEvent {\n") append("\targ1 : $arg1\n") append("\targ2 : $arg2\n") @@ -73,27 +71,38 @@ class UnitTestingClusterTestEventEvent ( private const val TAG_ARG5 = 5 private const val TAG_ARG6 = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestEventEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { tlvReader.enterStructure(tlvTag) val arg1 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG1)) val arg2 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) - val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_ARG4), tlvReader) - val arg5 = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ARG5)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val arg6 = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ARG6)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val arg4 = + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_ARG4), + tlvReader + ) + val arg5 = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG5)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + val arg6 = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG6)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt index 30c225c31c2ed6..4edbfe3a821c4d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScopedEventEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { tlvReader.enterStructure(tlvTag) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt index b8f8d53e6d17a8..be16faa067aa42 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -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: UInt, - val status: UInt) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( + val associationFailure: UInt, + val status: UInt +) { + 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(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tlvTag) val associationFailure = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) val status = tlvReader.getUInt(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 9aa3af8a56065e..7b11149d69a741 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tlvTag) val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt index f47c8ca9366302..84a30a91db72e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: UInt) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") @@ -45,10 +40,13 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterDisconnectionEvent { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterDisconnectionEvent { tlvReader.enterStructure(tlvTag) val reasonCode = tlvReader.getUInt(ContextSpecificTag(TAG_REASON_CODE)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt index 03dcdf6b112189..899cd33e3a7971 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -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: UInt, - val authMode: UInt, - val subjects: List?, - val targets: List?, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlEntryStruct( + val privilege: UInt, + val authMode: UInt, + val subjects: List?, + val targets: List?, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryStruct {\n") append("\tprivilege : $privilege\n") append("\tauthMode : $authMode\n") @@ -48,23 +46,23 @@ class AccessControlClusterAccessControlEntryStruct ( put(ContextSpecificTag(TAG_PRIVILEGE), privilege) put(ContextSpecificTag(TAG_AUTH_MODE), authMode) if (subjects != null) { - startArray(ContextSpecificTag(TAG_SUBJECTS)) - for (item in subjects.iterator()) { - put(AnonymousTag, item) + startArray(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) + } + endArray() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) } - endArray() - } else { - putNull(ContextSpecificTag(TAG_SUBJECTS)) - } if (targets != null) { - startArray(ContextSpecificTag(TAG_TARGETS)) - for (item in targets.iterator()) { - item.toTlv(AnonymousTag, this) + startArray(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) } - endArray() - } 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(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { tlvReader.enterStructure(tlvTag) val privilege = tlvReader.getUInt(ContextSpecificTag(TAG_PRIVILEGE)) val authMode = tlvReader.getUInt(ContextSpecificTag(TAG_AUTH_MODE)) - val subjects = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_SUBJECTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getULong(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) - null - } - val targets = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_TARGETS)) - while(!tlvReader.isEndOfContainer()) { - add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) - null - } + val subjects = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUBJECTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getULong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryStruct(privilege, authMode, subjects, targets, fabricIndex) + return AccessControlClusterAccessControlEntryStruct( + privilege, + authMode, + subjects, + targets, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt index 746a741a7f5e21..e63ac862b669d0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: UInt) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") append("\tfabricIndex : $fabricIndex\n") @@ -49,11 +43,14 @@ class AccessControlClusterAccessControlExtensionStruct ( private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionStruct { tlvReader.enterStructure(tlvTag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt index a3048a928af15a..66a2934f2e69fa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -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: ULong?, - val endpoint: UInt?, - val deviceType: ULong?) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlTargetStruct( + val cluster: ULong?, + val endpoint: UInt?, + val deviceType: ULong? +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") append("\tcluster : $cluster\n") append("\tendpoint : $endpoint\n") @@ -42,20 +39,20 @@ class AccessControlClusterAccessControlTargetStruct ( tlvWriter.apply { startStructure(tlvTag) if (cluster != null) { - put(ContextSpecificTag(TAG_CLUSTER), cluster) - } else { - putNull(ContextSpecificTag(TAG_CLUSTER)) - } + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } if (endpoint != null) { - put(ContextSpecificTag(TAG_ENDPOINT), endpoint) - } else { - putNull(ContextSpecificTag(TAG_ENDPOINT)) - } + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } if (deviceType != null) { - put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) - } else { - putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - } + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } endStructure() } } @@ -65,27 +62,30 @@ class AccessControlClusterAccessControlTargetStruct ( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlTargetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { tlvReader.enterStructure(tlvTag) - val cluster = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) - null - } - val endpoint = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) - null - } - val deviceType = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - null - } - + val cluster = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + tlvReader.exitContainer() return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt index bb3244f3e8f0d5..b4e4934920d891 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -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: UInt, - val name: String, - val type: UInt, - val endpointListID: UInt, - val supportedCommands: UInt, - val state: UInt) { - override fun toString(): String = buildString { +class ActionsClusterActionStruct( + val actionID: UInt, + val name: String, + val type: UInt, + val endpointListID: UInt, + val supportedCommands: UInt, + val state: UInt +) { + override fun toString(): String = buildString { append("ActionsClusterActionStruct {\n") append("\tactionID : $actionID\n") append("\tname : $name\n") @@ -65,7 +62,7 @@ class ActionsClusterActionStruct ( private const val TAG_SUPPORTED_COMMANDS = 4 private const val TAG_STATE = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterActionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { tlvReader.enterStructure(tlvTag) val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) @@ -73,10 +70,17 @@ class ActionsClusterActionStruct ( val endpointListID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val supportedCommands = tlvReader.getUInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) - + tlvReader.exitContainer() - return ActionsClusterActionStruct(actionID, name, type, endpointListID, supportedCommands, state) + return ActionsClusterActionStruct( + actionID, + name, + type, + endpointListID, + supportedCommands, + state + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt index 1b8d90d88a9686..ec2d01283892a5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -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: UInt, - val name: String, - val type: UInt, - val endpoints: List) { - override fun toString(): String = buildString { +class ActionsClusterEndpointListStruct( + val endpointListID: UInt, + val name: String, + val type: UInt, + val endpoints: List +) { + override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") append("\tendpointListID : $endpointListID\n") append("\tname : $name\n") @@ -61,19 +59,20 @@ class ActionsClusterEndpointListStruct ( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ActionsClusterEndpointListStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { tlvReader.enterStructure(tlvTag) val endpointListID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) - val endpoints = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val endpoints = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt index 30368f906eec52..f74db41ebb5e47 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -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: UInt, - val productIdentifierValue: String) { - override fun toString(): String = buildString { +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: UInt, + 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(tlvTag: Tag, tlvReader: TlvReader) : ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tlvTag) val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt index 2995e1d7dcd471..90f30acf293649 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -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: UInt, - val applicationID: String) { - override fun toString(): String = buildString { +class ApplicationBasicClusterApplicationStruct( + val catalogVendorID: UInt, + 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(tlvTag: Tag, tlvReader: TlvReader) : ApplicationBasicClusterApplicationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { tlvReader.enterStructure(tlvTag) val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt index 36bf24bc201bf2..5d2150df995154 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -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(tlvTag) application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } endStructure() } } @@ -52,15 +50,20 @@ class ApplicationLauncherClusterApplicationEPStruct ( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationEPStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { tlvReader.enterStructure(tlvTag) - val application = ApplicationLauncherClusterApplicationStruct.fromTlv(ContextSpecificTag(TAG_APPLICATION), tlvReader) - val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - + val application = + ApplicationLauncherClusterApplicationStruct.fromTlv( + ContextSpecificTag(TAG_APPLICATION), + tlvReader + ) + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt index a37fbf2880e39e..1c41c195633a7e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -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: UInt, - val applicationID: String) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationStruct( + val catalogVendorID: UInt, + 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(tlvTag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { tlvReader.enterStructure(tlvTag) val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt index 3a6fcf70ece9a6..7779b13ac524a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -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: UInt, - val outputType: UInt, - val name: String) { - override fun toString(): String = buildString { +class AudioOutputClusterOutputInfoStruct(val index: UInt, val outputType: UInt, val name: String) { + override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") append("\toutputType : $outputType\n") @@ -53,12 +46,12 @@ class AudioOutputClusterOutputInfoStruct ( private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : AudioOutputClusterOutputInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { tlvReader.enterStructure(tlvTag) val index = tlvReader.getUInt(ContextSpecificTag(TAG_INDEX)) val outputType = tlvReader.getUInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return AudioOutputClusterOutputInfoStruct(index, outputType, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt index a5ee906aecbbc9..bd3aff9a19c4e0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -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: UInt, - val subscriptionsPerFabric: UInt) { - override fun toString(): String = buildString { +class BasicInformationClusterCapabilityMinimaStruct( + val caseSessionsPerFabric: UInt, + val subscriptionsPerFabric: UInt +) { + override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") @@ -49,14 +46,19 @@ class BasicInformationClusterCapabilityMinimaStruct ( private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterCapabilityMinimaStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { tlvReader.enterStructure(tlvTag) - val caseSessionsPerFabric = tlvReader.getUInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) - val subscriptionsPerFabric = tlvReader.getUInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) - + val caseSessionsPerFabric = + tlvReader.getUInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) + val subscriptionsPerFabric = + tlvReader.getUInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + tlvReader.exitContainer() - return BasicInformationClusterCapabilityMinimaStruct(caseSessionsPerFabric, subscriptionsPerFabric) + return BasicInformationClusterCapabilityMinimaStruct( + caseSessionsPerFabric, + subscriptionsPerFabric + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt index 70231dae2482de..f9c7a87e4ae2b3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -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: UInt, - val primaryColor: UInt?) { - override fun toString(): String = buildString { +class BasicInformationClusterProductAppearanceStruct(val finish: UInt, val primaryColor: UInt?) { + override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -41,10 +35,10 @@ class BasicInformationClusterProductAppearanceStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -53,16 +47,17 @@ class BasicInformationClusterProductAppearanceStruct ( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BasicInformationClusterProductAppearanceStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tlvTag) val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 22f38dfda88ab4..6af724a96da922 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class BindingClusterTargetStruct( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") append("\tnode : $node\n") append("\tgroup : $group\n") @@ -46,21 +44,21 @@ class BindingClusterTargetStruct ( tlvWriter.apply { startStructure(tlvTag) if (node.isPresent) { - val optnode = node.get() - put(ContextSpecificTag(TAG_NODE), optnode) - } + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } if (group.isPresent) { - val optgroup = group.get() - put(ContextSpecificTag(TAG_GROUP), optgroup) - } + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } if (cluster.isPresent) { - val optcluster = cluster.get() - put(ContextSpecificTag(TAG_CLUSTER), optcluster) - } + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,30 +71,34 @@ class BindingClusterTargetStruct ( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BindingClusterTargetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { tlvReader.enterStructure(tlvTag) - val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_GROUP))) - } else { - Optional.empty() - } - val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER))) - } else { - Optional.empty() - } + val node = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt index 1e621011f29ab0..7e6542ac48b265 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -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: UInt, - val primaryColor: UInt?) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterProductAppearanceStruct( + val finish: UInt, + val primaryColor: UInt? +) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -41,10 +38,10 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -53,16 +50,20 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterProductAppearanceStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tlvTag) val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt index a443a05084d825..e9ab1a0fce105e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -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: UInt, - val minorNumber: UInt, - val name: Optional, - val callSign: Optional, - val affiliateCallSign: Optional) { - override fun toString(): String = buildString { +class ChannelClusterChannelInfoStruct( + val majorNumber: UInt, + val minorNumber: UInt, + 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(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterChannelInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { tlvReader.enterStructure(tlvTag) val majorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) val minorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MINOR_NUMBER)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val callSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) - } else { - Optional.empty() - } - val affiliateCallSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) - } else { - Optional.empty() - } - + val 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 8a7e7eaefa121e..5bbb480e3aebd0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class ChannelClusterLineupInfoStruct( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: UInt +) { + override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") append("\toperatorName : $operatorName\n") append("\tlineupName : $lineupName\n") @@ -45,13 +43,13 @@ class ChannelClusterLineupInfoStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) if (lineupName.isPresent) { - val optlineupName = lineupName.get() - put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) - } + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } if (postalCode.isPresent) { - val optpostalCode = postalCode.get() - put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) - } + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) endStructure() } @@ -63,21 +61,23 @@ class ChannelClusterLineupInfoStruct ( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ChannelClusterLineupInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { tlvReader.enterStructure(tlvTag) val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) - val lineupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) - } else { - Optional.empty() - } - val postalCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) - } else { - Optional.empty() - } + val lineupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } val lineupInfoType = tlvReader.getUInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) - + tlvReader.exitContainer() return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt index efa4a89a67a515..2cff417bf75909 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterAdditionalInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ContentLauncherClusterAdditionalInfoStruct(name, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 38a6ff2a22f926..76b440a23d980f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -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(tlvTag) put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) if (background.isPresent) { - val optbackground = background.get() - optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) - } + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } if (logo.isPresent) { - val optlogo = logo.get() - optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) - } + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } if (progressBar.isPresent) { - val optprogressBar = progressBar.get() - optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) - } + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } if (splash.isPresent) { - val optsplash = splash.get() - optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) - } + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } if (waterMark.isPresent) { - val optwaterMark = waterMark.get() - optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) - } + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } endStructure() } } @@ -80,38 +78,78 @@ class ContentLauncherClusterBrandingInformationStruct ( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterBrandingInformationStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ContentLauncherClusterBrandingInformationStruct { tlvReader.enterStructure(tlvTag) val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) - val background = if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_BACKGROUND), tlvReader)) - } else { - Optional.empty() - } - val logo = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_LOGO), tlvReader)) - } else { - Optional.empty() - } - val progressBar = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_PROGRESS_BAR), tlvReader)) - } else { - Optional.empty() - } - val splash = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_SPLASH), tlvReader)) - } else { - Optional.empty() - } - val waterMark = if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_WATER_MARK), tlvReader)) - } else { - Optional.empty() - } - + val background = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_BACKGROUND), + tlvReader + ) + ) + } else { + Optional.empty() + } + val logo = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_LOGO), + tlvReader + ) + ) + } else { + Optional.empty() + } + val progressBar = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_PROGRESS_BAR), + tlvReader + ) + ) + } else { + Optional.empty() + } + val splash = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_SPLASH), + tlvReader + ) + ) + } else { + Optional.empty() + } + val waterMark = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_WATER_MARK), + tlvReader + ) + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ContentLauncherClusterBrandingInformationStruct(providerName, background, logo, progressBar, splash, waterMark) + return ContentLauncherClusterBrandingInformationStruct( + providerName, + background, + logo, + progressBar, + splash, + waterMark + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt index f48fa7d4e69273..c75a249792a745 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterContentSearchStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { tlvReader.enterStructure(tlvTag) - val parameterList = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PARAMETER_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val parameterList = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PARAMETER_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ContentLauncherClusterContentSearchStruct(parameterList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index f5a5aa93f42065..ecfc7c75d7b8c3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class ContentLauncherClusterDimensionStruct( + val width: Double, + val height: Double, + val metric: UInt +) { + override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") append("\twidth : $width\n") append("\theight : $height\n") @@ -53,12 +50,12 @@ class ContentLauncherClusterDimensionStruct ( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterDimensionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { tlvReader.enterStructure(tlvTag) val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) val metric = tlvReader.getUInt(ContextSpecificTag(TAG_METRIC)) - + tlvReader.exitContainer() return ContentLauncherClusterDimensionStruct(width, height, metric) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt index dae943a5b0f095..f2c145c040c253 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -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: UInt, - val value: String, - val externalIDList: Optional>) { - override fun toString(): String = buildString { +class ContentLauncherClusterParameterStruct( + val type: UInt, + val value: String, + val externalIDList: Optional> +) { + override fun toString(): String = buildString { append("ContentLauncherClusterParameterStruct {\n") append("\ttype : $type\n") append("\tvalue : $value\n") @@ -44,13 +43,13 @@ class ContentLauncherClusterParameterStruct ( put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) + val optexternalIDList = externalIDList.get() + startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() } - endArray() - } endStructure() } } @@ -60,22 +59,25 @@ class ContentLauncherClusterParameterStruct ( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterParameterStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { tlvReader.enterStructure(tlvTag) val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { - Optional.of(buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - + val externalIDList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterParameterStruct(type, value, externalIDList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt index 76c4d87e0c3e1f..a6ee4223a61498 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -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(tlvTag) if (imageURL.isPresent) { - val optimageURL = imageURL.get() - put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) - } + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } if (color.isPresent) { - val optcolor = color.get() - put(ContextSpecificTag(TAG_COLOR), optcolor) - } + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } if (size.isPresent) { - val optsize = size.get() - optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) - } + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } endStructure() } } @@ -62,24 +60,29 @@ class ContentLauncherClusterStyleInformationStruct ( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ContentLauncherClusterStyleInformationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { tlvReader.enterStructure(tlvTag) - val imageURL = if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) - } else { - Optional.empty() - } - val color = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) - } else { - Optional.empty() - } - val size = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { - Optional.of(ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader)) - } else { - Optional.empty() - } - + val imageURL = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of( + ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt index 5c70ab39c786ca..bea6ea0160ea02 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -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: ULong, - val revision: UInt) { - override fun toString(): String = buildString { +class DescriptorClusterDeviceTypeStruct(val deviceType: ULong, val revision: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : DescriptorClusterDeviceTypeStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { tlvReader.enterStructure(tlvTag) val deviceType = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) val revision = tlvReader.getUInt(ContextSpecificTag(TAG_REVISION)) - + tlvReader.exitContainer() return DescriptorClusterDeviceTypeStruct(deviceType, revision) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt index 2a94cdd6e3403e..89ae4aeaa6191e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -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: UInt?, - val namespaceID: UInt, - val tag: UInt, - val label: Optional?) { - override fun toString(): String = buildString { +class DescriptorClusterSemanticTagStruct( + val mfgCode: UInt?, + val namespaceID: UInt, + val tag: UInt, + val label: Optional? +) { + override fun toString(): String = buildString { append("DescriptorClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tnamespaceID : $namespaceID\n") @@ -44,20 +42,20 @@ class DescriptorClusterSemanticTagStruct ( tlvWriter.apply { startStructure(tlvTag) if (mfgCode != null) { - put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) - } else { - putNull(ContextSpecificTag(TAG_MFG_CODE)) - } + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) put(ContextSpecificTag(TAG_TAG), tag) if (label != null) { - if (label.isPresent) { - val optlabel = label.get() - put(ContextSpecificTag(TAG_LABEL), optlabel) - } - } else { - putNull(ContextSpecificTag(TAG_LABEL)) - } + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } endStructure() } } @@ -68,27 +66,29 @@ class DescriptorClusterSemanticTagStruct ( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DescriptorClusterSemanticTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) - null - } + val mfgCode = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } val namespaceID = tlvReader.getUInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) val tag = tlvReader.getUInt(ContextSpecificTag(TAG_TAG)) - val label = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) - null - } - + val label = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + tlvReader.exitContainer() return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt index 06e9045da7843f..4fe2dc62c81d63 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -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: UInt, - val modeTags: List) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeOptionStruct( + val label: String, + val mode: UInt, + val modeTags: List +) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class DishwasherModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 728f716e623fed..8dafa12406c31a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + 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(tlvTag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class DishwasherModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DishwasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt index 41b003e3ed4901..7be75f6514b061 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -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: UInt, - val credentialIndex: UInt) { - override fun toString(): String = buildString { +class DoorLockClusterCredentialStruct(val credentialType: UInt, val credentialIndex: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : DoorLockClusterCredentialStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { tlvReader.enterStructure(tlvTag) val credentialType = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) val credentialIndex = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) - + tlvReader.exitContainer() return DoorLockClusterCredentialStruct(credentialType, credentialIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt index 3ee075b8be9516..9dec1ea651c3d1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : FixedLabelClusterLabelStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return FixedLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt index 0b1a74471fb37f..d48e8ea6bc0a94 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -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: UInt, - val maxCumulativeFailsafeSeconds: UInt) { - override fun toString(): String = buildString { +class GeneralCommissioningClusterBasicCommissioningInfo( + val failSafeExpiryLengthSeconds: UInt, + val maxCumulativeFailsafeSeconds: UInt +) { + override fun toString(): String = buildString { append("GeneralCommissioningClusterBasicCommissioningInfo {\n") append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") @@ -49,14 +46,22 @@ class GeneralCommissioningClusterBasicCommissioningInfo ( private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GeneralCommissioningClusterBasicCommissioningInfo { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralCommissioningClusterBasicCommissioningInfo { tlvReader.enterStructure(tlvTag) - val failSafeExpiryLengthSeconds = tlvReader.getUInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) - val maxCumulativeFailsafeSeconds = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) - + val failSafeExpiryLengthSeconds = + tlvReader.getUInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = + tlvReader.getUInt(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 abfc052150aef5..69d00dd8ef95cd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -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: UInt) { - 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: UInt +) { + 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) startArray(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(tlvTag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkInterface { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) - val offPremiseServicesReachableIPv4 = if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - null - } - val offPremiseServicesReachableIPv6 = if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - null - } + val offPremiseServicesReachableIPv4 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) - val IPv4Addresses = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val IPv6Addresses = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } + val IPv4Addresses = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) - + tlvReader.exitContainer() - return GeneralDiagnosticsClusterNetworkInterface(name, isOperational, offPremiseServicesReachableIPv4, offPremiseServicesReachableIPv6, hardwareAddress, IPv4Addresses, IPv6Addresses, type) + return GeneralDiagnosticsClusterNetworkInterface( + name, + isOperational, + offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, + hardwareAddress, + IPv4Addresses, + IPv6Addresses, + type + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt index fdc4e27f091541..e9ba1255eae399 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -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: UInt, - val endpoints: List, - val groupName: Optional, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupInfoMapStruct( + val groupId: UInt, + val endpoints: List, + val groupName: Optional, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") append("\tgroupId : $groupId\n") append("\tendpoints : $endpoints\n") @@ -50,9 +49,9 @@ class GroupKeyManagementClusterGroupInfoMapStruct ( } endArray() if (groupName.isPresent) { - val optgroupName = groupName.get() - put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) - } + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -64,23 +63,25 @@ class GroupKeyManagementClusterGroupInfoMapStruct ( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupInfoMapStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { tlvReader.enterStructure(tlvTag) val groupId = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_ID)) - val endpoints = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val groupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) - } else { - Optional.empty() - } + val endpoints = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt index 5326b3459948a8..28d407c54abc97 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -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: UInt, - val groupKeySetID: UInt, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupKeyMapStruct( + val groupId: UInt, + val groupKeySetID: UInt, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") append("\tgroupId : $groupId\n") append("\tgroupKeySetID : $groupKeySetID\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeyMapStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { tlvReader.enterStructure(tlvTag) val groupId = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_ID)) val groupKeySetID = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt index 1dbb002c04dabc..1e08987ed4fbcb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -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: UInt, - val groupKeySecurityPolicy: UInt, - val epochKey0: ByteArray?, - val epochStartTime0: ULong?, - val epochKey1: ByteArray?, - val epochStartTime1: ULong?, - val epochKey2: ByteArray?, - val epochStartTime2: ULong?) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupKeySetStruct( + val groupKeySetID: UInt, + val groupKeySecurityPolicy: UInt, + val epochKey0: ByteArray?, + val epochStartTime0: ULong?, + val epochKey1: ByteArray?, + val epochStartTime1: ULong?, + val epochKey2: ByteArray?, + val epochStartTime2: ULong? +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeySetStruct {\n") append("\tgroupKeySetID : $groupKeySetID\n") append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeySetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { tlvReader.enterStructure(tlvTag) val groupKeySetID = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val groupKeySecurityPolicy = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) - val epochKey0 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - null - } - val epochStartTime0 = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - null - } - val epochKey1 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - null - } - val epochStartTime1 = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - null - } - val epochKey2 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - null - } - val epochStartTime2 = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - null - } - + val groupKeySecurityPolicy = + tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + tlvReader.exitContainer() - return GroupKeyManagementClusterGroupKeySetStruct(groupKeySetID, groupKeySecurityPolicy, epochKey0, epochStartTime0, epochKey1, epochStartTime1, epochKey2, epochStartTime2) + return GroupKeyManagementClusterGroupKeySetStruct( + groupKeySetID, + groupKeySecurityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2 + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt index 08295de43d86e7..aa6e5b87ff95b1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -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: UInt, - val productIdentifierValue: String) { - override fun toString(): String = buildString { +class HepaFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: UInt, + 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(tlvTag: Tag, tlvReader: TlvReader) : HepaFilterMonitoringClusterReplacementProductStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): HepaFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tlvTag) val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return HepaFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) + return HepaFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt index 26b3dcdbf0eae3..88ff61a3be4864 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,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 IcdManagementClusterMonitoringRegistrationStruct ( - val checkInNodeID: ULong, - val monitoredSubject: ULong, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class IcdManagementClusterMonitoringRegistrationStruct( + val checkInNodeID: ULong, + val monitoredSubject: ULong, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") append("\tcheckInNodeID : $checkInNodeID\n") append("\tmonitoredSubject : $monitoredSubject\n") @@ -53,15 +50,22 @@ class IcdManagementClusterMonitoringRegistrationStruct ( private const val TAG_MONITORED_SUBJECT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : IcdManagementClusterMonitoringRegistrationStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): IcdManagementClusterMonitoringRegistrationStruct { tlvReader.enterStructure(tlvTag) val checkInNodeID = tlvReader.getULong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) val monitoredSubject = tlvReader.getULong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return IcdManagementClusterMonitoringRegistrationStruct(checkInNodeID, monitoredSubject, fabricIndex) + return IcdManagementClusterMonitoringRegistrationStruct( + checkInNodeID, + monitoredSubject, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt index 6461e74137fc31..1d38d4b031dbac 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -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: UInt, - val modeTags: List) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeOptionStruct( + val label: String, + val mode: UInt, + val modeTags: List +) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class LaundryWasherModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index 63451c1b326894..4449be2667b1a7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + 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(tlvTag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class LaundryWasherModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return LaundryWasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt index 63828ffe9f1aa7..2d2cd6c03d40e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -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: UInt, - val inputType: UInt, - val name: String, - val description: String) { - override fun toString(): String = buildString { +class MediaInputClusterInputInfoStruct( + val index: UInt, + val inputType: UInt, + val name: String, + val description: String +) { + override fun toString(): String = buildString { append("MediaInputClusterInputInfoStruct {\n") append("\tindex : $index\n") append("\tinputType : $inputType\n") @@ -57,13 +54,13 @@ class MediaInputClusterInputInfoStruct ( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaInputClusterInputInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { tlvReader.enterStructure(tlvTag) val index = tlvReader.getUInt(ContextSpecificTag(TAG_INDEX)) val inputType = tlvReader.getUInt(ContextSpecificTag(TAG_INPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) - + tlvReader.exitContainer() return MediaInputClusterInputInfoStruct(index, inputType, name, description) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt index 14e2129b4d2a4e..576732fe7efbdc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -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: ULong, - val position: ULong?) { - override fun toString(): String = buildString { +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: ULong, val position: ULong?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") append("\tposition : $position\n") @@ -41,10 +35,10 @@ class MediaPlaybackClusterPlaybackPositionStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) if (position != null) { - put(ContextSpecificTag(TAG_POSITION), position) - } else { - putNull(ContextSpecificTag(TAG_POSITION)) - } + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } endStructure() } } @@ -53,16 +47,17 @@ class MediaPlaybackClusterPlaybackPositionStruct ( private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterPlaybackPositionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { tlvReader.enterStructure(tlvTag) val updatedAt = tlvReader.getULong(ContextSpecificTag(TAG_UPDATED_AT)) - val position = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_POSITION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) - null - } - + val position = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt index 04a4958111b07c..6de2b3fc5eccae 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -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: UInt, - val semanticTags: List) { - override fun toString(): String = buildString { +class ModeSelectClusterModeOptionStruct( + val label: String, + val mode: UInt, + val semanticTags: List +) { + override fun toString(): String = buildString { append("ModeSelectClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class ModeSelectClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ModeSelectClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val semanticTags = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val semanticTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index bc14eaaa804081..5d079d3c72386d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -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: UInt, - val value: UInt) { - override fun toString(): String = buildString { +class ModeSelectClusterSemanticTagStruct(val mfgCode: UInt, val value: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : ModeSelectClusterSemanticTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { tlvReader.enterStructure(tlvTag) val mfgCode = tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ModeSelectClusterSemanticTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index 721bf896142652..61816cf54bafc1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterNetworkInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tlvTag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) - + 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 885472392f0a7f..e5695511fcb5fa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -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: UInt, - val extendedPanId: ULong, - val networkName: String, - val channel: UInt, - val version: UInt, - val extendedAddress: ByteArray, - val rssi: Int, - val lqi: UInt) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterThreadInterfaceScanResultStruct( + val panId: UInt, + val extendedPanId: ULong, + val networkName: String, + val channel: UInt, + val version: UInt, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: UInt +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") append("\tpanId : $panId\n") append("\textendedPanId : $extendedPanId\n") @@ -73,7 +70,10 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( private const val TAG_RSSI = 6 private const val TAG_LQI = 7 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterThreadInterfaceScanResultStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { tlvReader.enterStructure(tlvTag) val panId = tlvReader.getUInt(ContextSpecificTag(TAG_PAN_ID)) val extendedPanId = tlvReader.getULong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) @@ -83,10 +83,19 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) val lqi = tlvReader.getUInt(ContextSpecificTag(TAG_LQI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterThreadInterfaceScanResultStruct(panId, extendedPanId, networkName, channel, version, extendedAddress, rssi, lqi) + return NetworkCommissioningClusterThreadInterfaceScanResultStruct( + panId, + extendedPanId, + networkName, + channel, + version, + extendedAddress, + rssi, + lqi + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt index 76e4003d8194ea..099c8cd29eedaa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -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: UInt, - val ssid: ByteArray, - val bssid: ByteArray, - val channel: UInt, - val wiFiBand: UInt, - val rssi: Int) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + val security: UInt, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: UInt, + val wiFiBand: UInt, + val rssi: Int +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") append("\tsecurity : $security\n") append("\tssid : $ssid\n") @@ -65,7 +62,10 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( private const val TAG_WI_FI_BAND = 4 private const val TAG_RSSI = 5 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { tlvReader.enterStructure(tlvTag) val security = tlvReader.getUInt(ContextSpecificTag(TAG_SECURITY)) val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) @@ -73,10 +73,17 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( val channel = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL)) val wiFiBand = tlvReader.getUInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterWiFiInterfaceScanResultStruct(security, ssid, bssid, channel, wiFiBand, rssi) + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + security, + ssid, + bssid, + channel, + wiFiBand, + rssi + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt index b30a28a0163aea..06171f9ea565c5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -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: UInt, - val fabricID: ULong, - val nodeID: ULong, - val label: String, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class OperationalCredentialsClusterFabricDescriptorStruct( + val rootPublicKey: ByteArray, + val vendorID: UInt, + val fabricID: ULong, + val nodeID: ULong, + val label: String, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterFabricDescriptorStruct {\n") append("\trootPublicKey : $rootPublicKey\n") append("\tvendorID : $vendorID\n") @@ -65,7 +62,10 @@ class OperationalCredentialsClusterFabricDescriptorStruct ( private const val TAG_LABEL = 5 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterFabricDescriptorStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OperationalCredentialsClusterFabricDescriptorStruct { tlvReader.enterStructure(tlvTag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) val vendorID = tlvReader.getUInt(ContextSpecificTag(TAG_VENDOR_I_D)) @@ -73,10 +73,17 @@ class OperationalCredentialsClusterFabricDescriptorStruct ( val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OperationalCredentialsClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) + return OperationalCredentialsClusterFabricDescriptorStruct( + rootPublicKey, + vendorID, + fabricID, + nodeID, + label, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt index 84f85f01a301ac..76c1abd111fb76 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class OperationalCredentialsClusterNOCStruct( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") append("\tnoc : $noc\n") append("\ticac : $icac\n") @@ -43,10 +40,10 @@ class OperationalCredentialsClusterNOCStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_NOC), noc) if (icac != null) { - put(ContextSpecificTag(TAG_ICAC), icac) - } else { - putNull(ContextSpecificTag(TAG_ICAC)) - } + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -57,17 +54,18 @@ class OperationalCredentialsClusterNOCStruct ( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterNOCStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { tlvReader.enterStructure(tlvTag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) - val icac = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) - null - } + val icac = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt index fd51accba75c20..bdd7558c9572b0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -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: UInt, - val errorStateLabel: Optional, - val errorStateDetails: Optional) { - override fun toString(): String = buildString { +class OperationalStateClusterErrorStateStruct( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { append("OperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -43,13 +41,13 @@ class OperationalStateClusterErrorStateStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -59,23 +57,29 @@ class OperationalStateClusterErrorStateStruct ( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterErrorStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tlvTag) val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) + return OperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt index abea091cebddf7..cb197a70929b8b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -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: UInt, - val operationalStateLabel: Optional) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalStateStruct( + val operationalStateID: UInt, + 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(tlvTag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -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(tlvTag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tlvTag) val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) + return OperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt index 01ebdada373f4b..e59e834d55286f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -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: ULong, - val endpoint: UInt, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterProviderLocation( + val providerNodeID: ULong, + val endpoint: UInt, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") append("\tproviderNodeID : $providerNodeID\n") append("\tendpoint : $endpoint\n") @@ -53,15 +50,22 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation ( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterProviderLocation { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterProviderLocation { tlvReader.enterStructure(tlvTag) val providerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterProviderLocation(providerNodeID, endpoint, fabricIndex) + return OtaSoftwareUpdateRequestorClusterProviderLocation( + providerNodeID, + endpoint, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt index 6c9b1ab8d85e02..a16cd7c3638134 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -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 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 +55,25 @@ class PowerSourceClusterBatChargeFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeType { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt index 144ffc0f719fbe..72e7980eed1316 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeType { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt index 859ee81cfb45cd..98cef72e23a74e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeType { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { tlvReader.enterStructure(tlvTag) - val current = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt index e580c638705af7..155dc5a6ee32c3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -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: UInt, - val modeTags: List) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + val label: String, + val mode: UInt, + val modeTags: List +) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,21 +55,34 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add( + RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct(label, mode, modeTags) + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + label, + mode, + modeTags + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt index b8917aec346b54..51b7fbc78a1efa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( + val mfgCode: Optional, + val value: UInt +) { + 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(tlvTag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +50,19 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt index 090d0722242245..0e3c822b3d5b50 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -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: UInt, - val modeTags: List) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeOptionStruct( + val label: String, + val mode: UInt, + val modeTags: List +) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class RvcCleanModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index eaaa72ee813e24..8114bd42d9d341 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + 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(tlvTag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class RvcCleanModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcCleanModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt index 48b7ef600ece0b..9faa885898732d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -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: UInt, - val errorStateLabel: Optional, - val errorStateDetails: Optional) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterErrorStateStruct( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -43,13 +41,13 @@ class RvcOperationalStateClusterErrorStateStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -59,23 +57,29 @@ class RvcOperationalStateClusterErrorStateStruct ( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterErrorStateStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tlvTag) val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) + return RvcOperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt index adec2514da701b..93e2c99c54fb6e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -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: UInt, - val operationalStateLabel: Optional) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalStateStruct( + val operationalStateID: UInt, + 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(tlvTag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -52,18 +50,25 @@ class RvcOperationalStateClusterOperationalStateStruct ( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalStateStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tlvTag) val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) + return RvcOperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt index 6d13a86822516f..9c3d65a6414288 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -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: UInt, - val modeTags: List) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeOptionStruct( + val label: String, + val mode: UInt, + val modeTags: List +) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class RvcRunModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeOptionStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index f88590563ba4c4..ecd32762d6f048 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -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: UInt) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + 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(tlvTag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class RvcRunModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeTagStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { tlvReader.enterStructure(tlvTag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcRunModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt index 9edcd9ef516f57..821cd4ad83eb2e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -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: ULong, - val attributeValue: ULong) { - override fun toString(): String = buildString { +class ScenesClusterAttributeValuePair(val attributeID: ULong, val attributeValue: ULong) { + 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(tlvTag: Tag, tlvReader: TlvReader) : ScenesClusterAttributeValuePair { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { tlvReader.enterStructure(tlvTag) val attributeID = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) - + tlvReader.exitContainer() 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 c549ca2222c40e..0b192a5cbe5696 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -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: ULong, - val attributeValueList: List) { - override fun toString(): String = buildString { +class ScenesClusterExtensionFieldSet( + val clusterID: ULong, + 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(tlvTag: Tag, tlvReader: TlvReader) : ScenesClusterExtensionFieldSet { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { tlvReader.enterStructure(tlvTag) val clusterID = tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER_I_D)) - val attributeValueList = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val attributeValueList = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt index 2ead0ac69656dd..6eefe0f5829d91 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -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: ULong, - val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterThreadMetricsStruct( + val id: ULong, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional +) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -47,21 +45,21 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct ( startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (stackFreeCurrent.isPresent) { - val optstackFreeCurrent = stackFreeCurrent.get() - put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) - } + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } if (stackFreeMinimum.isPresent) { - val optstackFreeMinimum = stackFreeMinimum.get() - put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) - } + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } if (stackSize.isPresent) { - val optstackSize = stackSize.get() - put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) - } + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } endStructure() } } @@ -73,33 +71,43 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct ( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterThreadMetricsStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { tlvReader.enterStructure(tlvTag) val id = tlvReader.getULong(ContextSpecificTag(TAG_ID)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val stackFreeCurrent = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) - } else { - Optional.empty() - } - val stackFreeMinimum = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) - } else { - Optional.empty() - } - val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_SIZE))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return SoftwareDiagnosticsClusterThreadMetricsStruct(id, name, stackFreeCurrent, stackFreeMinimum, stackSize) + return SoftwareDiagnosticsClusterThreadMetricsStruct( + id, + name, + stackFreeCurrent, + stackFreeMinimum, + stackSize + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt index cbacc6bd1e721e..beb8eba911cea8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -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: UInt, - val name: String) { - override fun toString(): String = buildString { +class TargetNavigatorClusterTargetInfoStruct(val identifier: UInt, 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(tlvTag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { tlvReader.enterStructure(tlvTag) val identifier = tlvReader.getUInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetInfoStruct(identifier, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt index e4b20dab2fbc6e..ac2926bc3078fd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -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: UInt, - val heatSetpoint: Int?, - val coolSetpoint: Int?) { - override fun toString(): String = buildString { +class ThermostatClusterThermostatScheduleTransition( + val transitionTime: UInt, + 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(tlvTag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (heatSetpoint != null) { - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - } else { - putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } if (coolSetpoint != null) { - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) - } else { - putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - } + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } endStructure() } } @@ -61,25 +58,31 @@ class ThermostatClusterThermostatScheduleTransition ( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThermostatClusterThermostatScheduleTransition { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { tlvReader.enterStructure(tlvTag) val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } 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 a4730358e08a91..b50edbd5966c03 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -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: ULong, - val age: ULong, - val rloc16: UInt, - val linkFrameCounter: ULong, - val mleFrameCounter: ULong, - val lqi: UInt, - val averageRssi: Int?, - val lastRssi: Int?, - val frameErrorRate: UInt, - val messageErrorRate: UInt, - val rxOnWhenIdle: Boolean, - val fullThreadDevice: Boolean, - val fullNetworkData: Boolean, - val isChild: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterNeighborTableStruct( + val extAddress: ULong, + val age: ULong, + val rloc16: UInt, + val linkFrameCounter: ULong, + val mleFrameCounter: ULong, + val lqi: UInt, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: UInt, + val messageErrorRate: UInt, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") append("\textAddress : $extAddress\n") append("\tage : $age\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNeighborTableStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { tlvReader.enterStructure(tlvTag) val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) val age = tlvReader.getULong(ContextSpecificTag(TAG_AGE)) @@ -113,28 +113,45 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( val linkFrameCounter = tlvReader.getULong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) val mleFrameCounter = tlvReader.getULong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) val lqi = tlvReader.getUInt(ContextSpecificTag(TAG_LQI)) - val averageRssi = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - null - } - val lastRssi = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) - null - } + val averageRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } val frameErrorRate = tlvReader.getUInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) val messageErrorRate = tlvReader.getUInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterNeighborTableStruct(extAddress, age, rloc16, linkFrameCounter, mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild) + return ThreadNetworkDiagnosticsClusterNeighborTableStruct( + extAddress, + age, + rloc16, + linkFrameCounter, + mleFrameCounter, + lqi, + averageRssi, + lastRssi, + frameErrorRate, + messageErrorRate, + rxOnWhenIdle, + fullThreadDevice, + fullNetworkData, + isChild + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt index cfa76108232c2a..64bbd5c45f591e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { tlvReader.enterStructure(tlvTag) - val activeTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) - val pendingTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val activeTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) - val extendedPanIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) - val meshLocalPrefixPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val extendedPanIdPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) - val securityPolicyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val securityPolicyPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents(activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent) + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + activeTimestampPresent, + pendingTimestampPresent, + masterKeyPresent, + networkNamePresent, + extendedPanIdPresent, + meshLocalPrefixPresent, + delayPresent, + panIdPresent, + channelPresent, + pskcPresent, + securityPolicyPresent, + channelMaskPresent + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt index 08b4a0183e6323..36f9e4eee806b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -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: ULong, - val rloc16: UInt, - val routerId: UInt, - val nextHop: UInt, - val pathCost: UInt, - val LQIIn: UInt, - val LQIOut: UInt, - val age: UInt, - val allocated: Boolean, - val linkEstablished: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterRouteTableStruct( + val extAddress: ULong, + val rloc16: UInt, + val routerId: UInt, + val nextHop: UInt, + val pathCost: UInt, + val LQIIn: UInt, + val LQIOut: UInt, + val age: UInt, + val allocated: Boolean, + val linkEstablished: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") append("\textAddress : $extAddress\n") append("\trloc16 : $rloc16\n") @@ -81,7 +78,10 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct ( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterRouteTableStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterRouteTableStruct { tlvReader.enterStructure(tlvTag) val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) @@ -93,10 +93,21 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct ( val age = tlvReader.getUInt(ContextSpecificTag(TAG_AGE)) val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterRouteTableStruct(extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, LQIOut, age, allocated, linkEstablished) + return ThreadNetworkDiagnosticsClusterRouteTableStruct( + extAddress, + rloc16, + routerId, + nextHop, + pathCost, + LQIIn, + LQIOut, + age, + allocated, + linkEstablished + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt index 6ee9582bd38d3b..cddaccafae391a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -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: UInt, - val flags: UInt) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: UInt, val flags: UInt) { + 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(tlvTag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterSecurityPolicy { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { tlvReader.enterStructure(tlvTag) val rotationTime = tlvReader.getUInt(ContextSpecificTag(TAG_ROTATION_TIME)) val flags = tlvReader.getUInt(ContextSpecificTag(TAG_FLAGS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt index 7833ffd4cd7c8f..15d797445b1c71 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -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: ULong, - val validUntil: ULong?) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterDSTOffsetStruct( + val offset: Long, + val validStarting: ULong, + val validUntil: ULong? +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") append("\toffset : $offset\n") append("\tvalidStarting : $validStarting\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTOffsetStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validStarting = tlvReader.getULong(ContextSpecificTag(TAG_VALID_STARTING)) - val validUntil = if (!tlvReader.isNull()) { - tlvReader.getULong(ContextSpecificTag(TAG_VALID_UNTIL)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) - null - } - + val validUntil = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + tlvReader.exitContainer() return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index 8a7fb06df9ab81..5d7997c44ac541 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -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: ULong, - val endpoint: UInt) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + val nodeID: ULong, + val endpoint: UInt +) { + 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(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { tlvReader.enterStructure(tlvTag) val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt index 2abb0b67cb8bad..c234edca338ea4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -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: ULong, - val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStruct( + val offset: Long, + val validAt: ULong, + val name: Optional +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStruct {\n") append("\toffset : $offset\n") append("\tvalidAt : $validAt\n") @@ -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(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validAt = tlvReader.getULong(ContextSpecificTag(TAG_VALID_AT)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt index 377f185513ced2..f6d3d1521650e0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -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: UInt, - val nodeID: ULong, - val endpoint: UInt) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTrustedTimeSourceStruct( + val fabricIndex: UInt, + val nodeID: ULong, + val endpoint: UInt +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") append("\tfabricIndex : $fabricIndex\n") append("\tnodeID : $nodeID\n") @@ -53,12 +50,15 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct ( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTrustedTimeSourceStruct { + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterTrustedTimeSourceStruct { tlvReader.enterStructure(tlvTag) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt index 4da96bd7212142..057c63e81e830b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterDoubleNestedStructList { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterDoubleNestedStructList { tlvReader.enterStructure(tlvTag) - val a = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_A)) - while(!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val a = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_A)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterDoubleNestedStructList(a) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index f42472b0945b9b..707133811b1ba8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -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: UInt, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct) { - override fun toString(): String = buildString { +class UnitTestingClusterNestedStruct( + val a: UInt, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct +) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -53,12 +50,12 @@ class UnitTestingClusterNestedStruct ( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { tlvReader.enterStructure(tlvTag) val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - + tlvReader.exitContainer() return UnitTestingClusterNestedStruct(a, b, c) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt index 48eec8fb8654d3..28a0567afcafeb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -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: UInt, - 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: UInt, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List +) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStructList {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -85,40 +83,44 @@ class UnitTestingClusterNestedStructList ( private const val TAG_F = 5 private const val TAG_G = 6 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStructList { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { tlvReader.enterStructure(tlvTag) val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - val d = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_D)) - while(!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val e = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_E)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getULong(AnonymousTag)) - } - tlvReader.exitContainer() - } - val f = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_F)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val g = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_G)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val d = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_D)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_E)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getULong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_F)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_G)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt index 500bc0cc7dcec1..2f901d99aa541d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -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: UInt?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, - val nullableString: String?, - val optionalString: Optional, - val nullableOptionalString: Optional?, - val nullableStruct: UnitTestingClusterSimpleStruct?, - val optionalStruct: Optional, - val nullableOptionalStruct: Optional?, - val nullableList: List?, - val optionalList: Optional>, - val nullableOptionalList: Optional>?) { - override fun toString(): String = buildString { +class UnitTestingClusterNullablesAndOptionalsStruct( + val nullableInt: UInt?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? +) { + override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") append("\tnullableInt : $nullableInt\n") append("\toptionalInt : $optionalInt\n") @@ -60,85 +59,85 @@ class UnitTestingClusterNullablesAndOptionalsStruct ( tlvWriter.apply { startStructure(tlvTag) if (nullableInt != null) { - put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_INT)) - } + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } if (optionalInt.isPresent) { - val optoptionalInt = optionalInt.get() - put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) - } + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } if (nullableOptionalInt != null) { - if (nullableOptionalInt.isPresent) { - val optnullableOptionalInt = nullableOptionalInt.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - } + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } if (nullableString != null) { - put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - } + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } if (optionalString.isPresent) { - val optoptionalString = optionalString.get() - put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) - } + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } if (nullableOptionalString != null) { - if (nullableOptionalString.isPresent) { - val optnullableOptionalString = nullableOptionalString.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - } + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } if (nullableStruct != null) { - nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - } + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } if (optionalStruct.isPresent) { - val optoptionalStruct = optionalStruct.get() - optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) - } + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } if (nullableOptionalStruct != null) { - if (nullableOptionalStruct.isPresent) { - val optnullableOptionalStruct = nullableOptionalStruct.get() - optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - } + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } if (nullableList != null) { - startArray(ContextSpecificTag(TAG_NULLABLE_LIST)) - for (item in nullableList.iterator()) { - put(AnonymousTag, item) + startArray(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) + } + endArray() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) } - endArray() - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - } if (optionalList.isPresent) { - val optoptionalList = optionalList.get() - startArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) - for (item in optoptionalList.iterator()) { - put(AnonymousTag, item) + val optoptionalList = optionalList.get() + startArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) + } + endArray() } - endArray() - } if (nullableOptionalList != null) { - if (nullableOptionalList.isPresent) { - val optnullableOptionalList = nullableOptionalList.get() - startArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - for (item in optnullableOptionalList.iterator()) { - put(AnonymousTag, item) + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) } - endArray() - } - } 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(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterNullablesAndOptionalsStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { tlvReader.enterStructure(tlvTag) - val nullableInt = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_INT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) - null - } - val optionalInt = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_INT))) - } else { - Optional.empty() - } - val nullableOptionalInt = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - null - } - val nullableString = if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - null - } - val optionalString = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) - } else { - Optional.empty() - } - val nullableOptionalString = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - null - } - val nullableStruct = if (!tlvReader.isNull()) { - UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - null - } - val optionalStruct = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { - Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), tlvReader)) - } else { - Optional.empty() - } - val nullableOptionalStruct = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { - Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), tlvReader)) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - null - } - val nullableList = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - null - } - val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { - Optional.of(buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - val nullableOptionalList = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { - Optional.of(buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - null - } - + val nullableInt = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = + if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = + if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + val nullableOptionalStruct = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val nullableOptionalList = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + tlvReader.exitContainer() - return UnitTestingClusterNullablesAndOptionalsStruct(nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList) + return UnitTestingClusterNullablesAndOptionalsStruct( + nullableInt, + optionalInt, + nullableOptionalInt, + nullableString, + optionalString, + nullableOptionalString, + nullableStruct, + optionalStruct, + nullableOptionalStruct, + nullableList, + optionalList, + nullableOptionalList + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt index 6138f5ebe9f221..e90689364d15e9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -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: UInt, - val b: Boolean, - val c: UInt, - val d: ByteArray, - val e: String, - val f: UInt, - val g: Float, - val h: Double) { - override fun toString(): String = buildString { +class UnitTestingClusterSimpleStruct( + val a: UInt, + val b: Boolean, + val c: UInt, + val d: ByteArray, + val e: String, + val f: UInt, + val g: Float, + val h: Double +) { + override fun toString(): String = buildString { append("UnitTestingClusterSimpleStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -73,7 +70,7 @@ class UnitTestingClusterSimpleStruct ( private const val TAG_G = 6 private const val TAG_H = 7 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterSimpleStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { tlvReader.enterStructure(tlvTag) val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) @@ -83,7 +80,7 @@ class UnitTestingClusterSimpleStruct ( val f = tlvReader.getUInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) - + tlvReader.exitContainer() return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index cb705c0fc151c9..9b0b230f042a9a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -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: UInt, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: UInt?, - val nullableOptionalFabricSensitiveInt8u: Optional?, - val fabricSensitiveCharString: String, - val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: UInt) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScoped( + val fabricSensitiveInt8u: UInt, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: UInt?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") @@ -53,22 +52,28 @@ class UnitTestingClusterTestFabricScoped ( startStructure(tlvTag) put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) if (optionalFabricSensitiveInt8u.isPresent) { - val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() - put(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), optoptionalFabricSensitiveInt8u) - } + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optoptionalFabricSensitiveInt8u + ) + } if (nullableFabricSensitiveInt8u != null) { - put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } if (nullableOptionalFabricSensitiveInt8u != null) { - if (nullableOptionalFabricSensitiveInt8u.isPresent) { - val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), optnullableOptionalFabricSensitiveInt8u) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - } + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optnullableOptionalFabricSensitiveInt8u + ) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) startArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) @@ -91,44 +96,66 @@ class UnitTestingClusterTestFabricScoped ( private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScoped { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { tlvReader.enterStructure(tlvTag) val fabricSensitiveInt8u = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) - val optionalFabricSensitiveInt8u = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - null - } - val nullableOptionalFabricSensitiveInt8u = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - null - } - val fabricSensitiveCharString = tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) - val fabricSensitiveStruct = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), tlvReader) - val fabricSensitiveInt8uList = buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } + val optionalFabricSensitiveInt8u = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + if ( + tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) { + Optional.of( + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = + tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), + tlvReader + ) + val fabricSensitiveInt8uList = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return UnitTestingClusterTestFabricScoped(fabricSensitiveInt8u, optionalFabricSensitiveInt8u, nullableFabricSensitiveInt8u, nullableOptionalFabricSensitiveInt8u, fabricSensitiveCharString, fabricSensitiveStruct, fabricSensitiveInt8uList, fabricIndex) + return UnitTestingClusterTestFabricScoped( + fabricSensitiveInt8u, + optionalFabricSensitiveInt8u, + nullableFabricSensitiveInt8u, + nullableOptionalFabricSensitiveInt8u, + fabricSensitiveCharString, + fabricSensitiveStruct, + fabricSensitiveInt8uList, + fabricIndex + ) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt index 17ac2a2b136982..117c953eabe830 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -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: ULong, - val member2: ByteArray) { - override fun toString(): String = buildString { +class UnitTestingClusterTestListStructOctet(val member1: ULong, 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(tlvTag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestListStructOctet { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { tlvReader.enterStructure(tlvTag) val member1 = tlvReader.getULong(ContextSpecificTag(TAG_MEMBER1)) val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) - + tlvReader.exitContainer() return UnitTestingClusterTestListStructOctet(member1, member2) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt index e6b1facef5bdaa..698f9e30607075 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -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(tlvTag: Tag, tlvReader: TlvReader) : UserLabelClusterLabelStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return UserLabelClusterLabelStruct(label, value) diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 618a2f2648e571..a808de2550e48f 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -1370,8 +1370,7 @@ - (void)test015_FailedSubscribeWithQueueAcrossShutdown clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { } - subscriptionEstablished:^() { - }]; + subscriptionEstablished:^() {}]; [self waitForExpectations:@[ errorExpectation ] timeout:60]; } @@ -1424,8 +1423,7 @@ - (void)test016_FailedSubscribeWithCacheReadDuringFailure clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { } - subscriptionEstablished:^() { - }]; + subscriptionEstablished:^() {}]; [self waitForExpectations:@[ errorExpectation ] timeout:60]; } @@ -1598,8 +1596,7 @@ - (void)test017_TestMTRDeviceBasics clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { } - subscriptionEstablished:^() { - }]; + subscriptionEstablished:^() {}]; [self waitForExpectations:@[ subscriptionDroppedExpectation ] timeout:60]; @@ -1674,8 +1671,7 @@ - (void)test018_SubscriptionErrorWhenNotResubscribing clientQueue:queue reportHandler:^(id _Nullable values, NSError * _Nullable error) { } - subscriptionEstablished:^() { - }]; + subscriptionEstablished:^() {}]; [self waitForExpectations:@[ errorExpectation ] timeout:60]; }