diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt index e926e70d861c20..338c93d265e2c2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlEntryChangedEvent( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlEntryChangedEvent ( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlEntryChangedEvent( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlEntryChangedEvent( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): AccessControlClusterAccessControlEntryChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = - if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct - .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryChangedEvent( - adminNodeID, - adminPasscodeID, - changeType, - latestValue, - fabricIndex - ) + return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt index e01b81cec705bb..064b86812956d4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionChangedEvent( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlExtensionChangedEvent ( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -44,21 +46,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -71,45 +73,32 @@ class AccessControlClusterAccessControlExtensionChangedEvent( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): AccessControlClusterAccessControlExtensionChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - null - } - val adminPasscodeID = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = - if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct - .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlExtensionChangedEvent( - adminNodeID, - adminPasscodeID, - changeType, - latestValue, - fabricIndex - ) + return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt index d2e375338f705d..167cdbeaebfee4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterActionFailedEvent( - val actionID: Int, - val invokeID: Long, - val newState: Int, - val error: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterActionFailedEvent ( + val actionID: Int, + val invokeID: Long, + val newState: Int, + val error: Int) { + override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -54,13 +57,13 @@ class ActionsClusterActionFailedEvent( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) val error = tlvReader.getInt(ContextSpecificTag(TAG_ERROR)) - + tlvReader.exitContainer() return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt index 05ad68aae272ea..cd461b0ff538ef 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -17,13 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterStateChangedEvent ( + val actionID: Int, + val invokeID: Long, + val newState: Int) { + override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -46,12 +53,12 @@ class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterStateChangedEvent { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) - + tlvReader.exitContainer() return ActionsClusterStateChangedEvent(actionID, invokeID, newState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt index 962ed26cddb40d..e45d705386325c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterLeaveEvent ( + val fabricIndex: Int) { + override fun toString(): String = buildString { append("BasicInformationClusterLeaveEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { companion object { private const val TAG_FABRIC_INDEX = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterLeaveEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BasicInformationClusterLeaveEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt index c40211aa617dcc..025e619be435d4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterReachableChangedEvent ( + val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolea companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt index 23082666b05cae..f0ab0ec9b2e99f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterStartUpEvent ( + val softwareVersion: Long) { + override fun toString(): String = buildString { append("BasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -40,10 +45,10 @@ class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt index a0ecfb76141580..8194ba7d1f742d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class BooleanStateClusterStateChangeEvent ( + val stateValue: Boolean) { + override fun toString(): String = buildString { append("BooleanStateClusterStateChangeEvent {\n") append("\tstateValue : $stateValue\n") append("}\n") @@ -40,10 +45,10 @@ class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { companion object { private const val TAG_STATE_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BooleanStateClusterStateChangeEvent { tlvReader.enterStructure(tag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) - + tlvReader.exitContainer() return BooleanStateClusterStateChangeEvent(stateValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt index e75b2f7af96f93..c66f3595c88152 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterReachableChangedEvent ( + val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -40,13 +45,10 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNew companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): BridgedDeviceBasicInformationClusterReachableChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt index 80c60be6847056..9b1e886926c1bd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterStartUpEvent ( + val softwareVersion: Long) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -40,10 +45,10 @@ class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt index 0b7206788e842a..b2a29696b191a8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DishwasherAlarmClusterNotifyEvent( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherAlarmClusterNotifyEvent ( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long) { + override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -54,13 +57,13 @@ class DishwasherAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherAlarmClusterNotifyEvent { tlvReader.enterStructure(tag) val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt index 6417fb85009e88..309eb4e52c29f2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterDoorLockAlarmEvent ( + val alarmCode: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorLockAlarmEvent {\n") append("\talarmCode : $alarmCode\n") append("}\n") @@ -40,10 +45,10 @@ class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { companion object { private const val TAG_ALARM_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorLockAlarmEvent { tlvReader.enterStructure(tag) val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) - + tlvReader.exitContainer() return DoorLockClusterDoorLockAlarmEvent(alarmCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt index d0b6acbe7ea227..05068118f56c59 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterDoorStateChangeEvent ( + val doorState: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorStateChangeEvent {\n") append("\tdoorState : $doorState\n") append("}\n") @@ -40,10 +45,10 @@ class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { companion object { private const val TAG_DOOR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorStateChangeEvent { tlvReader.enterStructure(tag) val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) - + tlvReader.exitContainer() return DoorLockClusterDoorStateChangeEvent(doorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt index 59e38fa054dd87..34dd208597b65e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -20,21 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DoorLockClusterLockOperationErrorEvent( - val lockOperationType: Int, - val operationSource: Int, - val operationError: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val credentials: - Optional>? -) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationErrorEvent ( + val lockOperationType: Int, + val operationSource: Int, + val operationError: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: Optional>?) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationErrorEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -53,32 +53,32 @@ class DoorLockClusterLockOperationErrorEvent( put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } endStructure() } } @@ -92,68 +92,49 @@ class DoorLockClusterLockOperationErrorEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_CREDENTIALS = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationErrorEvent { tlvReader.enterStructure(tag) val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) val operationError = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_ERROR)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationErrorEvent( - lockOperationType, - operationSource, - operationError, - userIndex, - fabricIndex, - sourceNode, - credentials - ) + return DoorLockClusterLockOperationErrorEvent(lockOperationType, operationSource, operationError, userIndex, fabricIndex, sourceNode, credentials) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt index 4fbf71082c7adc..d1f83b46c08222 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -20,20 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DoorLockClusterLockOperationEvent( - val lockOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val credentials: - Optional>? -) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationEvent ( + val lockOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: Optional>?) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -50,32 +50,32 @@ class DoorLockClusterLockOperationEvent( put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } endStructure() } } @@ -88,66 +88,48 @@ class DoorLockClusterLockOperationEvent( private const val TAG_SOURCE_NODE = 4 private const val TAG_CREDENTIALS = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationEvent { tlvReader.enterStructure(tag) val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationEvent( - lockOperationType, - operationSource, - userIndex, - fabricIndex, - sourceNode, - credentials - ) + return DoorLockClusterLockOperationEvent(lockOperationType, operationSource, userIndex, fabricIndex, sourceNode, credentials) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt index 6fc562b39959ff..c8b7dd9380bb7f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -17,21 +17,24 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterLockUserChangeEvent( - val lockDataType: Int, - val dataOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val dataIndex: Int? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterLockUserChangeEvent ( + val lockDataType: Int, + val dataOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val dataIndex: Int?) { + override fun toString(): String = buildString { append("DoorLockClusterLockUserChangeEvent {\n") append("\tlockDataType : $lockDataType\n") append("\tdataOperationType : $dataOperationType\n") @@ -50,25 +53,25 @@ class DoorLockClusterLockUserChangeEvent( put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (dataIndex != null) { - put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) - } else { - putNull(ContextSpecificTag(TAG_DATA_INDEX)) - } + put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) + } else { + putNull(ContextSpecificTag(TAG_DATA_INDEX)) + } endStructure() } } @@ -82,51 +85,39 @@ class DoorLockClusterLockUserChangeEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_DATA_INDEX = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockUserChangeEvent { tlvReader.enterStructure(tag) val lockDataType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) val dataOperationType = tlvReader.getInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val userIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val dataIndex = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) - null - } - + val userIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockUserChangeEvent( - lockDataType, - dataOperationType, - operationSource, - userIndex, - fabricIndex, - sourceNode, - dataIndex - ) + return DoorLockClusterLockUserChangeEvent(lockDataType, dataOperationType, operationSource, userIndex, fabricIndex, sourceNode, dataIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt index 3d743983f1a00f..79b58b0d67cdae 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterBootReasonEvent ( + val bootReason: Int) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterBootReasonEvent {\n") append("\tbootReason : $bootReason\n") append("}\n") @@ -40,10 +45,10 @@ class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { companion object { private const val TAG_BOOT_REASON = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterBootReasonEvent { tlvReader.enterStructure(tag) val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) - + tlvReader.exitContainer() return GeneralDiagnosticsClusterBootReasonEvent(bootReason) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt index 1287eba322b742..207d45c24e3c40 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterHardwareFaultChangeEvent( - val current: List, - val previous: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,25 +57,23 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterHardwareFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt index f9fc3cadc8b934..5fed1abd0f4c09 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterNetworkFaultChangeEvent( - val current: List, - val previous: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,25 +57,23 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt index 35daf8dd691bf5..7a0b4e386ca3f9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterRadioFaultChangeEvent( - val current: List, - val previous: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterRadioFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,25 +57,23 @@ class GeneralDiagnosticsClusterRadioFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterRadioFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt index 092e062784a118..8e0999dbb5eed6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class OperationalStateClusterOperationCompletionEvent( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional? -) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class OperationalStateClusterOperationCompletionEvent( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -65,39 +67,33 @@ class OperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return OperationalStateClusterOperationCompletionEvent( - completionErrorCode, - totalOperationalTime, - pausedTime - ) + return OperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt index b5623a0d701579..ef4633c2ffe087 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -17,15 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OperationalStateClusterOperationalErrorEvent( - val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalStateClusterOperationalErrorEvent ( + val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -42,14 +45,10 @@ class OperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = - chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( - ContextSpecificTag(TAG_ERROR_STATE), - tlvReader - ) - + val errorState = chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) + tlvReader.exitContainer() return OperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt index 8a82cbf93c9f1f..3e7ac690e0fbab 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( - val softwareVersion: Long, - val bytesDownloaded: Long, - val progressPercent: Int?, - val platformCode: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( + val softwareVersion: Long, + val bytesDownloaded: Long, + val progressPercent: Int?, + val platformCode: Long?) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tbytesDownloaded : $bytesDownloaded\n") @@ -43,15 +46,15 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) if (progressPercent != null) { - put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) - } else { - putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } + put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) + } else { + putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } if (platformCode != null) { - put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) - } else { - putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - } + put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) + } else { + putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + } endStructure() } } @@ -62,36 +65,26 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( private const val TAG_PROGRESS_PERCENT = 2 private const val TAG_PLATFORM_CODE = 3 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) - val progressPercent = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - null - } - val platformCode = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - null - } - + val progressPercent = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( - softwareVersion, - bytesDownloaded, - progressPercent, - platformCode - ) + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent(softwareVersion, bytesDownloaded, progressPercent, platformCode) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt index b0b075689fc3be..bcd1db0f6990bf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( - val previousState: Int, - val newState: Int, - val reason: Int, - val targetSoftwareVersion: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( + val previousState: Int, + val newState: Int, + val reason: Int, + val targetSoftwareVersion: Long?) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") append("\tpreviousState : $previousState\n") append("\tnewState : $newState\n") @@ -44,10 +47,10 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( put(ContextSpecificTag(TAG_NEW_STATE), newState) put(ContextSpecificTag(TAG_REASON), reason) if (targetSoftwareVersion != null) { - put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) - } else { - putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } + put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) + } else { + putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } endStructure() } } @@ -58,30 +61,21 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( private const val TAG_REASON = 2 private const val TAG_TARGET_SOFTWARE_VERSION = 3 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterStateTransitionEvent { tlvReader.enterStructure(tag) val previousState = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) val reason = tlvReader.getInt(ContextSpecificTag(TAG_REASON)) - val targetSoftwareVersion = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - null - } - + val targetSoftwareVersion = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( - previousState, - newState, - reason, - targetSoftwareVersion - ) + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent(previousState, newState, reason, targetSoftwareVersion) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt index ff1034ace97e31..96bb018c4e0bd0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( - val softwareVersion: Long, - val productID: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( + val softwareVersion: Long, + val productID: Int) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tproductID : $productID\n") @@ -46,14 +49,11 @@ class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( private const val TAG_SOFTWARE_VERSION = 0 private const val TAG_PRODUCT_I_D = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val productID = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_I_D)) - + tlvReader.exitContainer() return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt index c3eb0d1e658b56..eb8be2f538a999 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -20,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatChargeFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val pr private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt index c010184156ecb3..782fba2707b2f5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -20,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt index 8a06b36fba61d0..1906ef9014899d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -20,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterWiredFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previo private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt index c116f16ac73229..a67296515fc256 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RefrigeratorAlarmClusterNotifyEvent( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAlarmClusterNotifyEvent ( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long) { + override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -54,13 +57,13 @@ class RefrigeratorAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAlarmClusterNotifyEvent { tlvReader.enterStructure(tag) val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) - + tlvReader.exitContainer() return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt index c6afaa9750adf8..f43dd669cf87ca 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcOperationalStateClusterOperationCompletionEvent( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional? -) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationCompletionEvent ( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional?) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -41,21 +43,21 @@ class RvcOperationalStateClusterOperationCompletionEvent( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -65,42 +67,33 @@ class RvcOperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): RvcOperationalStateClusterOperationCompletionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) - val totalOperationalTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationCompletionEvent( - completionErrorCode, - totalOperationalTime, - pausedTime - ) + return RvcOperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt index bf6fed9817f60f..ee80a6e06fb3a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -17,15 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RvcOperationalStateClusterOperationalErrorEvent( - val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcOperationalStateClusterOperationalErrorEvent ( + val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -42,14 +45,10 @@ class RvcOperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = - chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( - ContextSpecificTag(TAG_ERROR_STATE), - tlvReader - ) - + val errorState = chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) + tlvReader.exitContainer() return RvcOperationalStateClusterOperationalErrorEvent(errorState) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt index 2bc948e2a667b1..0c2e543c57451c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterCOAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt index 19223606c4685d..6ddfb212cc0515 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt index 38e2fe872915f7..c3ada5b8d56ba2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt index ce2d9ad47341d0..a1b2573db15fb6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterLowBatteryEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterLowBatteryEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterLowBatteryEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt index 324a5d4461a225..01753b1e77aa97 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SmokeCoAlarmClusterSmokeAlarmEvent ( + val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -40,10 +45,10 @@ class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt index 50b455842e538f..1ae05ccf0043b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class SoftwareDiagnosticsClusterSoftwareFaultEvent( - val id: Long, - val name: Optional, - val faultRecording: Optional -) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterSoftwareFaultEvent ( + val id: Long, + val name: Optional, + val faultRecording: Optional) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -41,13 +43,13 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (faultRecording.isPresent) { - val optfaultRecording = faultRecording.get() - put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) - } + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } endStructure() } } @@ -57,22 +59,20 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterSoftwareFaultEvent { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val faultRecording = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt index 893412c1f25322..62973598b9aff5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterInitialPressEvent(val newPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterInitialPressEvent ( + val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterInitialPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterInitialPressEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterInitialPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterInitialPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt index 3fa420f46ddec3..d67e1ba0076ca9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterLongPressEvent(val newPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterLongPressEvent ( + val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterLongPressEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongPressEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt index eb90698fc735ab..c26312888c3d2d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterLongReleaseEvent(val previousPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterLongReleaseEvent ( + val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterLongReleaseEvent(val previousPosition: Int) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt index 81141e17424fbb..1e7eb6055668a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterMultiPressCompleteEvent( - val previousPosition: Int, - val totalNumberOfPressesCounted: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterMultiPressCompleteEvent ( + val previousPosition: Int, + val totalNumberOfPressesCounted: Int) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressCompleteEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") @@ -46,12 +49,11 @@ class SwitchClusterMultiPressCompleteEvent( private const val TAG_PREVIOUS_POSITION = 0 private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressCompleteEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - val totalNumberOfPressesCounted = - tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) - + val totalNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt index 11fab26fdfce8e..0500e314f696ef 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterMultiPressOngoingEvent( - val newPosition: Int, - val currentNumberOfPressesCounted: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterMultiPressOngoingEvent ( + val newPosition: Int, + val currentNumberOfPressesCounted: Int) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressOngoingEvent {\n") append("\tnewPosition : $newPosition\n") append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") @@ -46,12 +49,11 @@ class SwitchClusterMultiPressOngoingEvent( private const val TAG_NEW_POSITION = 0 private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterMultiPressOngoingEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - val currentNumberOfPressesCounted = - tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) - + val currentNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt index 0eeb9e2841fd7c..5d3e2f26c7fd0c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterShortReleaseEvent(val previousPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterShortReleaseEvent ( + val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterShortReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterShortReleaseEvent(val previousPosition: Int) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterShortReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterShortReleaseEvent(previousPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt index 2b921b37ac6c2b..ec54e50aae31af 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class SwitchClusterSwitchLatchedEvent ( + val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterSwitchLatchedEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -40,10 +45,10 @@ class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterSwitchLatchedEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterSwitchLatchedEvent(newPosition) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt index ffdc72b1e54c89..cca6b8f8499a17 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( + val connectionStatus: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -40,13 +45,10 @@ class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt index f9110c39fa1d40..ef103a4821a3e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( - val current: List, - val previous: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -55,28 +57,23 @@ class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt index 53090f750b4e06..b66f227f0d07fe 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterDSTStatusEvent ( + val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTStatusEvent {\n") append("\tDSTOffsetActive : $DSTOffsetActive\n") append("}\n") @@ -40,10 +45,10 @@ class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { companion object { private const val TAG_D_S_T_OFFSET_ACTIVE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTStatusEvent { tlvReader.enterStructure(tag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) - + tlvReader.exitContainer() return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt index 452e9d902c4767..2ccb1685646258 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStatusEvent ( + val offset: Long, + val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") append("\toffset : $offset\n") append("\tname : $name\n") @@ -36,9 +41,9 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: startStructure(tag) put(ContextSpecificTag(TAG_OFFSET), offset) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -47,16 +52,15 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: private const val TAG_OFFSET = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStatusEvent { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt index 8c2e410ab80f6d..1787e26580dba6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -20,18 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestEventEvent( - val arg1: Int, - val arg2: Int, - val arg3: Boolean, - val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, - val arg5: List, - val arg6: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestEventEvent ( + val arg1: Int, + val arg2: Int, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List) { + override fun toString(): String = buildString { append("UnitTestingClusterTestEventEvent {\n") append("\targ1 : $arg1\n") append("\targ2 : $arg2\n") @@ -71,38 +73,27 @@ class UnitTestingClusterTestEventEvent( private const val TAG_ARG5 = 5 private const val TAG_ARG6 = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestEventEvent { tlvReader.enterStructure(tag) val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) - val arg4 = - chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_ARG4), - tlvReader - ) - val arg5 = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) - while (!tlvReader.isEndOfContainer()) { - this.add( - chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - val arg6 = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) - while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_ARG4), tlvReader) + val arg5 = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + while(!tlvReader.isEndOfContainer()) { + this.add(chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val arg6 = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + while(!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt index d746c65d5ea1f1..1995cf80a3b1fc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestFabricScopedEventEvent ( + val fabricIndex: Int) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScopedEventEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,10 +45,10 @@ class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { companion object { private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScopedEventEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt index 087484ef1bfa7b..5db782d0005a54 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( - val associationFailure: Int, - val status: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( + val associationFailure: Int, + val status: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") append("\tassociationFailure : $associationFailure\n") append("\tstatus : $status\n") @@ -46,14 +49,11 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( private const val TAG_ASSOCIATION_FAILURE = 0 private const val TAG_STATUS = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tag) val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt index 3599597c99b152..762339bde4f556 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( + val connectionStatus: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -40,13 +45,10 @@ class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: I companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt index 6d54ae4f2bfdcd..2a702882f2557a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -17,13 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( + val reasonCode: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") @@ -40,10 +45,10 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterDisconnectionEvent { tlvReader.enterStructure(tag) val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt index 6daac4451c1833..a526275e085718 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -20,17 +20,19 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlEntryStruct( - val privilege: Int, - val authMode: Int, - val subjects: List?, - val targets: List?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlEntryStruct ( + val privilege: Int, + val authMode: Int, + val subjects: List?, + val targets: List?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryStruct {\n") append("\tprivilege : $privilege\n") append("\tauthMode : $authMode\n") @@ -46,23 +48,23 @@ class AccessControlClusterAccessControlEntryStruct( put(ContextSpecificTag(TAG_PRIVILEGE), privilege) put(ContextSpecificTag(TAG_AUTH_MODE), authMode) if (subjects != null) { - startList(ContextSpecificTag(TAG_SUBJECTS)) - for (item in subjects.iterator()) { - put(AnonymousTag, item) - } - endList() - } else { - putNull(ContextSpecificTag(TAG_SUBJECTS)) + startList(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) } + endList() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) + } if (targets != null) { - startList(ContextSpecificTag(TAG_TARGETS)) - for (item in targets.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() - } else { - putNull(ContextSpecificTag(TAG_TARGETS)) + startList(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -75,47 +77,39 @@ class AccessControlClusterAccessControlEntryStruct( private const val TAG_TARGETS = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryStruct { tlvReader.enterStructure(tag) val privilege = tlvReader.getInt(ContextSpecificTag(TAG_PRIVILEGE)) val authMode = tlvReader.getInt(ContextSpecificTag(TAG_AUTH_MODE)) - val subjects = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) - null - } - val targets = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) - while (!tlvReader.isEndOfContainer()) { - add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) - null - } + val subjects = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + while(!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryStruct( - privilege, - authMode, - subjects, - targets, - fabricIndex - ) + return AccessControlClusterAccessControlEntryStruct(privilege, authMode, subjects, targets, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt index 4a1d95221d816c..9b832daa283b9f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlExtensionStruct ( + val data: ByteArray, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") append("\tfabricIndex : $fabricIndex\n") @@ -43,11 +49,11 @@ class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionStruct { tlvReader.enterStructure(tag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt index e721aa3fefe91d..8070aecfe241b5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlTargetStruct( - val cluster: Long?, - val endpoint: Int?, - val deviceType: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class AccessControlClusterAccessControlTargetStruct ( + val cluster: Long?, + val endpoint: Int?, + val deviceType: Long?) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") append("\tcluster : $cluster\n") append("\tendpoint : $endpoint\n") @@ -39,20 +42,20 @@ class AccessControlClusterAccessControlTargetStruct( tlvWriter.apply { startStructure(tag) if (cluster != null) { - put(ContextSpecificTag(TAG_CLUSTER), cluster) - } else { - putNull(ContextSpecificTag(TAG_CLUSTER)) - } + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } if (endpoint != null) { - put(ContextSpecificTag(TAG_ENDPOINT), endpoint) - } else { - putNull(ContextSpecificTag(TAG_ENDPOINT)) - } + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } if (deviceType != null) { - put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) - } else { - putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - } + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } endStructure() } } @@ -62,30 +65,27 @@ class AccessControlClusterAccessControlTargetStruct( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlTargetStruct { tlvReader.enterStructure(tag) - val cluster = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) - null - } - val endpoint = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) - null - } - val deviceType = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - null - } - + val cluster = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + tlvReader.exitContainer() return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt index 2ed7a3f08152be..9dc8c67a270df1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -17,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterActionStruct( - val actionID: Int, - val name: String, - val type: Int, - val endpointListID: Int, - val supportedCommands: Int, - val state: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterActionStruct ( + val actionID: Int, + val name: String, + val type: Int, + val endpointListID: Int, + val supportedCommands: Int, + val state: Int) { + override fun toString(): String = buildString { append("ActionsClusterActionStruct {\n") append("\tactionID : $actionID\n") append("\tname : $name\n") @@ -62,7 +65,7 @@ class ActionsClusterActionStruct( private const val TAG_SUPPORTED_COMMANDS = 4 private const val TAG_STATE = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionStruct { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) @@ -70,17 +73,10 @@ class ActionsClusterActionStruct( val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val supportedCommands = tlvReader.getInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) val state = tlvReader.getInt(ContextSpecificTag(TAG_STATE)) - + tlvReader.exitContainer() - return ActionsClusterActionStruct( - actionID, - name, - type, - endpointListID, - supportedCommands, - state - ) + return ActionsClusterActionStruct(actionID, name, type, endpointListID, supportedCommands, state) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt index b714e693156957..5d46b079c5e9bf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -20,16 +20,18 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterEndpointListStruct( - val endpointListID: Int, - val name: String, - val type: Int, - val endpoints: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActionsClusterEndpointListStruct ( + val endpointListID: Int, + val name: String, + val type: Int, + val endpoints: List) { + override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") append("\tendpointListID : $endpointListID\n") append("\tname : $name\n") @@ -59,20 +61,19 @@ class ActionsClusterEndpointListStruct( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterEndpointListStruct { tlvReader.enterStructure(tag) val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - val endpoints = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val endpoints = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt index 68a44d37dfff0f..f4f298dadf0fcc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( + val productIdentifierType: Int, + val productIdentifierValue: String) { + override fun toString(): String = buildString { append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -46,21 +49,14 @@ class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt index 21649a8ecc73df..aa1effe8df43cd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ApplicationBasicClusterApplicationStruct( - val catalogVendorID: Int, - val applicationID: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationBasicClusterApplicationStruct ( + val catalogVendorID: Int, + val applicationID: String) { + override fun toString(): String = buildString { append("ApplicationBasicClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -46,11 +49,11 @@ class ApplicationBasicClusterApplicationStruct( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationBasicClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt index f710204737cb52..cf701fb6c1a094 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ApplicationLauncherClusterApplicationEPStruct( - val application: ApplicationLauncherClusterApplicationStruct, - val endpoint: Optional -) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationEPStruct ( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationEPStruct {\n") append("\tapplication : $application\n") append("\tendpoint : $endpoint\n") @@ -39,9 +41,9 @@ class ApplicationLauncherClusterApplicationEPStruct( startStructure(tag) application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } endStructure() } } @@ -50,20 +52,15 @@ class ApplicationLauncherClusterApplicationEPStruct( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationEPStruct { tlvReader.enterStructure(tag) - val application = - ApplicationLauncherClusterApplicationStruct.fromTlv( - ContextSpecificTag(TAG_APPLICATION), - tlvReader - ) - val endpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - + val application = ApplicationLauncherClusterApplicationStruct.fromTlv(ContextSpecificTag(TAG_APPLICATION), tlvReader) + val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt index 68e78e31084c04..b9b7f772372d19 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ApplicationLauncherClusterApplicationStruct( - val catalogVendorID: Int, - val applicationID: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ApplicationLauncherClusterApplicationStruct ( + val catalogVendorID: Int, + val applicationID: String) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -46,11 +49,11 @@ class ApplicationLauncherClusterApplicationStruct( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt index aef8596f19a83c..028781fa7acfb5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -17,13 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class AudioOutputClusterOutputInfoStruct ( + val index: Int, + val outputType: Int, + val name: String) { + override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") append("\toutputType : $outputType\n") @@ -46,12 +53,12 @@ class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, va private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : AudioOutputClusterOutputInfoStruct { tlvReader.enterStructure(tag) val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) val outputType = tlvReader.getInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return AudioOutputClusterOutputInfoStruct(index, outputType, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt index e4f323b6321541..8a58e9a242ed40 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterCapabilityMinimaStruct( - val caseSessionsPerFabric: Int, - val subscriptionsPerFabric: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterCapabilityMinimaStruct ( + val caseSessionsPerFabric: Int, + val subscriptionsPerFabric: Int) { + override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") @@ -46,18 +49,14 @@ class BasicInformationClusterCapabilityMinimaStruct( private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterCapabilityMinimaStruct { tlvReader.enterStructure(tag) val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) - val subscriptionsPerFabric = - tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) - + val subscriptionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + tlvReader.exitContainer() - return BasicInformationClusterCapabilityMinimaStruct( - caseSessionsPerFabric, - subscriptionsPerFabric - ) + return BasicInformationClusterCapabilityMinimaStruct(caseSessionsPerFabric, subscriptionsPerFabric) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt index 3678494c7b90fb..e01685c44e3566 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { - override fun toString(): String = buildString { +import java.util.Optional + +class BasicInformationClusterProductAppearanceStruct ( + val finish: Int, + val primaryColor: Int?) { + override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -35,10 +41,10 @@ class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primar startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -47,17 +53,16 @@ class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primar private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 8ab0146b8e95f3..861ebbd1875f58 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class BindingClusterTargetStruct( - val node: Optional, - val group: Optional, - val endpoint: Optional, - val cluster: Optional, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +class BindingClusterTargetStruct ( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") append("\tnode : $node\n") append("\tgroup : $group\n") @@ -44,21 +46,21 @@ class BindingClusterTargetStruct( tlvWriter.apply { startStructure(tag) if (node.isPresent) { - val optnode = node.get() - put(ContextSpecificTag(TAG_NODE), optnode) - } + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } if (group.isPresent) { - val optgroup = group.get() - put(ContextSpecificTag(TAG_GROUP), optgroup) - } + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } if (cluster.isPresent) { - val optcluster = cluster.get() - put(ContextSpecificTag(TAG_CLUSTER), optcluster) - } + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -71,34 +73,30 @@ class BindingClusterTargetStruct( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BindingClusterTargetStruct { tlvReader.enterStructure(tag) - val node = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - val group = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) - } else { - Optional.empty() - } - val endpoint = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - val cluster = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) - } else { - Optional.empty() - } + val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt index d1426bc0828631..778935a86e9455 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterProductAppearanceStruct( - val finish: Int, - val primaryColor: Int? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( + val finish: Int, + val primaryColor: Int?) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -38,10 +41,10 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -50,20 +53,16 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt index 9d10bf6f24e5fa..acfddff56c75cb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ChannelClusterChannelInfoStruct( - val majorNumber: Int, - val minorNumber: Int, - val name: Optional, - val callSign: Optional, - val affiliateCallSign: Optional -) { - override fun toString(): String = buildString { +class ChannelClusterChannelInfoStruct ( + val majorNumber: Int, + val minorNumber: Int, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional) { + override fun toString(): String = buildString { append("ChannelClusterChannelInfoStruct {\n") append("\tmajorNumber : $majorNumber\n") append("\tminorNumber : $minorNumber\n") @@ -46,17 +48,17 @@ class ChannelClusterChannelInfoStruct( put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (callSign.isPresent) { - val optcallSign = callSign.get() - put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) - } + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } if (affiliateCallSign.isPresent) { - val optaffiliateCallSign = affiliateCallSign.get() - put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) - } + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } endStructure() } } @@ -68,38 +70,29 @@ class ChannelClusterChannelInfoStruct( private const val TAG_CALL_SIGN = 3 private const val TAG_AFFILIATE_CALL_SIGN = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterChannelInfoStruct { tlvReader.enterStructure(tag) val majorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) val minorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MINOR_NUMBER)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val callSign = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) - } else { - Optional.empty() - } - val affiliateCallSign = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ChannelClusterChannelInfoStruct( - majorNumber, - minorNumber, - name, - callSign, - affiliateCallSign - ) + return ChannelClusterChannelInfoStruct(majorNumber, minorNumber, name, callSign, affiliateCallSign) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt index edc8f9157db120..0010ae68479954 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ChannelClusterLineupInfoStruct( - val operatorName: String, - val lineupName: Optional, - val postalCode: Optional, - val lineupInfoType: Int -) { - override fun toString(): String = buildString { +class ChannelClusterLineupInfoStruct ( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: Int) { + override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") append("\toperatorName : $operatorName\n") append("\tlineupName : $lineupName\n") @@ -43,13 +45,13 @@ class ChannelClusterLineupInfoStruct( startStructure(tag) put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) if (lineupName.isPresent) { - val optlineupName = lineupName.get() - put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) - } + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } if (postalCode.isPresent) { - val optpostalCode = postalCode.get() - put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) - } + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) endStructure() } @@ -61,23 +63,21 @@ class ChannelClusterLineupInfoStruct( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterLineupInfoStruct { tlvReader.enterStructure(tag) val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) - val lineupName = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) - } else { - Optional.empty() - } - val postalCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) - } else { - Optional.empty() - } + val lineupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) - + tlvReader.exitContainer() return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt index 0e1ebee9f97df2..0e54edff044225 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterAdditionalInfoStruct ( + val name: String, + val value: String) { + override fun toString(): String = buildString { append("ContentLauncherClusterAdditionalInfoStruct {\n") append("\tname : $name\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: St private const val TAG_NAME = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterAdditionalInfoStruct { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ContentLauncherClusterAdditionalInfoStruct(name, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 5f4719e9c00ef8..993719fc427de5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -17,21 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ContentLauncherClusterBrandingInformationStruct( - val providerName: String, - val background: Optional, - val logo: Optional, - val progressBar: Optional, - val splash: Optional, - val waterMark: Optional -) { - override fun toString(): String = buildString { +class ContentLauncherClusterBrandingInformationStruct ( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional) { + override fun toString(): String = buildString { append("ContentLauncherClusterBrandingInformationStruct {\n") append("\tproviderName : $providerName\n") append("\tbackground : $background\n") @@ -47,25 +49,25 @@ class ContentLauncherClusterBrandingInformationStruct( startStructure(tag) put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) if (background.isPresent) { - val optbackground = background.get() - optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) - } + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } if (logo.isPresent) { - val optlogo = logo.get() - optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) - } + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } if (progressBar.isPresent) { - val optprogressBar = progressBar.get() - optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) - } + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } if (splash.isPresent) { - val optsplash = splash.get() - optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) - } + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } if (waterMark.isPresent) { - val optwaterMark = waterMark.get() - optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) - } + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } endStructure() } } @@ -78,75 +80,38 @@ class ContentLauncherClusterBrandingInformationStruct( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterBrandingInformationStruct { tlvReader.enterStructure(tag) val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) - val background = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_BACKGROUND), - tlvReader - ) - ) - } else { - Optional.empty() - } - val logo = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_LOGO), - tlvReader - ) - ) - } else { - Optional.empty() - } - val progressBar = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_PROGRESS_BAR), - tlvReader - ) - ) - } else { - Optional.empty() - } - val splash = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_SPLASH), - tlvReader - ) - ) - } else { - Optional.empty() - } - val waterMark = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { - Optional.of( - ContentLauncherClusterStyleInformationStruct.fromTlv( - ContextSpecificTag(TAG_WATER_MARK), - tlvReader - ) - ) - } else { - Optional.empty() - } - + val background = if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_BACKGROUND), tlvReader)) + } else { + Optional.empty() + } + val logo = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_LOGO), tlvReader)) + } else { + Optional.empty() + } + val progressBar = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_PROGRESS_BAR), tlvReader)) + } else { + Optional.empty() + } + val splash = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_SPLASH), tlvReader)) + } else { + Optional.empty() + } + val waterMark = if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_WATER_MARK), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ContentLauncherClusterBrandingInformationStruct( - providerName, - background, - logo, - progressBar, - splash, - waterMark - ) + return ContentLauncherClusterBrandingInformationStruct(providerName, background, logo, progressBar, splash, waterMark) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt index 9457b03907a4fb..b3b713ba8e8079 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -20,13 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ContentLauncherClusterContentSearchStruct( - val parameterList: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterContentSearchStruct ( + val parameterList: List) { + override fun toString(): String = buildString { append("ContentLauncherClusterContentSearchStruct {\n") append("\tparameterList : $parameterList\n") append("}\n") @@ -47,17 +49,16 @@ class ContentLauncherClusterContentSearchStruct( companion object { private const val TAG_PARAMETER_LIST = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterContentSearchStruct { tlvReader.enterStructure(tag) - val parameterList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val parameterList = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ContentLauncherClusterContentSearchStruct(parameterList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index a38245918bb476..2bf3ed85bae436 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ContentLauncherClusterDimensionStruct( - val width: Double, - val height: Double, - val metric: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ContentLauncherClusterDimensionStruct ( + val width: Double, + val height: Double, + val metric: Int) { + override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") append("\twidth : $width\n") append("\theight : $height\n") @@ -50,12 +53,12 @@ class ContentLauncherClusterDimensionStruct( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterDimensionStruct { tlvReader.enterStructure(tag) val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) val metric = tlvReader.getInt(ContextSpecificTag(TAG_METRIC)) - + tlvReader.exitContainer() return ContentLauncherClusterDimensionStruct(width, height, metric) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt index caf0f99848c93c..19f4e650b0615b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -20,16 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ContentLauncherClusterParameterStruct( - val type: Int, - val value: String, - val externalIDList: Optional> -) { - override fun toString(): String = buildString { +class ContentLauncherClusterParameterStruct ( + val type: Int, + val value: String, + val externalIDList: Optional>) { + override fun toString(): String = buildString { append("ContentLauncherClusterParameterStruct {\n") append("\ttype : $type\n") append("\tvalue : $value\n") @@ -43,13 +44,13 @@ class ContentLauncherClusterParameterStruct( put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) - } - endList() + val optexternalIDList = externalIDList.get() + startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) } + endList() + } endStructure() } } @@ -59,25 +60,22 @@ class ContentLauncherClusterParameterStruct( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterParameterStruct { tlvReader.enterStructure(tag) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - val externalIDList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - + val externalIDList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterParameterStruct(type, value, externalIDList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt index d5e686bbb5ac45..b9f2044614dd71 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class ContentLauncherClusterStyleInformationStruct( - val imageURL: Optional, - val color: Optional, - val size: Optional -) { - override fun toString(): String = buildString { +class ContentLauncherClusterStyleInformationStruct ( + val imageURL: Optional, + val color: Optional, + val size: Optional) { + override fun toString(): String = buildString { append("ContentLauncherClusterStyleInformationStruct {\n") append("\timageURL : $imageURL\n") append("\tcolor : $color\n") @@ -40,17 +42,17 @@ class ContentLauncherClusterStyleInformationStruct( tlvWriter.apply { startStructure(tag) if (imageURL.isPresent) { - val optimageURL = imageURL.get() - put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) - } + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } if (color.isPresent) { - val optcolor = color.get() - put(ContextSpecificTag(TAG_COLOR), optcolor) - } + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } if (size.isPresent) { - val optsize = size.get() - optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) - } + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } endStructure() } } @@ -60,29 +62,24 @@ class ContentLauncherClusterStyleInformationStruct( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterStyleInformationStruct { tlvReader.enterStructure(tag) - val imageURL = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) - } else { - Optional.empty() - } - val color = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) - } else { - Optional.empty() - } - val size = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { - Optional.of( - ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) - ) - } else { - Optional.empty() - } - + val imageURL = if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of(ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader)) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt index 75fed36957e726..d76de77105ded9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DescriptorClusterDeviceTypeStruct ( + val deviceType: Long, + val revision: Int) { + override fun toString(): String = buildString { append("DescriptorClusterDeviceTypeStruct {\n") append("\tdeviceType : $deviceType\n") append("\trevision : $revision\n") @@ -43,11 +49,11 @@ class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) private const val TAG_DEVICE_TYPE = 0 private const val TAG_REVISION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterDeviceTypeStruct { tlvReader.enterStructure(tag) val deviceType = tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) val revision = tlvReader.getInt(ContextSpecificTag(TAG_REVISION)) - + tlvReader.exitContainer() return DescriptorClusterDeviceTypeStruct(deviceType, revision) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt index abde881ccffcea..8c5fc527b8a5e5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -17,19 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DescriptorClusterSemanticTagStruct( - val mfgCode: Int?, - val namespaceID: Int, - val tag: Int, - val label: Optional? -) { - override fun toString(): String = buildString { +class DescriptorClusterSemanticTagStruct ( + val mfgCode: Int?, + val namespaceID: Int, + val tag: Int, + val label: Optional?) { + override fun toString(): String = buildString { append("DescriptorClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tnamespaceID : $namespaceID\n") @@ -42,20 +44,20 @@ class DescriptorClusterSemanticTagStruct( tlvWriter.apply { startStructure(tag) if (mfgCode != null) { - put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) - } else { - putNull(ContextSpecificTag(TAG_MFG_CODE)) - } + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) put(ContextSpecificTag(TAG_TAG), tag) if (label != null) { - if (label.isPresent) { - val optlabel = label.get() - put(ContextSpecificTag(TAG_LABEL), optlabel) - } - } else { - putNull(ContextSpecificTag(TAG_LABEL)) - } + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } endStructure() } } @@ -66,29 +68,27 @@ class DescriptorClusterSemanticTagStruct( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterSemanticTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) - null - } + val mfgCode = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } val namespaceID = tlvReader.getInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) val tag = tlvReader.getInt(ContextSpecificTag(TAG_TAG)) - val label = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) - null - } - + val label = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + tlvReader.exitContainer() return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt index 423d6a554672ce..d7004fbfc53590 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DishwasherModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class DishwasherModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class DishwasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 33881f4ac00c8d..110964c9ed2cf6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DishwasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt index da3a551267eb09..de3654516fc946 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class DoorLockClusterCredentialStruct ( + val credentialType: Int, + val credentialIndex: Int) { + override fun toString(): String = buildString { append("DoorLockClusterCredentialStruct {\n") append("\tcredentialType : $credentialType\n") append("\tcredentialIndex : $credentialIndex\n") @@ -43,11 +49,11 @@ class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialInd private const val TAG_CREDENTIAL_TYPE = 0 private const val TAG_CREDENTIAL_INDEX = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterCredentialStruct { tlvReader.enterStructure(tag) val credentialType = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) val credentialIndex = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) - + tlvReader.exitContainer() return DoorLockClusterCredentialStruct(credentialType, credentialIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt index 09292f726d9467..16567ccab1ce30 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class FixedLabelClusterLabelStruct(val label: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class FixedLabelClusterLabelStruct ( + val label: String, + val value: String) { + override fun toString(): String = buildString { append("FixedLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class FixedLabelClusterLabelStruct(val label: String, val value: String) { private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : FixedLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return FixedLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt index 60d10b41112a9d..2153c5ea32fc7d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralCommissioningClusterBasicCommissioningInfo( - val failSafeExpiryLengthSeconds: Int, - val maxCumulativeFailsafeSeconds: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralCommissioningClusterBasicCommissioningInfo ( + val failSafeExpiryLengthSeconds: Int, + val maxCumulativeFailsafeSeconds: Int) { + override fun toString(): String = buildString { append("GeneralCommissioningClusterBasicCommissioningInfo {\n") append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") @@ -46,19 +49,14 @@ class GeneralCommissioningClusterBasicCommissioningInfo( private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralCommissioningClusterBasicCommissioningInfo { tlvReader.enterStructure(tag) - val failSafeExpiryLengthSeconds = - tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) - val maxCumulativeFailsafeSeconds = - tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) - + val failSafeExpiryLengthSeconds = tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + tlvReader.exitContainer() - return GeneralCommissioningClusterBasicCommissioningInfo( - failSafeExpiryLengthSeconds, - maxCumulativeFailsafeSeconds - ) + return GeneralCommissioningClusterBasicCommissioningInfo(failSafeExpiryLengthSeconds, maxCumulativeFailsafeSeconds) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt index d4ff313520e65e..2813b085912e48 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -20,20 +20,22 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterNetworkInterface( - val name: String, - val isOperational: Boolean, - val offPremiseServicesReachableIPv4: Boolean?, - val offPremiseServicesReachableIPv6: Boolean?, - val hardwareAddress: ByteArray, - val IPv4Addresses: List, - val IPv6Addresses: List, - val type: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GeneralDiagnosticsClusterNetworkInterface ( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: Int) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkInterface {\n") append("\tname : $name\n") append("\tisOperational : $isOperational\n") @@ -52,21 +54,15 @@ class GeneralDiagnosticsClusterNetworkInterface( put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) if (offPremiseServicesReachableIPv4 != null) { - put( - ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), - offPremiseServicesReachableIPv4 - ) - } else { - putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } + put(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), offPremiseServicesReachableIPv4) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } if (offPremiseServicesReachableIPv6 != null) { - put( - ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), - offPremiseServicesReachableIPv6 - ) - } else { - putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } + put(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), offPremiseServicesReachableIPv6) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) startList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) for (item in IPv4Addresses.iterator()) { @@ -93,55 +89,42 @@ class GeneralDiagnosticsClusterNetworkInterface( private const val TAG_I_PV6_ADDRESSES = 6 private const val TAG_TYPE = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkInterface { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) - val offPremiseServicesReachableIPv4 = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - null - } - val offPremiseServicesReachableIPv6 = - if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - null - } + val offPremiseServicesReachableIPv4 = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) - val IPv4Addresses = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val IPv6Addresses = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } + val IPv4Addresses = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - + tlvReader.exitContainer() - return GeneralDiagnosticsClusterNetworkInterface( - name, - isOperational, - offPremiseServicesReachableIPv4, - offPremiseServicesReachableIPv6, - hardwareAddress, - IPv4Addresses, - IPv6Addresses, - type - ) + return GeneralDiagnosticsClusterNetworkInterface(name, isOperational, offPremiseServicesReachableIPv4, offPremiseServicesReachableIPv6, hardwareAddress, IPv4Addresses, IPv6Addresses, type) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt index 6038b55d345b75..c6ecaa9eb20014 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -20,17 +20,18 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class GroupKeyManagementClusterGroupInfoMapStruct( - val groupId: Int, - val endpoints: List, - val groupName: Optional, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupInfoMapStruct ( + val groupId: Int, + val endpoints: List, + val groupName: Optional, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") append("\tgroupId : $groupId\n") append("\tendpoints : $endpoints\n") @@ -49,9 +50,9 @@ class GroupKeyManagementClusterGroupInfoMapStruct( } endList() if (groupName.isPresent) { - val optgroupName = groupName.get() - put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) - } + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -63,25 +64,23 @@ class GroupKeyManagementClusterGroupInfoMapStruct( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupInfoMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) - val endpoints = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val groupName = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) - } else { - Optional.empty() - } + val endpoints = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt index d565d70233abc2..8e692ad743b3c1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GroupKeyManagementClusterGroupKeyMapStruct( - val groupId: Int, - val groupKeySetID: Int, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupKeyMapStruct ( + val groupId: Int, + val groupKeySetID: Int, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") append("\tgroupId : $groupId\n") append("\tgroupKeySetID : $groupKeySetID\n") @@ -50,12 +53,12 @@ class GroupKeyManagementClusterGroupKeyMapStruct( private const val TAG_GROUP_KEY_SET_I_D = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeyMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt index 418b6037ae46c9..0af577bdf3cdce 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -17,22 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GroupKeyManagementClusterGroupKeySetStruct( - val groupKeySetID: Int, - val groupKeySecurityPolicy: Int, - val epochKey0: ByteArray?, - val epochStartTime0: Long?, - val epochKey1: ByteArray?, - val epochStartTime1: Long?, - val epochKey2: ByteArray?, - val epochStartTime2: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class GroupKeyManagementClusterGroupKeySetStruct ( + val groupKeySetID: Int, + val groupKeySecurityPolicy: Int, + val epochKey0: ByteArray?, + val epochStartTime0: Long?, + val epochKey1: ByteArray?, + val epochStartTime1: Long?, + val epochKey2: ByteArray?, + val epochStartTime2: Long?) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeySetStruct {\n") append("\tgroupKeySetID : $groupKeySetID\n") append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") @@ -51,35 +54,35 @@ class GroupKeyManagementClusterGroupKeySetStruct( put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) if (epochKey0 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + } if (epochStartTime0 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } if (epochKey1 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + } if (epochStartTime1 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } if (epochKey2 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + } if (epochStartTime2 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } endStructure() } } @@ -94,66 +97,50 @@ class GroupKeyManagementClusterGroupKeySetStruct( private const val TAG_EPOCH_KEY2 = 6 private const val TAG_EPOCH_START_TIME2 = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeySetStruct { tlvReader.enterStructure(tag) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val groupKeySecurityPolicy = - tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) - val epochKey0 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - null - } - val epochStartTime0 = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - null - } - val epochKey1 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - null - } - val epochStartTime1 = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - null - } - val epochKey2 = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - null - } - val epochStartTime2 = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - null - } - + val groupKeySecurityPolicy = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + tlvReader.exitContainer() - return GroupKeyManagementClusterGroupKeySetStruct( - groupKeySetID, - groupKeySecurityPolicy, - epochKey0, - epochStartTime0, - epochKey1, - epochStartTime1, - epochKey2, - epochStartTime2 - ) + return GroupKeyManagementClusterGroupKeySetStruct(groupKeySetID, groupKeySecurityPolicy, epochKey0, epochStartTime0, epochKey1, epochStartTime1, epochKey2, epochStartTime2) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt index a86ba8db2dee0a..9ecba7669d8e6f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class HepaFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class HepaFilterMonitoringClusterReplacementProductStruct ( + val productIdentifierType: Int, + val productIdentifierValue: String) { + override fun toString(): String = buildString { append("HepaFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -46,21 +49,14 @@ class HepaFilterMonitoringClusterReplacementProductStruct( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): HepaFilterMonitoringClusterReplacementProductStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : HepaFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return HepaFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) + return HepaFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt index d380689bed016f..ebef1ce2ce74a7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class IcdManagementClusterMonitoringRegistrationStruct( - val checkInNodeID: Long, - val monitoredSubject: Long, - val key: ByteArray, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class IcdManagementClusterMonitoringRegistrationStruct ( + val checkInNodeID: Long, + val monitoredSubject: Long, + val key: ByteArray, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") append("\tcheckInNodeID : $checkInNodeID\n") append("\tmonitoredSubject : $monitoredSubject\n") @@ -54,21 +57,16 @@ class IcdManagementClusterMonitoringRegistrationStruct( private const val TAG_KEY = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): IcdManagementClusterMonitoringRegistrationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : IcdManagementClusterMonitoringRegistrationStruct { tlvReader.enterStructure(tag) val checkInNodeID = tlvReader.getLong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) val monitoredSubject = tlvReader.getLong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return IcdManagementClusterMonitoringRegistrationStruct( - checkInNodeID, - monitoredSubject, - key, - fabricIndex - ) + return IcdManagementClusterMonitoringRegistrationStruct(checkInNodeID, monitoredSubject, key, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt index eeab9e95eb7cce..91f733b2bf8edd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class LaundryWasherModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class LaundryWasherModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class LaundryWasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index eed09912c26a9c..06685de8506c7d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val valu tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val valu private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return LaundryWasherModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt index 514c05d19f6fdf..7be50d0dbc9ad3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -17,18 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class MediaInputClusterInputInfoStruct( - val index: Int, - val inputType: Int, - val name: String, - val description: String -) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaInputClusterInputInfoStruct ( + val index: Int, + val inputType: Int, + val name: String, + val description: String) { + override fun toString(): String = buildString { append("MediaInputClusterInputInfoStruct {\n") append("\tindex : $index\n") append("\tinputType : $inputType\n") @@ -54,13 +57,13 @@ class MediaInputClusterInputInfoStruct( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaInputClusterInputInfoStruct { tlvReader.enterStructure(tag) val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) val inputType = tlvReader.getInt(ContextSpecificTag(TAG_INPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) - + tlvReader.exitContainer() return MediaInputClusterInputInfoStruct(index, inputType, name, description) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt index d452d083a73112..6b6e8cfcf12403 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { - override fun toString(): String = buildString { +import java.util.Optional + +class MediaPlaybackClusterPlaybackPositionStruct ( + val updatedAt: Long, + val position: Long?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") append("\tposition : $position\n") @@ -35,10 +41,10 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val positi startStructure(tag) put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) if (position != null) { - put(ContextSpecificTag(TAG_POSITION), position) - } else { - putNull(ContextSpecificTag(TAG_POSITION)) - } + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } endStructure() } } @@ -47,17 +53,16 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val positi private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterPlaybackPositionStruct { tlvReader.enterStructure(tag) val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) - val position = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) - null - } - + val position = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt index ac95817519112f..eacbd43215cc6c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ModeSelectClusterModeOptionStruct( - val label: String, - val mode: Int, - val semanticTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ModeSelectClusterModeOptionStruct ( + val label: String, + val mode: Int, + val semanticTags: List) { + override fun toString(): String = buildString { append("ModeSelectClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class ModeSelectClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val semanticTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val semanticTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index 04c893671659d3..6e00f596b61ebf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ModeSelectClusterSemanticTagStruct ( + val mfgCode: Int, + val value: Int) { + override fun toString(): String = buildString { append("ModeSelectClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterSemanticTagStruct { tlvReader.enterStructure(tag) val mfgCode = tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ModeSelectClusterSemanticTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index 8b942f2a492dd1..9cf40b7e7ce7a3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class NetworkCommissioningClusterNetworkInfoStruct( - val networkID: ByteArray, - val connected: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterNetworkInfoStruct ( + val networkID: ByteArray, + val connected: Boolean) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") @@ -46,11 +49,11 @@ class NetworkCommissioningClusterNetworkInfoStruct( private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) - + tlvReader.exitContainer() return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt index 76593b32131477..e8cc5c1941d7d8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -17,22 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class NetworkCommissioningClusterThreadInterfaceScanResultStruct( - val panId: Int, - val extendedPanId: Long, - val networkName: String, - val channel: Int, - val version: Int, - val extendedAddress: ByteArray, - val rssi: Int, - val lqi: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( + val panId: Int, + val extendedPanId: Long, + val networkName: String, + val channel: Int, + val version: Int, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: Int) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") append("\tpanId : $panId\n") append("\textendedPanId : $extendedPanId\n") @@ -70,10 +73,7 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( private const val TAG_RSSI = 6 private const val TAG_LQI = 7 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterThreadInterfaceScanResultStruct { tlvReader.enterStructure(tag) val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) @@ -83,19 +83,10 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterThreadInterfaceScanResultStruct( - panId, - extendedPanId, - networkName, - channel, - version, - extendedAddress, - rssi, - lqi - ) + return NetworkCommissioningClusterThreadInterfaceScanResultStruct(panId, extendedPanId, networkName, channel, version, extendedAddress, rssi, lqi) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt index d2cf4bcf5b7cb0..efcd50f0c17fba 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -17,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( - val security: Int, - val ssid: ByteArray, - val bssid: ByteArray, - val channel: Int, - val wiFiBand: Int, - val rssi: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( + val security: Int, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: Int, + val wiFiBand: Int, + val rssi: Int) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") append("\tsecurity : $security\n") append("\tssid : $ssid\n") @@ -62,10 +65,7 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( private const val TAG_WI_FI_BAND = 4 private const val TAG_RSSI = 5 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterWiFiInterfaceScanResultStruct { tlvReader.enterStructure(tag) val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) @@ -73,17 +73,10 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( - security, - ssid, - bssid, - channel, - wiFiBand, - rssi - ) + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct(security, ssid, bssid, channel, wiFiBand, rssi) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt index 8264e9fa5ee545..620c17f8cd0863 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -17,20 +17,23 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OperationalCredentialsClusterFabricDescriptorStruct( - val rootPublicKey: ByteArray, - val vendorID: Int, - val fabricID: Long, - val nodeID: Long, - val label: String, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalCredentialsClusterFabricDescriptorStruct ( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterFabricDescriptorStruct {\n") append("\trootPublicKey : $rootPublicKey\n") append("\tvendorID : $vendorID\n") @@ -62,10 +65,7 @@ class OperationalCredentialsClusterFabricDescriptorStruct( private const val TAG_LABEL = 5 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): OperationalCredentialsClusterFabricDescriptorStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterFabricDescriptorStruct { tlvReader.enterStructure(tag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) @@ -73,17 +73,10 @@ class OperationalCredentialsClusterFabricDescriptorStruct( val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OperationalCredentialsClusterFabricDescriptorStruct( - rootPublicKey, - vendorID, - fabricID, - nodeID, - label, - fabricIndex - ) + return OperationalCredentialsClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt index a05f388d1a5e06..406bad431f78c9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OperationalCredentialsClusterNOCStruct( - val noc: ByteArray, - val icac: ByteArray?, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OperationalCredentialsClusterNOCStruct ( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") append("\tnoc : $noc\n") append("\ticac : $icac\n") @@ -40,10 +43,10 @@ class OperationalCredentialsClusterNOCStruct( startStructure(tag) put(ContextSpecificTag(TAG_NOC), noc) if (icac != null) { - put(ContextSpecificTag(TAG_ICAC), icac) - } else { - putNull(ContextSpecificTag(TAG_ICAC)) - } + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -54,18 +57,17 @@ class OperationalCredentialsClusterNOCStruct( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterNOCStruct { tlvReader.enterStructure(tag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) - val icac = - if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) - null - } + val icac = if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt index cdbccac37fe63f..68879d32ff0bd1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class OperationalStateClusterErrorStateStruct( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional -) { - override fun toString(): String = buildString { +class OperationalStateClusterErrorStateStruct ( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("OperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class OperationalStateClusterErrorStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -57,29 +59,23 @@ class OperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterErrorStateStruct( - errorStateID, - errorStateLabel, - errorStateDetails - ) + return OperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt index 1c55ac8f8927c4..f66152a1cfb5f1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class OperationalStateClusterOperationalStateStruct( - val operationalStateID: Int, - val operationalStateLabel: Optional -) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalStateStruct ( + val operationalStateID: Int, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class OperationalStateClusterOperationalStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -50,22 +52,18 @@ class OperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterOperationalStateStruct( - operationalStateID, - operationalStateLabel - ) + return OperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt index 17f95d897b258b..f527505ff87b22 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class OtaSoftwareUpdateRequestorClusterProviderLocation( - val providerNodeID: Long, - val endpoint: Int, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class OtaSoftwareUpdateRequestorClusterProviderLocation ( + val providerNodeID: Long, + val endpoint: Int, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") append("\tproviderNodeID : $providerNodeID\n") append("\tendpoint : $endpoint\n") @@ -50,19 +53,15 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OtaSoftwareUpdateRequestorClusterProviderLocation { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterProviderLocation { tlvReader.enterStructure(tag) val providerNodeID = tlvReader.getLong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterProviderLocation( - providerNodeID, - endpoint, - fabricIndex - ) + return OtaSoftwareUpdateRequestorClusterProviderLocation(providerNodeID, endpoint, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt index 6172f21498fdb0..a3e342cf110c49 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -20,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatChargeFaultChangeType(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatChargeFaultChangeType ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterBatChargeFaultChangeType(val current: List, val pre private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeType { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt index 6ef4a63074b8a2..4feef1564786b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -20,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterBatFaultChangeType ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterBatFaultChangeType(val current: List, val previous: private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeType { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt index 86cdc01f28fd41..6c99e0befd7e37 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -20,11 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class PowerSourceClusterWiredFaultChangeType ( + val current: List, + val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -52,25 +57,23 @@ class PowerSourceClusterWiredFaultChangeType(val current: List, val previou private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeType { tlvReader.enterStructure(tag) - val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeType(current, previous) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt index 6632b9581bb508..e3f52fc923d0e9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,34 +57,21 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add( - RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( - AnonymousTag, - tlvReader - ) - ) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( - label, - mode, - modeTags - ) + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct(label, mode, modeTags) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt index 9f806c52fa6fa2..7b3fc8ad89ac0a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( - val mfgCode: Optional, - val value: Int -) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -38,9 +40,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -50,19 +52,15 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt index e3f33a1b7dcac5..986ef2fbfe7fae 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RvcCleanModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcCleanModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class RvcCleanModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index bc7eb7ed818b41..d1b5786dd5004d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: In tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: In private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcCleanModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt index f6b9b8b14456f0..9416a49dd8d2e1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcOperationalStateClusterErrorStateStruct( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional -) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterErrorStateStruct ( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -41,13 +43,13 @@ class RvcOperationalStateClusterErrorStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -57,29 +59,23 @@ class RvcOperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterErrorStateStruct( - errorStateID, - errorStateLabel, - errorStateDetails - ) + return RvcOperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt index 66f2796d71439f..0ac8e7e362c07d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -17,17 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcOperationalStateClusterOperationalStateStruct( - val operationalStateID: Int, - val operationalStateLabel: Optional -) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalStateStruct ( + val operationalStateID: Int, + val operationalStateLabel: Optional) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -39,9 +41,9 @@ class RvcOperationalStateClusterOperationalStateStruct( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -50,22 +52,18 @@ class RvcOperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationalStateStruct( - operationalStateID, - operationalStateLabel - ) + return RvcOperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt index 64b272df8e62c2..6c0fa21b62753c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -20,15 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class RvcRunModeClusterModeOptionStruct( - val label: String, - val mode: Int, - val modeTags: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class RvcRunModeClusterModeOptionStruct ( + val label: String, + val mode: Int, + val modeTags: List) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -55,19 +57,18 @@ class RvcRunModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while (!tlvReader.isEndOfContainer()) { - add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while(!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index 3ad4e9aee5ba6d..39077679389f9e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -17,14 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeTagStruct ( + val mfgCode: Optional, + val value: Int) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -35,9 +40,9 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -47,16 +52,15 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcRunModeClusterModeTagStruct(mfgCode, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt index 213d87b9137cf5..3376a7d1e849f2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesClusterAttributeValuePair ( + val attributeID: Long, + val attributeValue: Long) { + override fun toString(): String = buildString { append("ScenesClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") @@ -43,11 +49,11 @@ class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterAttributeValuePair { tlvReader.enterStructure(tag) val attributeID = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) - + tlvReader.exitContainer() return ScenesClusterAttributeValuePair(attributeID, attributeValue) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt index edc04a2084e2fd..dde3ec639661d9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -20,14 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ScenesClusterExtensionFieldSet( - val clusterID: Long, - val attributeValueList: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ScenesClusterExtensionFieldSet ( + val clusterID: Long, + val attributeValueList: List) { + override fun toString(): String = buildString { append("ScenesClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") @@ -51,18 +53,17 @@ class ScenesClusterExtensionFieldSet( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterExtensionFieldSet { tlvReader.enterStructure(tag) val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) - val attributeValueList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val attributeValueList = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt index 5359b9a4b70a2a..ae6aa79702b58b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -17,20 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class SoftwareDiagnosticsClusterThreadMetricsStruct( - val id: Long, - val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional -) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterThreadMetricsStruct ( + val id: Long, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -45,21 +47,21 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (stackFreeCurrent.isPresent) { - val optstackFreeCurrent = stackFreeCurrent.get() - put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) - } + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } if (stackFreeMinimum.isPresent) { - val optstackFreeMinimum = stackFreeMinimum.get() - put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) - } + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } if (stackSize.isPresent) { - val optstackSize = stackSize.get() - put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) - } + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } endStructure() } } @@ -71,43 +73,33 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterThreadMetricsStruct { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val stackFreeCurrent = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) - } else { - Optional.empty() - } - val stackFreeMinimum = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) - } else { - Optional.empty() - } - val stackSize = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return SoftwareDiagnosticsClusterThreadMetricsStruct( - id, - name, - stackFreeCurrent, - stackFreeMinimum, - stackSize - ) + return SoftwareDiagnosticsClusterThreadMetricsStruct(id, name, stackFreeCurrent, stackFreeMinimum, stackSize) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt index 403134993beaed..475ba3c436fac7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class TargetNavigatorClusterTargetInfoStruct ( + val identifier: Int, + val name: String) { + override fun toString(): String = buildString { append("TargetNavigatorClusterTargetInfoStruct {\n") append("\tidentifier : $identifier\n") append("\tname : $name\n") @@ -43,11 +49,11 @@ class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: Stri private const val TAG_IDENTIFIER = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetInfoStruct { tlvReader.enterStructure(tag) val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetInfoStruct(identifier, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt index cb432fb1e976b4..f63d1bcf959e9e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThermostatClusterThermostatScheduleTransition( - val transitionTime: Int, - val heatSetpoint: Int?, - val coolSetpoint: Int? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThermostatClusterThermostatScheduleTransition ( + val transitionTime: Int, + val heatSetpoint: Int?, + val coolSetpoint: Int?) { + override fun toString(): String = buildString { append("ThermostatClusterThermostatScheduleTransition {\n") append("\ttransitionTime : $transitionTime\n") append("\theatSetpoint : $heatSetpoint\n") @@ -40,15 +43,15 @@ class ThermostatClusterThermostatScheduleTransition( startStructure(tag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (heatSetpoint != null) { - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - } else { - putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } if (coolSetpoint != null) { - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) - } else { - putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - } + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } endStructure() } } @@ -58,31 +61,25 @@ class ThermostatClusterThermostatScheduleTransition( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThermostatClusterThermostatScheduleTransition { tlvReader.enterStructure(tag) val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - null - } - val coolSetpoint = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - null - } - + val heatSetpoint = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + tlvReader.exitContainer() - return ThermostatClusterThermostatScheduleTransition( - transitionTime, - heatSetpoint, - coolSetpoint - ) + return ThermostatClusterThermostatScheduleTransition(transitionTime, heatSetpoint, coolSetpoint) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt index 4a7066df5d7f25..5fbc0d517459c1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -17,28 +17,31 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterNeighborTableStruct( - val extAddress: Long, - val age: Long, - val rloc16: Int, - val linkFrameCounter: Long, - val mleFrameCounter: Long, - val lqi: Int, - val averageRssi: Int?, - val lastRssi: Int?, - val frameErrorRate: Int, - val messageErrorRate: Int, - val rxOnWhenIdle: Boolean, - val fullThreadDevice: Boolean, - val fullNetworkData: Boolean, - val isChild: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( + val extAddress: Long, + val age: Long, + val rloc16: Int, + val linkFrameCounter: Long, + val mleFrameCounter: Long, + val lqi: Int, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: Int, + val messageErrorRate: Int, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") append("\textAddress : $extAddress\n") append("\tage : $age\n") @@ -67,15 +70,15 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( put(ContextSpecificTag(TAG_MLE_FRAME_COUNTER), mleFrameCounter) put(ContextSpecificTag(TAG_LQI), lqi) if (averageRssi != null) { - put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) - } else { - putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } + put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } if (lastRssi != null) { - put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) - } else { - putNull(ContextSpecificTag(TAG_LAST_RSSI)) - } + put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) + } else { + putNull(ContextSpecificTag(TAG_LAST_RSSI)) + } put(ContextSpecificTag(TAG_FRAME_ERROR_RATE), frameErrorRate) put(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE), messageErrorRate) put(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE), rxOnWhenIdle) @@ -102,10 +105,7 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( private const val TAG_FULL_NETWORK_DATA = 12 private const val TAG_IS_CHILD = 13 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNeighborTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) @@ -113,45 +113,28 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( val linkFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) val mleFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - val averageRssi = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - null - } - val lastRssi = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) - null - } + val averageRssi = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } val frameErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) val messageErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterNeighborTableStruct( - extAddress, - age, - rloc16, - linkFrameCounter, - mleFrameCounter, - lqi, - averageRssi, - lastRssi, - frameErrorRate, - messageErrorRate, - rxOnWhenIdle, - fullThreadDevice, - fullNetworkData, - isChild - ) + return ThreadNetworkDiagnosticsClusterNeighborTableStruct(extAddress, age, rloc16, linkFrameCounter, mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt index f9764369891073..7276a7f3eccac4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -17,26 +17,29 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( - val activeTimestampPresent: Boolean, - val pendingTimestampPresent: Boolean, - val masterKeyPresent: Boolean, - val networkNamePresent: Boolean, - val extendedPanIdPresent: Boolean, - val meshLocalPrefixPresent: Boolean, - val delayPresent: Boolean, - val panIdPresent: Boolean, - val channelPresent: Boolean, - val pskcPresent: Boolean, - val securityPolicyPresent: Boolean, - val channelMaskPresent: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents ( + val activeTimestampPresent: Boolean, + val pendingTimestampPresent: Boolean, + val masterKeyPresent: Boolean, + val networkNamePresent: Boolean, + val extendedPanIdPresent: Boolean, + val meshLocalPrefixPresent: Boolean, + val delayPresent: Boolean, + val panIdPresent: Boolean, + val channelPresent: Boolean, + val pskcPresent: Boolean, + val securityPolicyPresent: Boolean, + val channelMaskPresent: Boolean) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") append("\tactiveTimestampPresent : $activeTimestampPresent\n") append("\tpendingTimestampPresent : $pendingTimestampPresent\n") @@ -86,45 +89,24 @@ class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( private const val TAG_SECURITY_POLICY_PRESENT = 10 private const val TAG_CHANNEL_MASK_PRESENT = 11 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { tlvReader.enterStructure(tag) - val activeTimestampPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) - val pendingTimestampPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val activeTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) - val extendedPanIdPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) - val meshLocalPrefixPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val extendedPanIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) - val securityPolicyPresent = - tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val securityPolicyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( - activeTimestampPresent, - pendingTimestampPresent, - masterKeyPresent, - networkNamePresent, - extendedPanIdPresent, - meshLocalPrefixPresent, - delayPresent, - panIdPresent, - channelPresent, - pskcPresent, - securityPolicyPresent, - channelMaskPresent - ) + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents(activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt index 8a7c423f84e6ad..c204266b42fcf5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -17,24 +17,27 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterRouteTableStruct( - val extAddress: Long, - val rloc16: Int, - val routerId: Int, - val nextHop: Int, - val pathCost: Int, - val LQIIn: Int, - val LQIOut: Int, - val age: Int, - val allocated: Boolean, - val linkEstablished: Boolean -) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterRouteTableStruct ( + val extAddress: Long, + val rloc16: Int, + val routerId: Int, + val nextHop: Int, + val pathCost: Int, + val LQIIn: Int, + val LQIOut: Int, + val age: Int, + val allocated: Boolean, + val linkEstablished: Boolean) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") append("\textAddress : $extAddress\n") append("\trloc16 : $rloc16\n") @@ -78,7 +81,7 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterRouteTableStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterRouteTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) @@ -90,21 +93,10 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterRouteTableStruct( - extAddress, - rloc16, - routerId, - nextHop, - pathCost, - LQIIn, - LQIOut, - age, - allocated, - linkEstablished - ) + return ThreadNetworkDiagnosticsClusterRouteTableStruct(extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, LQIOut, age, allocated, linkEstablished) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt index 1474db405b9d43..d12f6e24c345f9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { - override fun toString(): String = buildString { +import java.util.Optional + +class ThreadNetworkDiagnosticsClusterSecurityPolicy ( + val rotationTime: Int, + val flags: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") append("\trotationTime : $rotationTime\n") append("\tflags : $flags\n") @@ -43,11 +49,11 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val f private const val TAG_ROTATION_TIME = 0 private const val TAG_FLAGS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterSecurityPolicy { tlvReader.enterStructure(tag) val rotationTime = tlvReader.getInt(ContextSpecificTag(TAG_ROTATION_TIME)) val flags = tlvReader.getInt(ContextSpecificTag(TAG_FLAGS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt index d770d7a2ac8e03..be643cca35be70 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterDSTOffsetStruct( - val offset: Long, - val validStarting: Long, - val validUntil: Long? -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterDSTOffsetStruct ( + val offset: Long, + val validStarting: Long, + val validUntil: Long?) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") append("\toffset : $offset\n") append("\tvalidStarting : $validStarting\n") @@ -41,10 +44,10 @@ class TimeSynchronizationClusterDSTOffsetStruct( put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) if (validUntil != null) { - put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) - } else { - putNull(ContextSpecificTag(TAG_VALID_UNTIL)) - } + put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) + } else { + putNull(ContextSpecificTag(TAG_VALID_UNTIL)) + } endStructure() } } @@ -54,18 +57,17 @@ class TimeSynchronizationClusterDSTOffsetStruct( private const val TAG_VALID_STARTING = 1 private const val TAG_VALID_UNTIL = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTOffsetStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) - val validUntil = - if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) - null - } - + val validUntil = if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + tlvReader.exitContainer() return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index 7a2e95c671517a..8c3acf12fe54e8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -17,16 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( - val nodeID: Long, - val endpoint: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( + val nodeID: Long, + val endpoint: Int) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") append("\tnodeID : $nodeID\n") append("\tendpoint : $endpoint\n") @@ -46,14 +49,11 @@ class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( private const val TAG_NODE_I_D = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv( - tag: Tag, - tlvReader: TlvReader - ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt index 8a256fd7edfefe..11bdbff1851eaf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -17,18 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class TimeSynchronizationClusterTimeZoneStruct( - val offset: Long, - val validAt: Long, - val name: Optional -) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStruct ( + val offset: Long, + val validAt: Long, + val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStruct {\n") append("\toffset : $offset\n") append("\tvalidAt : $validAt\n") @@ -42,9 +44,9 @@ class TimeSynchronizationClusterTimeZoneStruct( put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_AT), validAt) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -54,17 +56,16 @@ class TimeSynchronizationClusterTimeZoneStruct( private const val TAG_VALID_AT = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) - val name = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt index db50619ad5da53..668f0c1e923143 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TimeSynchronizationClusterTrustedTimeSourceStruct( - val fabricIndex: Int, - val nodeID: Long, - val endpoint: Int -) { - override fun toString(): String = buildString { +import java.util.Optional + +class TimeSynchronizationClusterTrustedTimeSourceStruct ( + val fabricIndex: Int, + val nodeID: Long, + val endpoint: Int) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") append("\tfabricIndex : $fabricIndex\n") append("\tnodeID : $nodeID\n") @@ -50,12 +53,12 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTrustedTimeSourceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt index bd34e9f5a90c49..ed3e7a0ef74243 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -20,11 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterDoubleNestedStructList(val a: List) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterDoubleNestedStructList ( + val a: List) { + override fun toString(): String = buildString { append("UnitTestingClusterDoubleNestedStructList {\n") append("\ta : $a\n") append("}\n") @@ -45,17 +49,16 @@ class UnitTestingClusterDoubleNestedStructList(val a: List { - tlvReader.enterList(ContextSpecificTag(TAG_A)) - while (!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val a = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_A)) + while(!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterDoubleNestedStructList(a) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index 7ca3b0b29aab01..c0de5e08f6886b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -17,17 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterNestedStruct( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNestedStruct ( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -50,12 +53,12 @@ class UnitTestingClusterNestedStruct( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - + tlvReader.exitContainer() return UnitTestingClusterNestedStruct(a, b, c) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt index b954fe0ec9879b..9b41c3e439e192 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -20,19 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterNestedStructList( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct, - val d: List, - val e: List, - val f: List, - val g: List -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterNestedStructList ( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStructList {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -83,44 +85,40 @@ class UnitTestingClusterNestedStructList( private const val TAG_F = 5 private const val TAG_G = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStructList { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - val d = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_D)) - while (!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val e = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_E)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - val f = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_F)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val g = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_G)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val d = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_D)) + while(!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_E)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_F)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_G)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt index 08a4b642e69d45..1533278b6a1fac 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -20,25 +20,26 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class UnitTestingClusterNullablesAndOptionalsStruct( - val nullableInt: Int?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, - val nullableString: String?, - val optionalString: Optional, - val nullableOptionalString: Optional?, - val nullableStruct: UnitTestingClusterSimpleStruct?, - val optionalStruct: Optional, - val nullableOptionalStruct: Optional?, - val nullableList: List?, - val optionalList: Optional>, - val nullableOptionalList: Optional>? -) { - override fun toString(): String = buildString { +class UnitTestingClusterNullablesAndOptionalsStruct ( + val nullableInt: Int?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>?) { + override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") append("\tnullableInt : $nullableInt\n") append("\toptionalInt : $optionalInt\n") @@ -59,85 +60,85 @@ class UnitTestingClusterNullablesAndOptionalsStruct( tlvWriter.apply { startStructure(tag) if (nullableInt != null) { - put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_INT)) - } + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } if (optionalInt.isPresent) { - val optoptionalInt = optionalInt.get() - put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) - } + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } if (nullableOptionalInt != null) { - if (nullableOptionalInt.isPresent) { - val optnullableOptionalInt = nullableOptionalInt.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - } + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } if (nullableString != null) { - put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - } + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } if (optionalString.isPresent) { - val optoptionalString = optionalString.get() - put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) - } + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } if (nullableOptionalString != null) { - if (nullableOptionalString.isPresent) { - val optnullableOptionalString = nullableOptionalString.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - } + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } if (nullableStruct != null) { - nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - } + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } if (optionalStruct.isPresent) { - val optoptionalStruct = optionalStruct.get() - optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) - } + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } if (nullableOptionalStruct != null) { - if (nullableOptionalStruct.isPresent) { - val optnullableOptionalStruct = nullableOptionalStruct.get() - optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - } + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } if (nullableList != null) { - startList(ContextSpecificTag(TAG_NULLABLE_LIST)) - for (item in nullableList.iterator()) { - put(AnonymousTag, item) - } - endList() - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) } + endList() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + } if (optionalList.isPresent) { - val optoptionalList = optionalList.get() - startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - for (item in optoptionalList.iterator()) { - put(AnonymousTag, item) - } - endList() + val optoptionalList = optionalList.get() + startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) } + endList() + } if (nullableOptionalList != null) { - if (nullableOptionalList.isPresent) { - val optnullableOptionalList = nullableOptionalList.get() - startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - for (item in optnullableOptionalList.iterator()) { - put(AnonymousTag, item) - } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + } endStructure() } } @@ -156,153 +157,114 @@ class UnitTestingClusterNullablesAndOptionalsStruct( private const val TAG_OPTIONAL_LIST = 10 private const val TAG_NULLABLE_OPTIONAL_LIST = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNullablesAndOptionalsStruct { tlvReader.enterStructure(tag) - val nullableInt = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) - null - } - val optionalInt = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) - } else { - Optional.empty() - } - val nullableOptionalInt = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - null - } - val nullableString = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - null - } - val optionalString = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) - } else { - Optional.empty() - } - val nullableOptionalString = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - null - } - val nullableStruct = - if (!tlvReader.isNull()) { - UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - null - } - val optionalStruct = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { - Optional.of( - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_OPTIONAL_STRUCT), - tlvReader - ) - ) - } else { - Optional.empty() - } - val nullableOptionalStruct = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { - Optional.of( - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), - tlvReader - ) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - null - } - val nullableList = - if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - null - } - val optionalList = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - val nullableOptionalList = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { - Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - null - } - + val nullableInt = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), tlvReader)) + } else { + Optional.empty() + } + val nullableOptionalStruct = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), tlvReader)) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + val nullableOptionalList = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of(buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + }) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + tlvReader.exitContainer() - return UnitTestingClusterNullablesAndOptionalsStruct( - nullableInt, - optionalInt, - nullableOptionalInt, - nullableString, - optionalString, - nullableOptionalString, - nullableStruct, - optionalStruct, - nullableOptionalStruct, - nullableList, - optionalList, - nullableOptionalList - ) + return UnitTestingClusterNullablesAndOptionalsStruct(nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt index 26bf18a07ed214..381016bd583fa5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -17,22 +17,25 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterSimpleStruct( - val a: Int, - val b: Boolean, - val c: Int, - val d: ByteArray, - val e: String, - val f: Int, - val g: Float, - val h: Double -) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterSimpleStruct ( + val a: Int, + val b: Boolean, + val c: Int, + val d: ByteArray, + val e: String, + val f: Int, + val g: Float, + val h: Double) { + override fun toString(): String = buildString { append("UnitTestingClusterSimpleStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -70,7 +73,7 @@ class UnitTestingClusterSimpleStruct( private const val TAG_G = 6 private const val TAG_H = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterSimpleStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) @@ -80,7 +83,7 @@ class UnitTestingClusterSimpleStruct( val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) - + tlvReader.exitContainer() return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index 6b7273f3172d5d..8a7b42ba939ae6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -20,21 +20,22 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter + import java.util.Optional -class UnitTestingClusterTestFabricScoped( - val fabricSensitiveInt8u: Int, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: Int?, - val nullableOptionalFabricSensitiveInt8u: Optional?, - val fabricSensitiveCharString: String, - val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: Int -) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScoped ( + val fabricSensitiveInt8u: Int, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: Int?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: Int) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") @@ -52,28 +53,22 @@ class UnitTestingClusterTestFabricScoped( startStructure(tag) put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) if (optionalFabricSensitiveInt8u.isPresent) { - val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() - put( - ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), - optoptionalFabricSensitiveInt8u - ) - } + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), optoptionalFabricSensitiveInt8u) + } if (nullableFabricSensitiveInt8u != null) { - put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } if (nullableOptionalFabricSensitiveInt8u != null) { - if (nullableOptionalFabricSensitiveInt8u.isPresent) { - val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() - put( - ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), - optnullableOptionalFabricSensitiveInt8u - ) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - } + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), optnullableOptionalFabricSensitiveInt8u) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) @@ -96,66 +91,44 @@ class UnitTestingClusterTestFabricScoped( private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScoped { tlvReader.enterStructure(tag) val fabricSensitiveInt8u = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) - val optionalFabricSensitiveInt8u = - if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - val nullableFabricSensitiveInt8u = - if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - null - } - val nullableOptionalFabricSensitiveInt8u = - if (!tlvReader.isNull()) { - if ( - tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - ) { - Optional.of( - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - ) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - null - } - val fabricSensitiveCharString = - tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) - val fabricSensitiveStruct = - UnitTestingClusterSimpleStruct.fromTlv( - ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), - tlvReader - ) - val fabricSensitiveInt8uList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } + val optionalFabricSensitiveInt8u = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), tlvReader) + val fabricSensitiveInt8uList = buildList { + tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while(!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return UnitTestingClusterTestFabricScoped( - fabricSensitiveInt8u, - optionalFabricSensitiveInt8u, - nullableFabricSensitiveInt8u, - nullableOptionalFabricSensitiveInt8u, - fabricSensitiveCharString, - fabricSensitiveStruct, - fabricSensitiveInt8uList, - fabricIndex - ) + return UnitTestingClusterTestFabricScoped(fabricSensitiveInt8u, optionalFabricSensitiveInt8u, nullableFabricSensitiveInt8u, nullableOptionalFabricSensitiveInt8u, fabricSensitiveCharString, fabricSensitiveStruct, fabricSensitiveInt8uList, fabricIndex) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt index 6c5df4cb224166..0540f4f11a30cb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { - override fun toString(): String = buildString { +import java.util.Optional + +class UnitTestingClusterTestListStructOctet ( + val member1: Long, + val member2: ByteArray) { + override fun toString(): String = buildString { append("UnitTestingClusterTestListStructOctet {\n") append("\tmember1 : $member1\n") append("\tmember2 : $member2\n") @@ -43,11 +49,11 @@ class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: Byte private const val TAG_MEMBER1 = 0 private const val TAG_MEMBER2 = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestListStructOctet { tlvReader.enterStructure(tag) val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) - + tlvReader.exitContainer() return UnitTestingClusterTestListStructOctet(member1, member2) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt index d90396f2a010ea..44a824f2303a2e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -17,13 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag +import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UserLabelClusterLabelStruct(val label: String, val value: String) { - override fun toString(): String = buildString { +import java.util.Optional + +class UserLabelClusterLabelStruct ( + val label: String, + val value: String) { + override fun toString(): String = buildString { append("UserLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -43,11 +49,11 @@ class UserLabelClusterLabelStruct(val label: String, val value: String) { private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader) : UserLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return UserLabelClusterLabelStruct(label, value)