[684][adas]轨迹下载新增订单号参数

This commit is contained in:
xinfengkun
2024-12-11 17:27:05 +08:00
parent da85bc2215
commit 855c06b91c
7 changed files with 35 additions and 15 deletions

View File

@@ -452,15 +452,27 @@ class MoGoAutopilotControlProvider :
)
}
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?) {
AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(),routeInfo)
override fun sendTrajectoryDownloadReq(
autoPilotLine: AutopilotControlParameters.AutoPilotLine,
routeInfo: MessagePad.RouteInfo?,
orderId: String?
) {
AdasManager.getInstance()
.sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(), routeInfo, orderId)
}
override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?) {
override fun sendTrajectoryDownloadReq(
autoPilotLine: AutopilotControlParameters.AutoPilotLine,
downloadType: Int,
routeInfo: MessagePad.RouteInfo?,
orderId: String?
) {
AdasManager.getInstance().sendTrajectoryDownloadReq(
autoPilotLine.toAutoPilotLine(),
downloadType,
routeInfo)
routeInfo,
orderId
)
}
override fun cancelAutoPilot() {

View File

@@ -61,7 +61,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
* @param autoPilotLine 线路相关参数详情见PB message_pad.proto -> Line
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
*/
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?)
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?, orderId:String?)
/**
* 发送 轨迹下载请求
@@ -70,7 +70,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
* @param downloadType 下载类型: 0:正常下载 1:预下载
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
*/
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?)
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?, orderId:String?)
/**
* 结束自动驾驶
*/

View File

@@ -209,7 +209,7 @@ object CallerAutoPilotControlManager {
fun sendTrajectoryDownloadReq(autopilotControlParameters: AutopilotControlParameters,downloadType: Int=0) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
// Routing 需要传参 routeInfo
providerApi?.sendTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, autopilotControlParameters.toRouteInfo())
providerApi?.sendTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, autopilotControlParameters.toRouteInfo(),"")
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, downloadType)
}
}
@@ -221,7 +221,7 @@ object CallerAutoPilotControlManager {
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
//TODO Routing 需要传参 routeInfo这里建议业务侧重新整合到同一个数据实体内传入
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null)
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null,"")
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, 0)
}
}
@@ -233,7 +233,7 @@ object CallerAutoPilotControlManager {
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
//TODO Routing 需要传参 routeInfo这里建议业务侧重新整合到同一个数据实体内传入
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null)
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null,"")
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, downloadType)
}
}

View File

@@ -435,6 +435,7 @@ message TrajectoryDownloadReq
uint32 downloadType = 3; //下载类型: 0:正常下载 1:预下载
RouteInfo routeInfo = 4; //20240523 进行自动算路务必下单时候携带自动驾驶路径信息否则可不填Line信息重复
CmdInfo cmd_info = 5; //自驾命令信息
}
// message definition for MessageType: MsgTypeBasicInfoReq

View File

@@ -1656,6 +1656,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
* @param line 线路相关参数详情见PB message_pad.proto -> Line
* @param downloadType 下载类型: 0:正常下载 1:预下载
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
* @param orderId 订单号
* @return 消息是否添加到WS消息发送队列返回值为非0的正整数时表示下发消息的消息ID
* * >=0表示添加到WS发送消息队列
* * =0表示乘客屏模式添加到WS发送消息队列
@@ -1668,7 +1669,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
paramIndexes = {0}
)
@Override
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo) {
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo, String orderId) {
MessagePad.TrajectoryDownloadReq.Builder builder = MessagePad.TrajectoryDownloadReq.newBuilder();
builder.setSource(1);//指令来源: 0: default, 1:pad, 2:aicloud
if (line != null) {
@@ -1680,6 +1681,9 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
if (routeInfo != null) {
builder.setRouteInfo(routeInfo);
}
if (orderId != null) {
builder.setCmdInfo(MessagePad.CmdInfo.newBuilder().setOrderId(orderId));
}
MessagePad.TrajectoryDownloadReq req = builder.build();
return sendPBMessage(MessageType.TYPE_SEND_TRAJECTORY_DOWNLOAD_REQ, req.toByteArray());
}

View File

@@ -763,13 +763,14 @@ public class AdasManager implements IAdasNetCommApi {
*
* @param line 线路相关参数详情见PB message_pad.proto -> Line
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
* @param orderId 订单号
* @return 消息是否添加到WS消息发送队列返回值为非0的正整数时表示下发消息的消息ID
* * >=0表示添加到WS发送消息队列
* * =0表示乘客屏模式添加到WS发送消息队列
* * -1L添加到WS发送消息队列失败
*/
public long sendTrajectoryDownloadReq(MessagePad.Line line, MessagePad.RouteInfo routeInfo) {
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, -1, routeInfo);
public long sendTrajectoryDownloadReq(MessagePad.Line line, MessagePad.RouteInfo routeInfo, String orderId) {
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, -1, routeInfo, orderId);
}
/**
@@ -779,14 +780,15 @@ public class AdasManager implements IAdasNetCommApi {
* @param line 线路相关参数详情见PB message_pad.proto -> Line
* @param downloadType 下载类型: 0:正常下载 1:预下载
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
* @param orderId 订单号
* @return 消息是否添加到WS消息发送队列返回值为非0的正整数时表示下发消息的消息ID
* * >=0表示添加到WS发送消息队列
* * =0表示乘客屏模式添加到WS发送消息队列
* * -1L添加到WS发送消息队列失败
*/
@Override
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo) {
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, downloadType, routeInfo);
public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo, String orderId) {
return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, downloadType, routeInfo, orderId);
}
/**

View File

@@ -472,12 +472,13 @@ public interface IAdasNetCommApi {
* @param line 线路相关参数详情见PB message_pad.proto -> Line
* @param downloadType 下载类型: 0:正常下载 1:预下载
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
* @param orderId 订单号
* @return 消息是否添加到WS消息发送队列返回值为非0的正整数时表示下发消息的消息ID
* * >=0表示添加到WS发送消息队列
* * =0表示乘客屏模式添加到WS发送消息队列
* * -1L添加到WS发送消息队列失败
*/
long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo);
long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, MessagePad.RouteInfo routeInfo, String orderId);
/**
* 发送 状态查询请求