[6.2.4] union v2x and init trace file and extends trace of common param
This commit is contained in:
@@ -4,6 +4,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -37,7 +38,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
|
||||
private var autopilotState: Int by Delegates.observable(0) { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
//todo emArrow chainLog
|
||||
CallerTrace.write("AutoPilotStatus", mapOf("state" to newValue))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotStatusResponse(newValue)
|
||||
@@ -61,7 +62,6 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
private var autoPilotMessageContent: String = ""
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoAutopilotStatusListener) {
|
||||
listener.onAutopilotStatusResponse(mAutopilotStatusInfo)
|
||||
listener.onAutopilotStatusResponse(autopilotState)
|
||||
if(dockerV.isNotEmpty()){
|
||||
listener.onAutopilotDockerInfo(dockerV)
|
||||
@@ -144,16 +144,12 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动驾驶状态信息 回调
|
||||
* 自动驾驶状态信息更新(3.3.0版本之后,不回调此类高频数据)
|
||||
* @param autopilotStatusInfo 自动驾驶状态信息
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutoPilotStatus(autopilotStatusInfo: AutopilotStatusInfo) {
|
||||
mAutopilotStatusInfo = autopilotStatusInfo
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotStatusResponse(mAutopilotStatusInfo)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,10 +181,10 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
autoPilotMessageCode = guardianInfo?.code ?: ""
|
||||
autoPilotMessageContent = guardianInfo?.msg ?: ""
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
autoPilotMessageCode = guardianInfo?.code ?: ""
|
||||
autoPilotMessageContent = guardianInfo?.msg ?: ""
|
||||
listener.onAutopilotGuardian(guardianInfo)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ object CallerAutopilotActionsListenerManager : CallerBase<IMoGoAutopilotActionsL
|
||||
isAutopilotAbility: Boolean, unableAutopilotReasons: ArrayList<UnableLaunchReason>?
|
||||
) {
|
||||
if (isConnected) {
|
||||
var isEquals: Boolean = true
|
||||
var isEquals = true
|
||||
if (unableAutopilotReasons != null && this.unableAutopilotReasons != null) {
|
||||
unableAutopilotReasons.let { onw ->
|
||||
onw.sortWith(compareBy(UnableLaunchReason::hashCode));
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
@@ -17,6 +18,7 @@ object CallerAutopilotRecordListenerManager : CallerBase<IMoGoAutopilotRecordLis
|
||||
* 采集任务记录回调
|
||||
*/
|
||||
fun invokeAutopilotRecordResult(recordPanel: RecordPanelOuterClass.RecordPanel) {
|
||||
CallerTrace.write("AutopilotRecord", mapOf("recordPanel" to recordPanel))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onAutopilotRecordResult(recordPanel)
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
*/
|
||||
object CallerChassisAccStateListenerManager : CallerBase<IMoGoChassisAccStateListener>() {
|
||||
|
||||
|
||||
/**
|
||||
* 车辆加速度
|
||||
* acc 加速度
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
*/
|
||||
object CallerChassisBrakeStateListenerManager : CallerBase<IMoGoChassisBrakeStateListener>() {
|
||||
|
||||
|
||||
/**
|
||||
* brake 刹车
|
||||
*/
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingActionsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
|
||||
|
||||
/**
|
||||
@@ -43,6 +44,7 @@ object CallerParallelDrivingActionsListenerManager :
|
||||
}
|
||||
|
||||
private fun notification() {
|
||||
CallerTrace.write("ParallelDriving", mapOf("ParallelState" to isParallelDrivingAbility))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onParallelDrivingAbility(
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoParallelDrivingStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
import mogo.yycp.paralleldriving.protocol.ParallelTaskProcessNoticeOuterClass
|
||||
|
||||
/**
|
||||
@@ -12,6 +12,7 @@ object CallerParallelDrivingListenerManager : CallerBase<IMoGoParallelDrivingSta
|
||||
|
||||
|
||||
fun invokeParallelDrivingListener(parallelTaskProcessNotice: ParallelTaskProcessNoticeOuterClass.ParallelTaskProcessNotice?) {
|
||||
CallerTrace.write("ParallelDriving", mapOf("parallelData" to {parallelTaskProcessNotice?:""}))
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onParallelDrivingResp(parallelTaskProcessNotice)
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.mogo.eagle.core.function.call.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.mogo.eagle.core.function.call.trace.CallerTrace
|
||||
|
||||
object CallerMsgBoxManager {
|
||||
|
||||
@@ -25,13 +24,8 @@ object CallerMsgBoxManager {
|
||||
/**
|
||||
* 存储数据到消息盒子
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_V2X,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_CLOUD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_MSG_BOX,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
fun saveMsgBox(bean: MsgBoxBean) {
|
||||
CallerTrace.write(TAG,bean)
|
||||
providerApi?.saveMsg(bean)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.mogo.eagle.core.function.call.trace
|
||||
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainCommon
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
|
||||
class CallerTrace {
|
||||
|
||||
companion object {
|
||||
|
||||
fun write(data: Any, data1: Any, param: Boolean = true) {
|
||||
CallerLogger.d(SceneConstant.M_D_C + data.toString(), data1)
|
||||
if (param) {
|
||||
val cal = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
val lineId = CallerAutoPilotStatusListenerManager.getLineId()
|
||||
realParamAction(data, data1, ChainCommon(cal.latitude, cal.longitude, lineId))
|
||||
} else {
|
||||
realAction(data, data1)
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_INIT,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_DATA_CENTER,
|
||||
paramIndexes = [0, 1]
|
||||
)
|
||||
private fun realAction(data: Any, data1: Any) {
|
||||
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_STATUS,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_INIT,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_DATA_CENTER,
|
||||
paramIndexes = [0, 1, 2]
|
||||
)
|
||||
private fun realParamAction(data: Any, data1: Any, chainCommon: ChainCommon) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user