From 8d047cd720d2fd4d9e377e463837777a74e8b4b0 Mon Sep 17 00:00:00 2001 From: WanqQixiang Date: Mon, 3 Jun 2024 14:24:42 +0800 Subject: [PATCH] remove some struct files --- ...RouterManagementClusterChildTableStruct.kt | 67 --------- ...outerManagementClusterNeiborTableStruct.kt | 109 --------------- ...RouterManagementClusterRouteTableStruct.kt | 72 ---------- ...RouterManagementClusterThreadNodeStruct.kt | 127 ------------------ ...RouterManagementClusterChildTableStruct.kt | 67 --------- ...outerManagementClusterNeiborTableStruct.kt | 109 --------------- ...RouterManagementClusterRouteTableStruct.kt | 72 ---------- ...RouterManagementClusterThreadNodeStruct.kt | 127 ------------------ 8 files changed, 750 deletions(-) delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt delete mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt delete mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt delete mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt delete mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt deleted file mode 100644 index a9146b6581a846..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterChildTableStruct( - val rloc16: UInt, - val linkQuality: UInt, - val routingRole: UInt -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterChildTableStruct {\n") - append("\trloc16 : $rloc16\n") - append("\tlinkQuality : $linkQuality\n") - append("\troutingRole : $routingRole\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_RLOC16), rloc16) - put(ContextSpecificTag(TAG_LINK_QUALITY), linkQuality) - put(ContextSpecificTag(TAG_ROUTING_ROLE), routingRole) - endStructure() - } - } - - companion object { - private const val TAG_RLOC16 = 0 - private const val TAG_LINK_QUALITY = 1 - private const val TAG_ROUTING_ROLE = 2 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterChildTableStruct { - tlvReader.enterStructure(tlvTag) - val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) - val linkQuality = tlvReader.getUInt(ContextSpecificTag(TAG_LINK_QUALITY)) - val routingRole = tlvReader.getUInt(ContextSpecificTag(TAG_ROUTING_ROLE)) - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterChildTableStruct(rloc16, linkQuality, routingRole) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt deleted file mode 100644 index 49aab4a8c13c81..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterNeiborTableStruct( - val extAddress: ULong, - val age: ULong, - val rloc16: UInt, - val averageRssi: Int?, - val lastRssi: Int?, - val routingRole: UInt -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterNeiborTableStruct {\n") - append("\textAddress : $extAddress\n") - append("\tage : $age\n") - append("\trloc16 : $rloc16\n") - append("\taverageRssi : $averageRssi\n") - append("\tlastRssi : $lastRssi\n") - append("\troutingRole : $routingRole\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) - put(ContextSpecificTag(TAG_AGE), age) - put(ContextSpecificTag(TAG_RLOC16), rloc16) - if (averageRssi != null) { - 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_ROUTING_ROLE), routingRole) - endStructure() - } - } - - companion object { - private const val TAG_EXT_ADDRESS = 0 - private const val TAG_AGE = 1 - private const val TAG_RLOC16 = 2 - private const val TAG_AVERAGE_RSSI = 3 - private const val TAG_LAST_RSSI = 4 - private const val TAG_ROUTING_ROLE = 5 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterNeiborTableStruct { - tlvReader.enterStructure(tlvTag) - val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) - val age = tlvReader.getULong(ContextSpecificTag(TAG_AGE)) - val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) - 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 routingRole = tlvReader.getUInt(ContextSpecificTag(TAG_ROUTING_ROLE)) - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterNeiborTableStruct( - extAddress, - age, - rloc16, - averageRssi, - lastRssi, - routingRole - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt deleted file mode 100644 index 12b5fb6e9e0e3d..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterRouteTableStruct( - val routerId: UInt, - val pathCost: UInt, - val LQIIn: UInt, - val LQIOut: UInt -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterRouteTableStruct {\n") - append("\trouterId : $routerId\n") - append("\tpathCost : $pathCost\n") - append("\tLQIIn : $LQIIn\n") - append("\tLQIOut : $LQIOut\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_ROUTER_ID), routerId) - put(ContextSpecificTag(TAG_PATH_COST), pathCost) - put(ContextSpecificTag(TAG_L_Q_I_IN), LQIIn) - put(ContextSpecificTag(TAG_L_Q_I_OUT), LQIOut) - endStructure() - } - } - - companion object { - private const val TAG_ROUTER_ID = 0 - private const val TAG_PATH_COST = 1 - private const val TAG_L_Q_I_IN = 2 - private const val TAG_L_Q_I_OUT = 3 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterRouteTableStruct { - tlvReader.enterStructure(tlvTag) - val routerId = tlvReader.getUInt(ContextSpecificTag(TAG_ROUTER_ID)) - val pathCost = tlvReader.getUInt(ContextSpecificTag(TAG_PATH_COST)) - val LQIIn = tlvReader.getUInt(ContextSpecificTag(TAG_L_Q_I_IN)) - val LQIOut = tlvReader.getUInt(ContextSpecificTag(TAG_L_Q_I_OUT)) - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterRouteTableStruct(routerId, pathCost, LQIIn, LQIOut) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt deleted file mode 100644 index bfe71bce903319..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import matter.tlv.AnonymousTag -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterThreadNodeStruct( - val extAddress: ULong, - val rloc16: UInt, - val IPv6s: List, - val routingRole: UInt, - val routeTable: List, - val childTable: List -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterThreadNodeStruct {\n") - append("\textAddress : $extAddress\n") - append("\trloc16 : $rloc16\n") - append("\tIPv6s : $IPv6s\n") - append("\troutingRole : $routingRole\n") - append("\trouteTable : $routeTable\n") - append("\tchildTable : $childTable\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) - put(ContextSpecificTag(TAG_RLOC16), rloc16) - startArray(ContextSpecificTag(TAG_I_PV6S)) - for (item in IPv6s.iterator()) { - put(AnonymousTag, item) - } - endArray() - put(ContextSpecificTag(TAG_ROUTING_ROLE), routingRole) - startArray(ContextSpecificTag(TAG_ROUTE_TABLE)) - for (item in routeTable.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - startArray(ContextSpecificTag(TAG_CHILD_TABLE)) - for (item in childTable.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - endStructure() - } - } - - companion object { - private const val TAG_EXT_ADDRESS = 0 - private const val TAG_RLOC16 = 1 - private const val TAG_I_PV6S = 2 - private const val TAG_ROUTING_ROLE = 3 - private const val TAG_ROUTE_TABLE = 4 - private const val TAG_CHILD_TABLE = 5 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterThreadNodeStruct { - tlvReader.enterStructure(tlvTag) - val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) - val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) - val IPv6s = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6S)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val routingRole = tlvReader.getUInt(ContextSpecificTag(TAG_ROUTING_ROLE)) - val routeTable = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ROUTE_TABLE)) - while (!tlvReader.isEndOfContainer()) { - add( - ThreadBorderRouterManagementClusterRouteTableStruct.fromTlv(AnonymousTag, tlvReader) - ) - } - tlvReader.exitContainer() - } - val childTable = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CHILD_TABLE)) - while (!tlvReader.isEndOfContainer()) { - add( - ThreadBorderRouterManagementClusterChildTableStruct.fromTlv(AnonymousTag, tlvReader) - ) - } - tlvReader.exitContainer() - } - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterThreadNodeStruct( - extAddress, - rloc16, - IPv6s, - routingRole, - routeTable, - childTable - ) - } - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt deleted file mode 100644 index daff3dd5bb484e..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterChildTableStruct.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package matter.controller.cluster.structs - -import matter.controller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterChildTableStruct( - val rloc16: UShort, - val linkQuality: UByte, - val routingRole: UByte -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterChildTableStruct {\n") - append("\trloc16 : $rloc16\n") - append("\tlinkQuality : $linkQuality\n") - append("\troutingRole : $routingRole\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_RLOC16), rloc16) - put(ContextSpecificTag(TAG_LINK_QUALITY), linkQuality) - put(ContextSpecificTag(TAG_ROUTING_ROLE), routingRole) - endStructure() - } - } - - companion object { - private const val TAG_RLOC16 = 0 - private const val TAG_LINK_QUALITY = 1 - private const val TAG_ROUTING_ROLE = 2 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterChildTableStruct { - tlvReader.enterStructure(tlvTag) - val rloc16 = tlvReader.getUShort(ContextSpecificTag(TAG_RLOC16)) - val linkQuality = tlvReader.getUByte(ContextSpecificTag(TAG_LINK_QUALITY)) - val routingRole = tlvReader.getUByte(ContextSpecificTag(TAG_ROUTING_ROLE)) - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterChildTableStruct(rloc16, linkQuality, routingRole) - } - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt deleted file mode 100644 index b2544366c2e29e..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterNeiborTableStruct.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package matter.controller.cluster.structs - -import matter.controller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterNeiborTableStruct( - val extAddress: ULong, - val age: UInt, - val rloc16: UShort, - val averageRssi: Byte?, - val lastRssi: Byte?, - val routingRole: UByte -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterNeiborTableStruct {\n") - append("\textAddress : $extAddress\n") - append("\tage : $age\n") - append("\trloc16 : $rloc16\n") - append("\taverageRssi : $averageRssi\n") - append("\tlastRssi : $lastRssi\n") - append("\troutingRole : $routingRole\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) - put(ContextSpecificTag(TAG_AGE), age) - put(ContextSpecificTag(TAG_RLOC16), rloc16) - if (averageRssi != null) { - 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_ROUTING_ROLE), routingRole) - endStructure() - } - } - - companion object { - private const val TAG_EXT_ADDRESS = 0 - private const val TAG_AGE = 1 - private const val TAG_RLOC16 = 2 - private const val TAG_AVERAGE_RSSI = 3 - private const val TAG_LAST_RSSI = 4 - private const val TAG_ROUTING_ROLE = 5 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterNeiborTableStruct { - tlvReader.enterStructure(tlvTag) - val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) - val age = tlvReader.getUInt(ContextSpecificTag(TAG_AGE)) - val rloc16 = tlvReader.getUShort(ContextSpecificTag(TAG_RLOC16)) - val averageRssi = - if (!tlvReader.isNull()) { - tlvReader.getByte(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - null - } - val lastRssi = - if (!tlvReader.isNull()) { - tlvReader.getByte(ContextSpecificTag(TAG_LAST_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) - null - } - val routingRole = tlvReader.getUByte(ContextSpecificTag(TAG_ROUTING_ROLE)) - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterNeiborTableStruct( - extAddress, - age, - rloc16, - averageRssi, - lastRssi, - routingRole - ) - } - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt deleted file mode 100644 index d6f352f3db8be2..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterRouteTableStruct.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package matter.controller.cluster.structs - -import matter.controller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterRouteTableStruct( - val routerId: UByte, - val pathCost: UByte, - val LQIIn: UByte, - val LQIOut: UByte -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterRouteTableStruct {\n") - append("\trouterId : $routerId\n") - append("\tpathCost : $pathCost\n") - append("\tLQIIn : $LQIIn\n") - append("\tLQIOut : $LQIOut\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_ROUTER_ID), routerId) - put(ContextSpecificTag(TAG_PATH_COST), pathCost) - put(ContextSpecificTag(TAG_L_Q_I_IN), LQIIn) - put(ContextSpecificTag(TAG_L_Q_I_OUT), LQIOut) - endStructure() - } - } - - companion object { - private const val TAG_ROUTER_ID = 0 - private const val TAG_PATH_COST = 1 - private const val TAG_L_Q_I_IN = 2 - private const val TAG_L_Q_I_OUT = 3 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterRouteTableStruct { - tlvReader.enterStructure(tlvTag) - val routerId = tlvReader.getUByte(ContextSpecificTag(TAG_ROUTER_ID)) - val pathCost = tlvReader.getUByte(ContextSpecificTag(TAG_PATH_COST)) - val LQIIn = tlvReader.getUByte(ContextSpecificTag(TAG_L_Q_I_IN)) - val LQIOut = tlvReader.getUByte(ContextSpecificTag(TAG_L_Q_I_OUT)) - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterRouteTableStruct(routerId, pathCost, LQIIn, LQIOut) - } - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt deleted file mode 100644 index 27bdec40817eba..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadBorderRouterManagementClusterThreadNodeStruct.kt +++ /dev/null @@ -1,127 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package matter.controller.cluster.structs - -import matter.controller.cluster.* -import matter.tlv.AnonymousTag -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class ThreadBorderRouterManagementClusterThreadNodeStruct( - val extAddress: ULong, - val rloc16: UShort, - val IPv6s: List, - val routingRole: UByte, - val routeTable: List, - val childTable: List -) { - override fun toString(): String = buildString { - append("ThreadBorderRouterManagementClusterThreadNodeStruct {\n") - append("\textAddress : $extAddress\n") - append("\trloc16 : $rloc16\n") - append("\tIPv6s : $IPv6s\n") - append("\troutingRole : $routingRole\n") - append("\trouteTable : $routeTable\n") - append("\tchildTable : $childTable\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) - put(ContextSpecificTag(TAG_RLOC16), rloc16) - startArray(ContextSpecificTag(TAG_I_PV6S)) - for (item in IPv6s.iterator()) { - put(AnonymousTag, item) - } - endArray() - put(ContextSpecificTag(TAG_ROUTING_ROLE), routingRole) - startArray(ContextSpecificTag(TAG_ROUTE_TABLE)) - for (item in routeTable.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - startArray(ContextSpecificTag(TAG_CHILD_TABLE)) - for (item in childTable.iterator()) { - item.toTlv(AnonymousTag, this) - } - endArray() - endStructure() - } - } - - companion object { - private const val TAG_EXT_ADDRESS = 0 - private const val TAG_RLOC16 = 1 - private const val TAG_I_PV6S = 2 - private const val TAG_ROUTING_ROLE = 3 - private const val TAG_ROUTE_TABLE = 4 - private const val TAG_CHILD_TABLE = 5 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader - ): ThreadBorderRouterManagementClusterThreadNodeStruct { - tlvReader.enterStructure(tlvTag) - val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) - val rloc16 = tlvReader.getUShort(ContextSpecificTag(TAG_RLOC16)) - val IPv6s = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6S)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val routingRole = tlvReader.getUByte(ContextSpecificTag(TAG_ROUTING_ROLE)) - val routeTable = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_ROUTE_TABLE)) - while (!tlvReader.isEndOfContainer()) { - add( - ThreadBorderRouterManagementClusterRouteTableStruct.fromTlv(AnonymousTag, tlvReader) - ) - } - tlvReader.exitContainer() - } - val childTable = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_CHILD_TABLE)) - while (!tlvReader.isEndOfContainer()) { - add( - ThreadBorderRouterManagementClusterChildTableStruct.fromTlv(AnonymousTag, tlvReader) - ) - } - tlvReader.exitContainer() - } - - tlvReader.exitContainer() - - return ThreadBorderRouterManagementClusterThreadNodeStruct( - extAddress, - rloc16, - IPv6s, - routingRole, - routeTable, - childTable - ) - } - } -}