[3.4.0]增加V2X消息埋点统计

This commit is contained in:
xuxinchao
2023-07-24 21:00:48 +08:00
parent 5000a87d2e
commit 2ce531235c
16 changed files with 207 additions and 25 deletions

View File

@@ -2,11 +2,11 @@ package com.mogo.eagle.core.function.datacenter.obu
import android.content.Context
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.enums.CommunicationType
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.obu.MogoObuConst
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningMapListener
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningRsiListener
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningRsmListener
@@ -294,11 +294,11 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
}
//大于10m才提示rsi,超速不限制
if (appId == "6666") {
saveObuToDcData(appId, alertContent, ttsContent)
saveObuToDcData(appId, alertContent, ttsContent,CommunicationType.V2I)
showWarning(appId, alertContent, ttsContent, direction)
} else {
if (Math.round(rsiWarningData.warningMsgList[0].distance) > 10) {
saveObuToDcData(appId, alertContent, ttsContent)
saveObuToDcData(appId, alertContent, ttsContent,CommunicationType.V2I)
showWarning(appId, alertContent, ttsContent, direction)
}
}
@@ -306,7 +306,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
if(EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType == appId){
saveObuToDcData(appId, alertContent, ttsContent)
saveObuToDcData(appId, alertContent, ttsContent,CommunicationType.V2I)
showWarning(appId, alertContent, ttsContent, direction)
}
}
@@ -398,7 +398,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
saveObuToDcData(v2xType, alertContent, ttsContent)
saveObuToDcData(v2xType, alertContent, ttsContent,CommunicationType.V2I)
showWarning(v2xType, alertContent, ttsContent, direction, object : IMoGoWarningStatusListener {
override fun onShow() {
@@ -578,7 +578,8 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
saveObuToDcData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent
ttsContent,
CommunicationType.V2I
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
@@ -620,7 +621,8 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
saveObuToDcData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew
ttsContentNew,
CommunicationType.V2I
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
@@ -676,12 +678,13 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
/**
* 保存obu通过工控机传输的数据到消息盒子
*/
private fun saveObuToDcData(type: String, content: String, tts: String) {
private fun saveObuToDcData(type: String, content: String, tts: String,communicationType: CommunicationType) {
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(
type,
content,
tts,
DataSourceType.TELEMATIC
DataSourceType.TELEMATIC,
communicationType
)
}

View File

@@ -577,11 +577,11 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
}
//大于10m才提示rsi。超速不限制
if (appId == "6666") {
saveObuData(appId, alertContent, ttsContent)
saveObuData(appId, alertContent, ttsContent,CommunicationType.V2I)
showWarning(appId, alertContent, ttsContent, direction)
} else {
if (Math.round(data.warningMsgList[0].distance) > 10) {
saveObuData(appId, alertContent, ttsContent)
saveObuData(appId, alertContent, ttsContent,CommunicationType.V2I)
showWarning(appId, alertContent, ttsContent, direction)
}
}
@@ -595,7 +595,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
MogoObuShowConstants.STATUS.UPDATE -> { // 更新
if(EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType == appId){
saveObuData(appId, alertContent, ttsContent)
saveObuData(appId, alertContent, ttsContent,CommunicationType.V2I)
showWarning(appId, alertContent, ttsContent, direction)
}
}
@@ -701,7 +701,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
return
}
saveObuData(v2xType, alertContent, ttsContent)
saveObuData(v2xType, alertContent, ttsContent,CommunicationType.V2I)
showWarning(v2xType, alertContent, ttsContent, direction)
}
@@ -941,7 +941,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
)
if (level == 2 || level == 3) {
//不显示弹框,其它保留
saveObuData(v2xType, alertContent, ttsContent)
saveObuData(v2xType, alertContent, ttsContent,CommunicationType.V2V)
CallerHmiManager.warningV2X(v2xType,
alertContent,
ttsContent,// 只有第一次才tts防止更新的时候不断的提醒
@@ -1052,7 +1052,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
alertContent,
ttsContent
ttsContent,
CommunicationType.V2I
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType,
@@ -1103,7 +1104,8 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
saveObuData(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
alertContentNew,
ttsContentNew
ttsContentNew,
CommunicationType.V2I
)
showWarning(
EventTypeEnumNew.TYPE_USECASE_ID_IVP_GREEN.poiType,
@@ -1159,12 +1161,13 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
/**
* 保存obu直连数据到消息盒子
*/
private fun saveObuData(type: String, content: String, tts: String) {
private fun saveObuData(type: String, content: String, tts: String,communicationType: CommunicationType) {
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(
type,
content,
tts,
DataSourceType.OBU
DataSourceType.OBU,
communicationType
)
}