[8.1.0][adas] 新增OTA 2.0 接口
This commit is contained in:
@@ -606,6 +606,22 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OTA 2.0 新接口
|
||||
*
|
||||
* @param header 头
|
||||
* @param token PadSsmMsg唯一消息ID
|
||||
* @param timestamp 消息发送时间 单位:毫秒
|
||||
* @param status OTA 2.0 数据
|
||||
*/
|
||||
override fun onOtaPureStr(
|
||||
header: MessagePad.Header?,
|
||||
token: Long,
|
||||
timestamp: Long,
|
||||
status: SsmInfo.PureStr?
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 冷启动状态变更上报以及查询状态
|
||||
*
|
||||
|
||||
@@ -65,6 +65,8 @@ enum MessageType {
|
||||
COLD_START_STATE_QUERY = 7; // 冷启动状态查询 req:None resp:ColdStartState
|
||||
AUTO_PILOT_INFO = 8; // 自驾命令状态查询 resp:AutoPilotInfo
|
||||
STATION_STATUS_QUERY = 9; //到站信息查询 req: OrderInfo resp:AutoPilotStation
|
||||
OPERATE_STATUS = 10; // pad下发运营状态
|
||||
OTA_PAD_MSG = 11;
|
||||
}
|
||||
|
||||
message PadSsmMsg {
|
||||
@@ -85,6 +87,11 @@ message Notification {
|
||||
required string msg = 2; // 通知
|
||||
}
|
||||
|
||||
//MessageType.OTA_PAD_MSG
|
||||
message PureStr {
|
||||
required string data = 1;
|
||||
}
|
||||
|
||||
enum OtaType {
|
||||
IMAGE = 1;
|
||||
FIRMWARE = 2;
|
||||
@@ -181,7 +188,7 @@ message ColdStartNode {
|
||||
required string node_name = 1; //节点名称
|
||||
required string event_code = 2; //上报事件
|
||||
required NodeStatus status = 3; //0:启动中, 1:启动成功, 2:启动失败, 3:启动超时
|
||||
required string desc = 4; //事件描述
|
||||
required string desc = 4; //事件描述
|
||||
repeated string have_flt = 5; //故障码
|
||||
}
|
||||
|
||||
@@ -211,4 +218,8 @@ message OrderInfo{
|
||||
message AutoPilotStation {
|
||||
required bool arrived_station_flag = 1; //是否到站
|
||||
optional string order_id = 2; //订单号
|
||||
}
|
||||
}
|
||||
|
||||
message OperateStatus{
|
||||
required uint32 operate_status = 1; // 1:开始,2:结束
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public interface OnAdasListener {
|
||||
* @param header 头
|
||||
* @param predictionObjects 他车轨迹预测数据
|
||||
*/
|
||||
void onPredictionObstacleTrajectory(@NonNull MessagePad.Header header,@NonNull Prediction2025.mPredictionObjects predictionObjects);
|
||||
void onPredictionObstacleTrajectory(@NonNull MessagePad.Header header, @NonNull Prediction2025.mPredictionObjects predictionObjects);
|
||||
|
||||
/**
|
||||
* 透传的点云数据
|
||||
@@ -250,6 +250,16 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onOtaStatus(MessagePad.Header header, long token, long timestamp, boolean isQuery, @Nullable SsmInfo.OtaStatus status);
|
||||
|
||||
/**
|
||||
* OTA 2.0 新接口
|
||||
*
|
||||
* @param header 头
|
||||
* @param token PadSsmMsg唯一消息ID
|
||||
* @param timestamp 消息发送时间 单位:毫秒
|
||||
* @param status OTA 2.0 数据
|
||||
*/
|
||||
void onOtaPureStr(MessagePad.Header header, long token, long timestamp, @Nullable SsmInfo.PureStr status);
|
||||
|
||||
/**
|
||||
* 冷启动状态变更上报以及查询状态
|
||||
*
|
||||
|
||||
@@ -80,6 +80,15 @@ public class PadSsmFuncMsgMessage extends MyAbstractMessageHandler {
|
||||
if (adasListener != null) {
|
||||
adasListener.onOtaStatus(raw.getHeader(), padSsmMsg.getToken(), timestamp, type == SsmInfo.MessageType.OTA_STATUS_QUERY, status);
|
||||
}
|
||||
} else if (type == SsmInfo.MessageType.OTA_PAD_MSG) {
|
||||
//SSM OTA2.0接口
|
||||
SsmInfo.PureStr pure = null;
|
||||
if (!data.isEmpty()) {
|
||||
pure = SsmInfo.PureStr.parseFrom(data);
|
||||
}
|
||||
if (adasListener != null) {
|
||||
adasListener.onOtaPureStr(raw.getHeader(), padSsmMsg.getToken(), timestamp, pure);
|
||||
}
|
||||
}
|
||||
AdasChannel.calculateTimeConsumingBusiness("SSM功能", nowTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user