refactor(device): 替换消息ID生成器为UUID实现

- 移除自定义时间戳+随机数ID生成逻辑
- 集成uuid包依赖并配置版本
- 使用Uuid.v4()替换原有next()方法实现
- 更新MessageIdGenerator类文档注释
- 在JSON协议层添加设备日志警告输出
- 修改pubspec.yaml添加uuid依赖声明
This commit is contained in:
Developer
2026-06-04 16:45:06 +08:00
parent 55bdaa9211
commit 3ab2232845
4 changed files with 12 additions and 13 deletions

View File

@@ -43,6 +43,9 @@ dependencies:
# USB 串口通信Android USB Host 模式下的 CH340/FTDI/CP210x/PL2303 等芯片)
usb_serial: ^0.5.0
# 串口消息 ID 生成UUID v4
uuid: ^4.5.1
dev_dependencies:
flutter_test:
sdk: flutter