- 移除OtaRelay职责过载问题,将状态查询统一收口到OtaCoordinator::getSnapshot() - 新增OtaSnapshot结构体,一次性获取完整的OTA系统状态快照,避免分散读取 - 将GD32 APP探测逻辑从system_status_handler中分离,提供独立的/system/probe端点 - 修复并发安全隐患,确保processEvent()读取relayState时持有锁保护 - 优化SPI通信相关代码结构,提升系统稳定性 BREAKING CHANGE: 移除了原有的分散状态查询接口,统一使用快照方式获取状态
17 lines
620 B
C
17 lines
620 B
C
/*
|
||
* ota_snapshot.h - OTA 状态只读快照(便捷聚合头文件)
|
||
*
|
||
* 本文件本身不包含结构体定义,仅聚合两个快照来源:
|
||
* - RelaySnapshot → 定义在 relay/ota_relay.h(一次锁保护读取 relay 进度)
|
||
* - OtaSnapshot → 定义在 ota/ota_coordinator.h(coordinator + meta + relay 快照)
|
||
*
|
||
* HTTP handler 等消费方只需 #include "ota/ota_snapshot.h" 即可使用两种快照。
|
||
*/
|
||
#ifndef OTA_SNAPSHOT_H
|
||
#define OTA_SNAPSHOT_H
|
||
|
||
#include "relay/ota_relay.h" // RelaySnapshot
|
||
#include "ota/ota_coordinator.h" // OtaSnapshot
|
||
|
||
#endif // OTA_SNAPSHOT_H
|