RTU/mimo/plan/self_ptl缺陷优化方案.md

35 lines
879 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Self_PTL 剩余缺陷优化方案
## 🔴 高优先级
### T1: D4 测试命令分离
**文件**: `self_ptl.cpp:985-988`, `method.cpp:1061-1074`
`self_ptl_method_task()` 每 TIMER2 tick 无条件执行,迭代 g_map_local_test。
优化:增加 `g_self_ptl_test_active` 标志,仅当 cmd_self_ptl 触发测试时才在 TIMER2 中调用。
### T2: D2 环形缓冲保护
**文件**: `self_ptl.cpp:98-139`
当前 put/get 在同一线程,但无保护。增加 pthread_mutex_t 到 stru_self_rx 中。
## 🟡 中优先级
### T3: D3 溢出日志
**文件**: `self_ptl.cpp:117`
取消注释 LOG_E增加 overflow_cnt 计数。
### T4: D8 SBO 超时
涉及 `stru_signal_ctrl` + `dc_signal.cpp`,范围较广需确认。
## 🟢 低优先级
### T5: D6 硬编码
**文件**: `self_ptl.cpp`
2048/256 → 命名 #define
### T6: D7 双缓冲
改动大,暂缓。