更新proto
This commit is contained in:
@@ -8,13 +8,13 @@ http://git.huangwc.com/pig/pig-farm-controller/issues/71
|
||||
|
||||
# 开发计划
|
||||
|
||||
## Lora 监听逻辑重构
|
||||
|
||||
- [x] [Lora逻辑重构](design/ota-upgrade-and-log-monitoring/lora_refactoring_plan.md)
|
||||
|
||||
## OTA 升级
|
||||
|
||||
- [x] 增加一个proto对象, 用于封装ota升级包
|
||||
- [x] 区域主控增加版本号
|
||||
- [x] 增加ping指令并获取带版本号的响应
|
||||
- [ ] [实现ota升级逻辑](design/ota-upgrade-and-log-monitoring/ota_upgrade_solution.md)
|
||||
|
||||
## Lora 监听逻辑重构
|
||||
|
||||
- [x] [Lora逻辑重构](design/ota-upgrade-and-log-monitoring/lora_refactoring_plan.md)
|
||||
|
||||
@@ -93,7 +93,6 @@ message PrepareUpdateReq {
|
||||
message RequestFile {
|
||||
string task_id = 1; // 升级任务ID
|
||||
string filepath = 2; // 请求的文件路径 (例如 "/manifest.json" 或 "/main.py")
|
||||
uint32 retry_count = 3; // 设备请求该文件的重试次数
|
||||
}
|
||||
|
||||
// FileResponse: 平台响应设备请求,发送单个文件的完整内容
|
||||
@@ -106,9 +105,8 @@ message FileResponse {
|
||||
|
||||
// UpdateStatusReport: 设备向平台报告升级状态
|
||||
message UpdateStatusReport {
|
||||
string device_id = 1; // 设备ID
|
||||
string task_id = 2; // 升级任务ID
|
||||
string current_version = 3; // 操作完成后的当前版本
|
||||
string task_id = 1; // 升级任务ID
|
||||
string current_version = 2; // 操作完成后的当前版本
|
||||
enum Status {
|
||||
STATUS_UNKNOWN = 0;
|
||||
|
||||
@@ -121,9 +119,9 @@ message UpdateStatusReport {
|
||||
// --- 平台推断的状态 (数据库记录用) ---
|
||||
FAILED_TIMEOUT = 5; // 平台在超时后仍未收到SUCCESS报告,将任务标记为此状态
|
||||
}
|
||||
Status status = 4; // 升级的最终状态
|
||||
string error_message = 6; // 人类可读的详细错误信息
|
||||
string failed_file = 7; // 失败时关联的文件路径 (可选)
|
||||
Status status = 3; // 升级的最终状态
|
||||
string error_message = 4; // 人类可读的详细错误信息
|
||||
string failed_file = 5; // 失败时关联的文件路径 (可选)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user