[sonar] trace log
This commit is contained in:
@@ -21,7 +21,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_SEND
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_MULTI_CONNECT
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_INIT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_AUTOPILOT
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotControlProvider
|
||||
@@ -983,7 +983,7 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_INIT_STATUS,
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_MULTI_CONNECT,
|
||||
paramIndexes = [0]
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_AD
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_STATUS_QUERY_RESP
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_ADAS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_GNSS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_INIT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_AUTOPILOT
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_TRAJECTORY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_VEHICLE
|
||||
@@ -50,7 +50,6 @@ import com.mogo.eagle.core.function.call.obu.CallerObuMapMathListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsiListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsmListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningSpatListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.DeviceUtils
|
||||
import com.mogo.support.obu.ObuScene
|
||||
@@ -364,7 +363,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//工控机基础配置信息
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_INIT_STATUS,
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = CHAIN_CODE_ADAS_CAR_CONFIG,
|
||||
paramIndexes = [0, 1]
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.mogo.eagle.core.data.biz.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_INIT_STATUS
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
|
||||
import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setDemoMode
|
||||
@@ -65,7 +65,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
AdasManager.getInstance().decoderRaw(it.body)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
invokeNettyConnResult("乘客屏解析数据过程中出现异常:${e.message}")
|
||||
invokeReqStatusLog(mapOf("dataParseError" to "${e.message}"))
|
||||
}
|
||||
}
|
||||
MogoProtocolMsg.SYNC_MODE_STATUS -> {
|
||||
@@ -188,8 +188,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
MogoProtocolMsg.REQ_MAC_ADDRESS,
|
||||
configArray.size, configArray
|
||||
), channel
|
||||
) {
|
||||
invokeNettyConnResult("司机屏发送配置信息到乘客屏是否成功:${it.isSuccess}")
|
||||
) { future ->
|
||||
invokeReqStatusLog(mapOf("dSendParam2P" to future.isSuccess))
|
||||
}
|
||||
} else {
|
||||
queryCarConfig()
|
||||
@@ -205,8 +205,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
val snArray = sn.toByteArray()
|
||||
NSDNettyManager.getInstance().sendMsgToSpecifiedClient(
|
||||
MogoProtocolMsg(10, snArray.size, snArray), channel
|
||||
) {
|
||||
invokeNettyConnResult("司机屏发送SN(${sn})到乘客屏是否成功:${it.isSuccess}")
|
||||
) { future ->
|
||||
invokeReqStatusLog(mapOf("dSendSN(${sn})2P" to future.isSuccess))
|
||||
}
|
||||
} else {
|
||||
invokeNettyConnResult("司机屏SN未获取到,不发送给乘客屏")
|
||||
@@ -245,12 +245,12 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
// AdasManager.getInstance().startDispatchHandler()
|
||||
ToastUtils.showShort("连接司机屏成功!")
|
||||
invokeNettyConnResult("乘客屏连接司机屏成功")
|
||||
invokeReqStatusLog(mapOf("dpConnectStatus" to true))
|
||||
val byteArray = byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMogoProtocolMsgToServer(
|
||||
MogoProtocolMsg(MogoProtocolMsg.REQ_MAC_ADDRESS, byteArray.size, byteArray)
|
||||
) {
|
||||
invokeNettyConnResult("乘客屏请求配置信息的数据发送是否成功:${it}")
|
||||
invokeReqStatusLog(mapOf("pReqParamSendResult" to it))
|
||||
}
|
||||
// 请求司机屏SN
|
||||
reqServerSN()
|
||||
@@ -261,14 +261,14 @@ class TeleMsgHandler : IMsgHandler {
|
||||
AppConfigInfo.plateNumber = ""
|
||||
AppConfigInfo.iPCMacAddress = ""
|
||||
ToastUtils.showLong("断开和司机屏的连接!")
|
||||
invokeNettyConnResult("断开和司机屏的连接!")
|
||||
invokeReqStatusLog(mapOf("dpConnectStatus" to false))
|
||||
AdasManager.getInstance().stopDispatchHandler()
|
||||
}
|
||||
}
|
||||
ConnectState.STATUS_CONNECT_ERROR -> {
|
||||
AppConfigInfo.plateNumber = ""
|
||||
ToastUtils.showLong("和司机端连接异常!")
|
||||
invokeNettyConnResult("乘客屏和司机屏连接异常,错误为:$content")
|
||||
invokeReqStatusLog(mapOf("dpConnectErrorMsg" to "$content"))
|
||||
AdasManager.getInstance().stopDispatchHandler()
|
||||
}
|
||||
else -> {
|
||||
@@ -280,7 +280,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
override fun handleServerConnStatus(statusCode: Int, content: String?, channel: Channel) {}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_INIT_STATUS,
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_MULTI_CONNECT,
|
||||
paramIndexes = [0]
|
||||
@@ -289,6 +289,16 @@ class TeleMsgHandler : IMsgHandler {
|
||||
CallerLogger.d("${SceneConstant.M_D_C}$TAG", status)
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_ADAS,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_MULTI_CONNECT,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
private fun invokeReqStatusLog(param:Map<String,Any>){
|
||||
CallerLogger.d("${SceneConstant.M_D_C}$TAG", param.toString())
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录最新的司机屏发送数据的时间戳
|
||||
* 或乘客屏解析数据的时间戳
|
||||
@@ -317,7 +327,7 @@ class TeleMsgHandler : IMsgHandler {
|
||||
NSDNettyManager.getInstance().sendMogoProtocolMsgToServer(
|
||||
MogoProtocolMsg(10, byteArray.size, byteArray)
|
||||
) {
|
||||
invokeNettyConnResult("乘客屏请求司机屏SN的数据发送是否成功:${it}")
|
||||
invokeReqStatusLog(mapOf("pReqSNSendResult" to it))
|
||||
}
|
||||
delay(700)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user