fix:TextInput support hot update;feat:add zero color and update
algorithm
This commit is contained in:
@@ -461,6 +461,44 @@ classDiagram
|
||||
- `m_protocols`:协议字典。
|
||||
- `m_activeName`:当前协议名。
|
||||
|
||||
### 协议插件化(`plugins/decoders`)
|
||||
- 目标:每个协议作为独立 DLL 插件,可按需安装与动态加载。
|
||||
- 关键接口:
|
||||
- `IProtocolPlugin`:暴露 `protocolName()` / `apiVersion()` / `createBundle()`。
|
||||
- `ProtocolBundle`:`codec/decoder/format` 三件套。
|
||||
- 加载流程:
|
||||
- `SerialBackend` 启动时调用 `SerialManager::loadPlugins()`。
|
||||
- `SerialManager` 扫描 `appDir/plugins/decoders` 目录,按平台过滤后缀(Windows: `.dll`)。
|
||||
- 校验 `apiVersion`,创建并注册协议 bundle。
|
||||
- 通过 `m_pluginLoaders` 保持插件常驻,避免对象失效。
|
||||
|
||||
#### 插件 UML (Mermaid)
|
||||
```mermaid
|
||||
classDiagram
|
||||
class IProtocolPlugin {
|
||||
+protocolName()
|
||||
+apiVersion()
|
||||
+createBundle()
|
||||
}
|
||||
class ProtocolBundle {
|
||||
+codec
|
||||
+decoder
|
||||
+format
|
||||
}
|
||||
class SerialManager {
|
||||
+loadPlugins(dir)
|
||||
+registerProtocol()
|
||||
+setActiveProtocol()
|
||||
}
|
||||
class SerialBackend {
|
||||
+initPlugins()
|
||||
}
|
||||
|
||||
SerialBackend --> SerialManager
|
||||
SerialManager --> IProtocolPlugin
|
||||
IProtocolPlugin --> ProtocolBundle
|
||||
```
|
||||
|
||||
### ISerialTransport (`src/serial/serial_transport.h`)
|
||||
- 作用:串口传输抽象层,屏蔽不同平台差异。
|
||||
- 接口:
|
||||
@@ -633,6 +671,7 @@ classDiagram
|
||||
|
||||
## 更新记录
|
||||
|
||||
- 2026-01-20:协议解码插件化(DLL),SerialBackend 启动时动态加载 `plugins/decoders`,安装器支持按组件选择协议插件。
|
||||
- 2026-01-11:新增 `QtSerialTransport`(`QSerialPort` 传输实现)并设为默认传输;补齐点选拾取逻辑;新增数据流/时序图并补充可视化 TODO 说明。
|
||||
- 2026-01-12:`LeftPanel` 新增颜色映射参数;`AppBackend`/`GLWidget` 增加颜色与范围接口,shader 使用三色渐变映射数据值。
|
||||
- 2026-01-11:补充串口配置流程图与配置接口说明(协议/参数/解码器绑定/打开流程)。
|
||||
|
||||
Reference in New Issue
Block a user