[6.2.0] trace log

This commit is contained in:
zhongchao
2023-11-08 10:37:04 +08:00
parent 91eef5c45c
commit b76db7bc2a
2 changed files with 27 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.*
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
@@ -35,7 +35,7 @@ import mogo.telematics.pad.MessagePad
class TeleMsgHandler : IMsgHandler {
companion object{
companion object {
private const val TAG = "TeleMsgHandler"
}
@@ -93,7 +93,10 @@ class TeleMsgHandler : IMsgHandler {
AppConfigInfo.iPCMacAddress = carConfig.macAddress
AppConfigInfo.dockerVersion = carConfig.dockVersion
listener?.connectDevice(!carConfig.dockVersion.contains("2.3.0"))
CallerDevaToolsManager.getBindingCarInfo(carConfig.macAddress, MoGoAiCloudClientConfig.getInstance().sn)
CallerDevaToolsManager.getBindingCarInfo(
carConfig.macAddress,
MoGoAiCloudClientConfig.getInstance().sn
)
invokeNettyConnResult(
"司机屏发送给乘客屏配置信息为:${
TextFormat.printer().escapingNonAscii(false).printToString(carConfig)
@@ -130,11 +133,19 @@ class TeleMsgHandler : IMsgHandler {
}
}
TelematicConstant.BUSINESS_STRING -> {
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.BUSINESS_STRING, it.body)
CallerTelematicListenerManager.invokeReceivedMsg(
TelematicConstant.BUSINESS_STRING,
it.body
)
}
TelematicConstant.SHOW_TRAFFIC_LIGHT -> {
val trafficLightJson = String(it.body)
CallerTrafficLightListenerManager.invokeTrafficLightStatus(GsonUtils.fromJson(trafficLightJson, TrafficLightResult::class.java))
CallerTrafficLightListenerManager.invokeTrafficLightStatus(
GsonUtils.fromJson(
trafficLightJson,
TrafficLightResult::class.java
)
)
}
TelematicConstant.HIDE_TRAFFIC_LIGHT -> {
ThreadUtils.runOnUiThread {
@@ -143,7 +154,10 @@ class TeleMsgHandler : IMsgHandler {
}
TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR -> {
ThreadUtils.runOnUiThread {
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR,it.body)
CallerTelematicListenerManager.invokeReceivedMsg(
TelematicConstant.CONTROL_PASSENGER_DRIVER_MONITOR,
it.body
)
}
}
@@ -206,14 +220,17 @@ class TeleMsgHandler : IMsgHandler {
NSDNettyManager.getInstance().sendMsgToSpecifiedClient(
MogoProtocolMsg(10, snArray.size, snArray), channel
) { future ->
invokeReqStatusLog(mapOf("dSendSN(${sn})2P" to future.isSuccess))
invokeReqStatusLog(mapOf("dSendSN2P" to future.isSuccess, "sn" to sn))
}
} else {
invokeNettyConnResult("司机屏SN未获取到不发送给乘客屏")
}
}
TelematicConstant.BUSINESS_STRING -> {
CallerTelematicListenerManager.invokeReceivedMsg(TelematicConstant.BUSINESS_STRING, it.body)
CallerTelematicListenerManager.invokeReceivedMsg(
TelematicConstant.BUSINESS_STRING,
it.body
)
}
else -> {
}
@@ -295,7 +312,7 @@ class TeleMsgHandler : IMsgHandler {
nodeAliasCode = ChainConstant.CHAIN_CODE_MULTI_CONNECT,
paramIndexes = [0]
)
private fun invokeReqStatusLog(param:Map<String,Any>){
private fun invokeReqStatusLog(param: Map<String, Any>) {
CallerLogger.d("${SceneConstant.M_D_C}$TAG", param.toString())
}