From b134358cdca07be4e2195e8069475b7b935d6223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Mon, 19 Jan 2026 16:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thingsboard/constants/DeviceTelemetry.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/ruoyi/device/domain/model/thingsboard/constants/DeviceTelemetry.java b/src/main/java/com/ruoyi/device/domain/model/thingsboard/constants/DeviceTelemetry.java index 7ed4681..286ebd3 100644 --- a/src/main/java/com/ruoyi/device/domain/model/thingsboard/constants/DeviceTelemetry.java +++ b/src/main/java/com/ruoyi/device/domain/model/thingsboard/constants/DeviceTelemetry.java @@ -23,6 +23,21 @@ public class DeviceTelemetry { * 无人机独状态 */ + /** + * 网络类型 {"1":"4G","2":"以太网"} + */ + + public static final TelemetryKey Network_State_Type = TelemetryKey.of( + "network_state.type", + Integer.class, + value -> { + if (value == null) return null; + if (value instanceof Number) { + return ((Number) value).intValue(); + } + return Integer.parseInt(value.toString()); + } + ); /** * 运行时长 {"unit_name":"秒 / s"} @@ -250,7 +265,8 @@ public class DeviceTelemetry { Total_Flight_Sorties, Drone_Charge_State_State, Drone_In_Dock, - Acc_Time + Acc_Time, + Network_State_Type ); }