diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt index 5494a0ca96..c35388c799 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt @@ -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() { diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt index c50de87886..44a6df9928 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt @@ -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?) /** * 结束自动驾驶 */ diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt index 33fdcfc114..4fcd1caeb3 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt @@ -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) } } diff --git a/libraries/mogo-adas-data/src/main/proto/message_pad.proto b/libraries/mogo-adas-data/src/main/proto/message_pad.proto index b9f77fc20f..1eea55625d 100644 --- a/libraries/mogo-adas-data/src/main/proto/message_pad.proto +++ b/libraries/mogo-adas-data/src/main/proto/message_pad.proto @@ -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 diff --git a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java index f0fe7c4cfd..5bffbbdb18 100644 --- a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java +++ b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasChannel.java @@ -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()); } diff --git a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasManager.java b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasManager.java index e5d2ee826e..e42e9e8a4c 100644 --- a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasManager.java +++ b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/AdasManager.java @@ -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); } /** diff --git a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/IAdasNetCommApi.java b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/IAdasNetCommApi.java index 60fd358dee..2fe9edf506 100644 --- a/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/IAdasNetCommApi.java +++ b/libraries/mogo-adas/src/main/java/com/zhidao/support/adas/high/IAdasNetCommApi.java @@ -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); /** * 发送 状态查询请求