增加ping指令并获取带版本号的响应
This commit is contained in:
@@ -73,6 +73,18 @@ message LogUploadRequest {
|
||||
repeated LogEntry entries = 1; // 一批日志条目
|
||||
}
|
||||
|
||||
// 平台向设备发送的Ping指令,用于检查存活性。
|
||||
message Ping {
|
||||
// 可以留空,指令本身即代表意图
|
||||
}
|
||||
|
||||
// 设备对Ping的响应,或设备主动上报的心跳。
|
||||
// 它包含了设备的关键状态信息。
|
||||
message Pong {
|
||||
string firmware_version = 1; // 当前固件版本
|
||||
// 可以扩展更多状态, e.g., int32 uptime_seconds = 2;
|
||||
}
|
||||
|
||||
|
||||
// --- 顶层指令包装器 ---
|
||||
|
||||
@@ -85,10 +97,12 @@ message Instruction {
|
||||
BatchCollectCommand batch_collect_command = 2;
|
||||
OtaUpgradeCommand ota_upgrade_command = 3;
|
||||
ControlLogUploadCommand control_log_upload_command = 4;
|
||||
Ping ping = 6;
|
||||
|
||||
// --- 上行数据 (设备 -> 平台) ---
|
||||
CollectResult collect_result = 101;
|
||||
OtaUpgradeStatus ota_upgrade_status = 102;
|
||||
LogUploadRequest log_upload_request = 103;
|
||||
Pong pong = 104;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user