[690][adas]OTA升级功能接口修改

This commit is contained in:
xinfengkun
2024-12-02 15:16:19 +08:00
parent fdf1e4c0c4
commit e342a8d735
7 changed files with 84 additions and 65 deletions

View File

@@ -58,7 +58,7 @@ enum MessageType {
NOTIFICATION = 0; // ssm发送通知 msg:Notification
OTA_DOWNLOAD_REQUEST = 1; // ssm发送OTA升级提示请求 todo
OTA_DOWNLOAD_RESPONSE = 2; // pad下发OTA升级提示响应 todo
OTA_LOADING_PROGRESS = 3; // ssm上报OTA下载进度, 开始升级后定频上报 todo
OTA_LOADING_PROGRESS = 3; // ssm上报OTA下载进度, 开始升级后定频上报 todo 废弃 使用OTA_STATUS 定频推送的进度来为下载时是0.1Hz下载时是1Hz此接口无法表示多任务所以废弃
OTA_STATUS = 4; // ssm 上报OTA状态 todo
OTA_STATUS_QUERY = 5; // pad查询OTA状态 req:OtaToken resp:OtaStatus
COLD_START_STATUS_REPORT = 6; // 冷启动状态上报 msg:ColdStartState
@@ -91,13 +91,41 @@ enum OtaType {
MAP = 3;
PROFILE = 4;
}
//product_name中的数据
//[{
// "token": "12,34,56",
// "status": 0,// 与 UpgradeStatus 中的值相同
// "fail_reason": "",
// "upgrade_reason": "",
// "task_id": 0,
// "task_item_id": 0,
// "ota_type": 1,
// "product_name": "",
// "need_restart": false,
// "is_delay": false,
// "cur_size": 0,
// "total_size": 0
//}, {
// "token": "34,56,78",
// "status": 0,
// "fail_reason": "",
// "upgrade_reason": "",
// "task_id": 0,
// "task_item_id": 0,
// "ota_type": 1,
// "product_name": "",
// "need_restart": false,
// "is_delay": false,
// "cur_size": 0,
// "total_size": 0
//}]
message OtaDownloadRequest {
required string ota_token = 1; // ota token 唯一标识
required OtaType ota_type = 2; // ota type 1:镜像, 2:固件, 3:地图, 4:配置文件
required bool need_restart = 3; // 是否需要重启 True:需要, False:不需要
required OtaType ota_type = 2; // ota type 1:镜像, 2:固件, 3:地图, 4:配置文件 todo 废弃使用product_name json中的 ota_type
required bool need_restart = 3; // 是否需要重启 True:需要, False:不需要 todo 废弃使用product_name json中的 need_restart
required string product_name = 4; // 制品名称
optional double size = 5; // 文件大小 Mb
optional double size = 5; // 文件大小 Mb todo 废弃使用product_name json中的 cur_size total_size
}
enum IfUpgrade {
@@ -130,8 +158,8 @@ enum UpgradeStatus {
message OtaStatus {
required OtaDownloadRequest ota_info = 1; // 升级信息
required UpgradeStatus status = 2; // 状态 0:默认(未开始), 1:下载中, 2:下载完成, 3:升级完成, 4:升级失败
optional string reason = 3; // 失败原因
required UpgradeStatus status = 2; // 状态 0:默认(未开始), 1:下载中, 2:下载完成, 3:升级完成, 4:升级失败 todo 废弃使用product_name json中的 status
optional string reason = 3; // 失败原因 todo 废弃 todo 废弃使用product_name json中的 fail_reason
}
enum CSState {