feat: 无人机产品id改为AutoDock3

This commit is contained in:
2026-01-26 13:21:42 +08:00
parent 763d60651d
commit 607c13c77c
3 changed files with 14 additions and 14 deletions
@@ -394,12 +394,12 @@ public class JetLinksWebSocketClient extends TextWebSocketHandler {
String[] parts = topic.split("/"); String[] parts = topic.split("/");
// 格式1: /device/D-Dock2/{deviceSn}/... // 格式1: /device/D-Dock2/{deviceSn}/...
if (topic.startsWith("/device/D-Dock2/") && parts.length >= 4) { if (topic.startsWith("/device/AutoDock3/") && parts.length >= 4) {
return parts[3]; return parts[3];
} }
// 格式2: /device-message-sender/D-Dock2/{deviceSn} // 格式2: /device-message-sender/D-Dock2/{deviceSn}
if (topic.startsWith("/device-message-sender/D-Dock2/") && parts.length >= 4) { if (topic.startsWith("/device-message-sender/AutoDock3/") && parts.length >= 4) {
return parts[3]; return parts[3];
} }
@@ -153,7 +153,7 @@ public class DeviceCommandManager {
// 构造完整消息 // 构造完整消息
JSONObject message = new JSONObject(); JSONObject message = new JSONObject();
message.put("type", "sub"); message.put("type", "sub");
message.put("topic", "/device-message-sender/D-Dock2/" + command.getDeviceSn()); message.put("topic", "/device-message-sender/AutoDock3/" + command.getDeviceSn());
message.put("parameter", parameter); message.put("parameter", parameter);
message.put("id", command.getCommandId()); message.put("id", command.getCommandId());
@@ -12,59 +12,59 @@ public enum SubscriptionTopic {
/** /**
* 设备上线 * 设备上线
*/ */
ONLINE("/device/D-Dock2/{deviceSn}/online"), ONLINE("/device/AutoDock3/{deviceSn}/online"),
/** /**
* 设备离线 * 设备离线
*/ */
OFFLINE("/device/D-Dock2/{deviceSn}/offline"), OFFLINE("/device/AutoDock3/{deviceSn}/offline"),
/** /**
* 平台主动断开连接 * 平台主动断开连接
*/ */
DISCONNECT("/device/D-Dock2/{deviceSn}/disconnect"), DISCONNECT("/device/AutoDock3/{deviceSn}/disconnect"),
/** /**
* 平台主动断开连接回复 * 平台主动断开连接回复
*/ */
DISCONNECT_REPLY("/device/D-Dock2/{deviceSn}/disconnect/reply"), DISCONNECT_REPLY("/device/AutoDock3/{deviceSn}/disconnect/reply"),
/** /**
* 设备状态事件(fire_alarm) * 设备状态事件(fire_alarm)
* 注意:这不是火警告警,而是设备状态事件上报,用于获取设备完整状态信息 * 注意:这不是火警告警,而是设备状态事件上报,用于获取设备完整状态信息
*/ */
EVENT_FIRE_ALARM("/device/D-Dock2/{deviceSn}/message/event/fire_alarm"), EVENT_FIRE_ALARM("/device/AutoDock3/{deviceSn}/message/event/fire_alarm"),
/** /**
* 无人机遥测数据事件(msg_alarm) * 无人机遥测数据事件(msg_alarm)
* 包含无人机飞行状态、电池、GPS、相机等完整遥测数据 * 包含无人机飞行状态、电池、GPS、相机等完整遥测数据
*/ */
EVENT_MSG_ALARM("/device/D-Dock2/{deviceSn}/message/event/msg_alarm"), EVENT_MSG_ALARM("/device/AutoDock3/{deviceSn}/message/event/msg_alarm"),
/** /**
* 设备上报属性 * 设备上报属性
*/ */
PROPERTY_REPORT("/device/D-Dock2/{deviceSn}/message/property/report"), PROPERTY_REPORT("/device/AutoDock3/{deviceSn}/message/property/report"),
/** /**
* 读取属性 * 读取属性
*/ */
PROPERTY_READ("/device/D-Dock2/{deviceSn}/message/send/property/read"), PROPERTY_READ("/device/AutoDock3/{deviceSn}/message/send/property/read"),
/** /**
* 读取属性回复 * 读取属性回复
*/ */
PROPERTY_READ_REPLY("/device/D-Dock2/{deviceSn}/message/property/read/reply"), PROPERTY_READ_REPLY("/device/AutoDock3/{deviceSn}/message/property/read/reply"),
/** /**
* 修改属性 * 修改属性
*/ */
PROPERTY_WRITE("/device/D-Dock2/{deviceSn}/message/send/property/write"), PROPERTY_WRITE("/device/AutoDock3/{deviceSn}/message/send/property/write"),
/** /**
* 修改属性回复 * 修改属性回复
*/ */
PROPERTY_WRITE_REPLY("/device/D-Dock2/{deviceSn}/message/property/write/reply"); PROPERTY_WRITE_REPLY("/device/AutoDock3/{deviceSn}/message/property/write/reply");
private final String topicPattern; private final String topicPattern;