[684][data-center]下载轨迹请求调用添加返回值

This commit is contained in:
xinfengkun
2024-12-16 14:54:33 +08:00
parent e63f757166
commit 0ce73a996f
3 changed files with 18 additions and 12 deletions

View File

@@ -456,8 +456,8 @@ class MoGoAutopilotControlProvider :
autoPilotLine: AutopilotControlParameters.AutoPilotLine,
routeInfo: MessagePad.RouteInfo?,
orderId: String?
) {
AdasManager.getInstance()
): Long {
return AdasManager.getInstance()
.sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(), routeInfo, orderId)
}
@@ -466,8 +466,8 @@ class MoGoAutopilotControlProvider :
downloadType: Int,
routeInfo: MessagePad.RouteInfo?,
orderId: String?
) {
AdasManager.getInstance().sendTrajectoryDownloadReq(
): Long {
return AdasManager.getInstance().sendTrajectoryDownloadReq(
autoPilotLine.toAutoPilotLine(),
downloadType,
routeInfo,

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?, orderId:String?)
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?, orderId:String?): Long
/**
* 发送 轨迹下载请求
@@ -70,7 +70,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
* @param downloadType 下载类型: 0:正常下载 1:预下载
* @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填!
*/
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?, orderId:String?)
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?, orderId:String?): Long
/**
* 结束自动驾驶
*/

View File

@@ -206,36 +206,42 @@ object CallerAutoPilotControlManager {
/**
* 发送 轨迹下载请求。带有Routing的参数让MAP进行离线算路。
*/
fun sendTrajectoryDownloadReq(autopilotControlParameters: AutopilotControlParameters,downloadType: Int=0) {
fun sendTrajectoryDownloadReq(autopilotControlParameters: AutopilotControlParameters,downloadType: Int=0): Long {
var result = -1L
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
// Routing 需要传参 routeInfo
providerApi?.sendTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, autopilotControlParameters.toRouteInfo(),"")
result = providerApi?.sendTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, autopilotControlParameters.toRouteInfo(), "") ?: -1L
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, downloadType)
}
return result
}
/**
* 发送 轨迹下载请求
* @param autoPilotLine 启动算路参数
*/
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) {
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine): Long {
var result = -1L
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
//TODO Routing 需要传参 routeInfo这里建议业务侧重新整合到同一个数据实体内传入
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null,"")
result = providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null, "") ?: -1L
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, 0)
}
return result
}
/**
* 发送 轨迹下载请求
* @param downloadType 下载类型: 0:正常下载 1:预下载
*/
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) {
fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int): Long {
var result = -1L
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
//TODO Routing 需要传参 routeInfo这里建议业务侧重新整合到同一个数据实体内传入
providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null,"")
result = providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null, "") ?: -1L
CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, downloadType)
}
return result
}
/**