add pnc actions func
This commit is contained in:
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_C
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_CONFIG
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_OBJECTS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_STATUS_QUERY_RESP
|
||||
@@ -21,6 +22,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_GNSSINFO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_OBJECTS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_TRAFFIC_LIGHT
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY
|
||||
@@ -38,6 +40,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListen
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyPlanningObj
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningActionsListenerManager.invokePNCActions
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
@@ -401,10 +404,21 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
/**
|
||||
* planning决策状态, 透传
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_ACTIONS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_ACTIONS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onPlanningActionMsg(
|
||||
header: MessagePad.Header?,
|
||||
planningActionMsg: MessagePad.PlanningActionMsg?
|
||||
) {
|
||||
planningActionMsg?.let {
|
||||
invokePNCActions(it)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.debug.DebugConfig.*
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
@@ -11,6 +11,7 @@ import com.mogo.eagle.core.function.autopilot.network.AdasServiceModel
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -18,6 +19,9 @@ import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility
|
||||
import com.zhidao.support.adas.high.common.Constants
|
||||
import com.zhidao.support.adas.high.common.Constants.ENVIRONMENT.*
|
||||
import com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.DRIVER
|
||||
import com.zhidao.support.adas.high.common.Constants.TERMINAL_ROLE.PASSENGER
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
@@ -133,7 +137,29 @@ class MoGoAdasMsgConnectStatusListenerImpl : OnAdasConnectStatusListener,
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "同步PAD的SN给工控机……")
|
||||
// 设置PAD-SN给工控,网络环境
|
||||
AdasManager.getInstance()
|
||||
.sendBasicInfoResp(MoGoAiCloudClientConfig.getInstance().sn, DebugConfig.getNetMode())
|
||||
.sendBasicInfoResp(
|
||||
MoGoAiCloudClientConfig.getInstance().sn,
|
||||
getEnvironment(),
|
||||
getTerminalRole()
|
||||
)
|
||||
}
|
||||
|
||||
private fun getEnvironment(): Int {
|
||||
return when (getNetMode()) {
|
||||
NET_MODE_DEV -> DEVELOP
|
||||
NET_MODE_QA -> TEST
|
||||
NET_MODE_RELEASE -> PRODUCTION
|
||||
NET_MODE_DEMO -> DEMO
|
||||
else -> PRODUCTION
|
||||
}
|
||||
}
|
||||
|
||||
private fun getTerminalRole(): Int {
|
||||
return when {
|
||||
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) -> DRIVER
|
||||
AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) -> PASSENGER
|
||||
else -> DRIVER
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.autopilot.server
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -22,7 +22,7 @@ class AsyncDataToAutopilotServer private constructor() : IMoGoTrafficLightListen
|
||||
}
|
||||
|
||||
fun initServer() {
|
||||
CallTrafficLightListenerManager.registerTrafficLightListener(TAG, this)
|
||||
CallerTrafficLightListenerManager.registerTrafficLightListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onTrafficLightStatus(trafficLightResult: TrafficLightResult) {
|
||||
|
||||
Reference in New Issue
Block a user