[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

@@ -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
}
/**