From 2278c848e0330f1760eeeb4a5a2e83209b122259 Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Fri, 24 May 2024 13:20:08 +0800 Subject: [PATCH] =?UTF-8?q?[adas]=20=E5=90=AF=E5=8A=A8=E8=87=AA=E9=A9=BE?= =?UTF-8?q?=E4=B8=8E=E4=B8=8B=E8=BD=BD=E8=BD=A8=E8=BF=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E7=AE=97=E8=B7=AF=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autopilot/MoGoAutopilotControlProvider.kt | 26 ++++++++++------- .../IMoGoAutopilotControlProvider.kt | 11 +++++-- .../CallerAutoPilotControlManager.kt | 6 ++-- .../src/main/proto/message_pad.proto | 11 +++++++ .../zhidao/support/adas/high/AdasChannel.java | 26 ++++++++++++----- .../zhidao/support/adas/high/AdasManager.java | 29 +++++++++++-------- .../support/adas/high/IAdasNetCommApi.java | 17 ++++++----- 7 files changed, 83 insertions(+), 43 deletions(-) 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 b932142efa..f1f21e1750 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 @@ -383,12 +383,12 @@ class MoGoAutopilotControlProvider : private fun startAutoPilotWithNoParameter(source: Int) { if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { val invokeResult = AdasManager.getInstance() - .sendAutoPilotModeReq(1, source, null) + .sendAutoPilotModeReq(1, source, null, false) invokeAutoPilotResult(if (invokeResult > -1) "无参自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空") } else { if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) { val invokeResult = AdasManager.getInstance() - .sendAutoPilotModeReq(1, source, null) + .sendAutoPilotModeReq(1, source, null, false) invokeAutoPilotResult(if (invokeResult > -1) "无参自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空") } else { invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶 无参") @@ -399,12 +399,12 @@ class MoGoAutopilotControlProvider : private fun startAutoPilot(controlParameters: AutopilotControlParameters, source: Int) { if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { val invokeResult = AdasManager.getInstance() - .sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo()) + .sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), false) invokeAutoPilotResult(if (invokeResult > -1) "自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空") } else { if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) { val invokeResult = AdasManager.getInstance() - .sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo()) + .sendAutoPilotModeReq(1, source, controlParameters.toRouteInfo(), false) invokeAutoPilotResult(if (invokeResult > -1) "自动驾驶调用成功:${invokeResult}" else "自动驾驶调用失败, socket 或者 rawPack 可能为空") } else { invokeAutoPilotResult("车机与工控机链接失败,无法开启自动驾驶") @@ -440,17 +440,21 @@ class MoGoAutopilotControlProvider : ) } - override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) { - AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine()) + override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo) { + AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(),isAutoRouting,routeInfo) } - override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) { - AdasManager.getInstance().sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(), downloadType) + override fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo) { + AdasManager.getInstance().sendTrajectoryDownloadReq( + autoPilotLine.toAutoPilotLine(), + downloadType, + isAutoRouting, + routeInfo) } override fun cancelAutoPilot() { if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) { - AdasManager.getInstance().sendAutoPilotModeReq(0, 1, null) + AdasManager.getInstance().sendAutoPilotModeReq(0, 1, null, false) } else { CallerLogger.e("$M_D_C$TAG", "车机与工控机链接失败,无法断开自动驾驶") } @@ -920,11 +924,11 @@ class MoGoAutopilotControlProvider : */ override fun setControlAutopilotCarAuto(isEnable: Boolean) { if (isEnable) { - AdasManager.getInstance().sendAutoPilotModeReq(1, 0, null) + AdasManager.getInstance().sendAutoPilotModeReq(1, 0, null, false) } else { // 司机屏才可关闭自动驾驶 if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - AdasManager.getInstance().sendAutoPilotModeReq(0, 0, null) + AdasManager.getInstance().sendAutoPilotModeReq(0, 0, null, false) } } } 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 805b79c7e9..5d8d0f4ff6 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 @@ -13,6 +13,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm.TaskConfi import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop.StopTaskResp import com.zhjt.mogo.adas.data.AdasConstants import com.zhjt.mogo.adas.data.sweeper.task.cloud.s_r.SweeperTaskCloudSuspendResume.BigTaskActionResp +import mogo.telematics.pad.MessagePad import mogo.yycp.paralleldriving.protocol.ParallelDrivingRequest /** @@ -55,13 +56,17 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider { /** * 发送 轨迹下载请求 */ - fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) + fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo) /** * 发送 轨迹下载请求 - * @param downloadType 下载类型: 0:正常下载 1:预下载 + * + * @param autoPilotLine 线路相关参数详情见PB message_pad.proto -> Line + * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param isAutoRouting 20240523 是否进行自动算路 + * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! */ - fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) + fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, isAutoRouting: Boolean, routeInfo: MessagePad.RouteInfo) /** * 结束自动驾驶 */ 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 2abbfb75b6..945ced2c4a 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 @@ -182,7 +182,8 @@ object CallerAutoPilotControlManager { */ fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) { if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - providerApi?.sendTrajectoryDownloadReq(autoPilotLine) + //TODO 需要传参 isAutoRouting, routeInfo +// providerApi?.sendTrajectoryDownloadReq(autoPilotLine, isAutoRouting, routeInfo) CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, 0) } } @@ -193,7 +194,8 @@ object CallerAutoPilotControlManager { */ fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) { if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType) + //TODO 需要传参 isAutoRouting, routeInfo +// providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, isAutoRouting, routeInfo) 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 962820c486..bbb60baffe 100644 --- a/libraries/mogo-adas-data/src/main/proto/message_pad.proto +++ b/libraries/mogo-adas-data/src/main/proto/message_pad.proto @@ -272,6 +272,9 @@ message TrajectoryDownloadReq Line line = 1; //路线 uint32 source = 2; //指令来源: 0: default, 1:pad, 2:aicloud uint32 downloadType = 3; //下载类型: 0:正常下载 1:预下载 + + bool isAutoRouting = 4; //20240523 是否进行自动算路 + RouteInfo routeInfo = 5; //20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! } // message definition for MessageType: MsgTypeBasicInfoReq @@ -297,6 +300,8 @@ message Location double latitude = 2; double altitude = 3; double heading = 4; + + bool station = 5; //20240523, 判断此点是中间站点还是途径点 ------- true:站点, false:简单的途径点 } message RouteInfo @@ -312,6 +317,10 @@ message RouteInfo uint32 routeID = 9; string routeName = 10; Line line = 11; //路线信息 + + string newRoutingMd5 = 12; //20240523 默认空值"":原有轨迹线路;若存在有效MD5值,新算路信息 + repeated Location blackPoints = 13; //20240523 不让走的道路,异常线路点 + bool isRestart = 14; //20240523 用于表示判断是否是起点下单。默认false:起点下单, true: 中间站点下单 或者接管后重新启动 } message SetAutopilotModeReq @@ -319,6 +328,8 @@ message SetAutopilotModeReq uint32 mode = 1; //1: enter autopilot mode, 0: quit autopilot mode uint32 source = 2; //命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) RouteInfo routeInfo = 3; //自动驾驶路径信息 + + bool isAutoRouting = 4; //20240523 是否进行自动算路 } // message definition for MsgTypeSetDemoModeReq 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 6460ecf0bf..f3d0c82a56 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 @@ -1189,21 +1189,23 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec * 设置自动驾驶模式 启动自动驾驶 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param mode 1: enter autopilot mode, 0: quit autopilot mode - * @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) - * @param routeInfo 自动驾驶路径信息 + * @param mode 1: enter autopilot mode, 0: quit autopilot mode + * @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) + * @param routeInfo 自动驾驶路径信息 + * @param isAutoRouting 20240523 是否进行自动算路 * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 * * -1L:添加到WS发送消息队列失败 */ @Override - public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo) { + public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo, boolean isAutoRouting) { MessagePad.SetAutopilotModeReq.Builder builder = MessagePad.SetAutopilotModeReq.newBuilder(); builder.setMode(mode); builder.setSource(source); if (routeInfo != null) builder.setRouteInfo(routeInfo); + builder.setIsAutoRouting(isAutoRouting); MessagePad.SetAutopilotModeReq req = builder.build(); if (autopilotReview != null) autopilotReview.onAutopilotCommandTrigger(req); return sendPBMessage(MessageType.TYPE_SEND_SET_AUTOPILOT_MODE_REQ, req.toByteArray()); @@ -1655,8 +1657,10 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec * 发送 轨迹下载请求 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param line 线路相关参数详情见PB message_pad.proto -> Line - * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param line 线路相关参数详情见PB message_pad.proto -> Line + * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param isAutoRouting 20240523 是否进行自动算路 + * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 @@ -1669,13 +1673,19 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec paramIndexes = {0} ) @Override - public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType) { + public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, boolean isAutoRouting, MessagePad.RouteInfo routeInfo) { MessagePad.TrajectoryDownloadReq.Builder builder = MessagePad.TrajectoryDownloadReq.newBuilder(); builder.setSource(1);//指令来源: 0: default, 1:pad, 2:aicloud - builder.setLine(line); + if (line != null) { + builder.setLine(line); + } if (downloadType > -1) { builder.setDownloadType(downloadType); } + builder.setIsAutoRouting(isAutoRouting); + if (routeInfo != null) { + builder.setRouteInfo(routeInfo); + } 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 f29f121e3c..7f9669cdf3 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 @@ -393,17 +393,18 @@ public class AdasManager implements IAdasNetCommApi { * 设置自动驾驶模式 启动自动驾驶 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param mode 1: enter autopilot mode, 0: quit autopilot mode - * @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) - * @param routeInfo 自动驾驶路径信息 + * @param mode 1: enter autopilot mode, 0: quit autopilot mode + * @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) + * @param routeInfo 自动驾驶路径信息 + * @param isAutoRouting 20240523 是否进行自动算路 * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 * * -1L:添加到WS发送消息队列失败 */ @Override - public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo) { - return mChannel == null ? -1L : mChannel.sendAutoPilotModeReq(mode, source, routeInfo); + public long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo, boolean isAutoRouting) { + return mChannel == null ? -1L : mChannel.sendAutoPilotModeReq(mode, source, routeInfo, isAutoRouting); } /** @@ -758,30 +759,34 @@ public class AdasManager implements IAdasNetCommApi { * 发送 轨迹下载请求 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param line 线路相关参数详情见PB message_pad.proto -> Line + * @param line 线路相关参数详情见PB message_pad.proto -> Line + * @param isAutoRouting 20240523 是否进行自动算路 + * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 * * -1L:添加到WS发送消息队列失败 */ - public long sendTrajectoryDownloadReq(MessagePad.Line line) { - return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, -1); + public long sendTrajectoryDownloadReq(MessagePad.Line line, boolean isAutoRouting, MessagePad.RouteInfo routeInfo) { + return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, -1, isAutoRouting, routeInfo); } /** * 发送 轨迹下载请求 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param line 线路相关参数详情见PB message_pad.proto -> Line - * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param line 线路相关参数详情见PB message_pad.proto -> Line + * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param isAutoRouting 20240523 是否进行自动算路 + * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 * * -1L:添加到WS发送消息队列失败 */ @Override - public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType) { - return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, downloadType); + public long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, boolean isAutoRouting, MessagePad.RouteInfo routeInfo) { + return mChannel == null ? -1L : mChannel.sendTrajectoryDownloadReq(line, downloadType, isAutoRouting, routeInfo); } /** 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 5ba39f8bf5..557e3f4447 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 @@ -173,15 +173,16 @@ public interface IAdasNetCommApi { * 设置自动驾驶模式 启动自动驾驶 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param mode 1: enter autopilot mode, 0: quit autopilot mode - * @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) - * @param routeInfo 自动驾驶路径信息 + * @param mode 1: enter autopilot mode, 0: quit autopilot mode + * @param source 命令来源: 0: pad模拟, 1: pad业务, 2:aicloud, 3:魔方(清扫车MAP Version==332以及MAP Version>=350,其他车型目前未上线) + * @param routeInfo 自动驾驶路径信息 + * @param isAutoRouting 20240523 是否进行自动算路 * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 * * -1L:添加到WS发送消息队列失败 */ - long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo); + long sendAutoPilotModeReq(int mode, int source, MessagePad.RouteInfo routeInfo, boolean isAutoRouting); /** @@ -475,14 +476,16 @@ public interface IAdasNetCommApi { * 发送 轨迹下载请求 * 此方法存在域控回执,监听{@link OnAdasListener#onReceiveReceivedAck(ReceivedAck)}回调.使用方法:将此方法的返回值与{@link ReceivedAck#getMsgId()}进行比较,如果相同判断{@link ReceivedAck#getStatus()}是否等于{@link ReceivedAck.Status#NORMAL},详情参见CheckSystemView中的onReceiveReceivedAck * - * @param line 线路相关参数详情见PB message_pad.proto -> Line - * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param line 线路相关参数详情见PB message_pad.proto -> Line + * @param downloadType 下载类型: 0:正常下载 1:预下载 + * @param isAutoRouting 20240523 是否进行自动算路 + * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! * @return 消息是否添加到WS消息发送队列,返回值为非0的正整数时表示下发消息的消息ID * * >=0:表示添加到WS发送消息队列 * * =0:表示乘客屏模式添加到WS发送消息队列 * * -1L:添加到WS发送消息队列失败 */ - long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType); + long sendTrajectoryDownloadReq(MessagePad.Line line, int downloadType, boolean isAutoRouting, MessagePad.RouteInfo routeInfo); /** * 发送 状态查询请求