diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt index 4c7f883a82..22888ca6e7 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt @@ -21,6 +21,7 @@ import com.mogo.eagle.function.biz.v2x.trafficlight.core.MogoTrafficLightManager import com.mogo.eagle.function.biz.v2x.v2n.V2XEventManager import com.mogo.eagle.function.biz.v2x.v2n.V2XPoiLoader.Companion.v2xPoiLoader import com.mogo.eagle.function.biz.v2x.v2n.pnc.* +import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager import com.mogo.eagle.function.biz.v2x.vip.VipCarManager @Route(path = MogoServicePaths.PATH_FUNC_BIZ) @@ -53,6 +54,7 @@ class FuncBizProvider : IMoGoFuncBizProvider { V2NIdentifyDrawer.init() // RedLightWarningManager.INSTANCE.listenTrafficLight() + V2XEventAnalyticsManager.init() } override fun feedBackNoticeTraffic(infoId: String, sn: String, accept: Int) { @@ -140,5 +142,6 @@ class FuncBizProvider : IMoGoFuncBizProvider { V2xObuEventManager.release() V2NIdentifyDrawer.unInit() // RedLightWarningManager.INSTANCE.onDestroy() + V2XEventAnalyticsManager.onDestroy() } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/obu/V2xObuEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/obu/V2xObuEventManager.kt index afaaa4585a..b325d3d7e6 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/obu/V2xObuEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/obu/V2xObuEventManager.kt @@ -1,6 +1,7 @@ package com.mogo.eagle.function.biz.v2x.obu import android.content.Context +import com.mogo.eagle.core.data.enums.CommunicationType import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType @@ -10,6 +11,7 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.call.obu.CallerObuSaveMessageListenerManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant +import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager /** * 处理obu分发出来,在消息盒子展示的消息 @@ -36,7 +38,7 @@ object V2xObuEventManager : IMoGoObuSaveMessageListener { * @param content 事件内容 * @param tts 事件语音播报 //30秒内同一个事件只出现一次 TODO 临时添加,后面宏宇统一在数据中心处理 */ - override fun onMoGoObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType) { + override fun onMoGoObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType,communicationType: CommunicationType) { if (content.isNotEmpty()) { if (obuDataMap.containsKey(type)) { val oldTime = obuDataMap[type] @@ -62,6 +64,8 @@ object V2xObuEventManager : IMoGoObuSaveMessageListener { this.sourceType = sourceType } ) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent(type,content,tts,sourceType,communicationType) } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt index 40e98389fc..90a037c6c9 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XEventManager.kt @@ -300,5 +300,8 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IV2XCallback, MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${count}个事件", "")) msgBoxBean.sourceType = DataSourceType.SUMMARY CallerMsgBoxManager.saveMsgBox(msgBoxBean) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent("summary","查询到当前全程共${count}个事件", + "",DataSourceType.AICLOUD,CommunicationType.V2N) } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt index ffe57a4287..028d34cecc 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/V2XPoiLoader.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.v2x.v2n import android.os.Handler import android.os.Looper import com.mogo.cloud.passport.MoGoAiCloudClientConfig +import com.mogo.eagle.core.data.enums.CommunicationType import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType @@ -16,6 +17,7 @@ import com.mogo.eagle.function.biz.v2x.v2n.network.V2XRefreshModel import com.mogo.eagle.function.biz.v2x.v2n.network.callback.IV2XCallback import com.mogo.eagle.function.biz.v2x.v2n.network.callback.IV2XRefreshCallback import com.mogo.eagle.function.biz.v2x.v2n.utils.DistanceUtils +import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager import java.util.concurrent.CopyOnWriteArrayList import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicReference @@ -159,6 +161,9 @@ class V2XPoiLoader private constructor() { MsgBoxBean(MsgBoxType.V2X, V2XMsg("", "查询到当前全程共${size}个事件", "")) msgBoxBean.sourceType = DataSourceType.SUMMARY CallerMsgBoxManager.saveMsgBox(msgBoxBean) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent("summary","查询到当前全程共${size}个事件", + "",DataSourceType.AICLOUD,CommunicationType.V2N) } } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index 7836101490..338a912126 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -4,6 +4,7 @@ import android.os.* import androidx.core.util.* import com.mogo.eagle.core.data.config.* import com.mogo.eagle.core.data.enums.* +import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.data.enums.WarningDirectionEnum.ALERT_WARNING_TOP import com.mogo.eagle.core.data.map.entity.* import com.mogo.eagle.core.data.msgbox.* @@ -21,6 +22,7 @@ import com.mogo.eagle.core.utilcode.util.* import com.mogo.eagle.function.biz.v2x.V2XBizTrace import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.* import com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.airoad.AiRoadMarker.Marker +import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager import mogo.telematics.pad.MessagePad.Header import mogo.telematics.pad.MessagePad.TrackedObject import mogo.v2x.MogoV2X @@ -89,6 +91,9 @@ internal object V2NIdentifyDrawer { CallerVisualAngleManager.changeAngle(Default()) } }, ALERT_WARNING_TOP, 10000, false) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent(poiType, alertContent, ttsContent, + DataSourceType.AICLOUD,CommunicationType.V2N) } }.receive() } @@ -144,6 +149,9 @@ internal object V2NIdentifyDrawer { CallerVisualAngleManager.changeAngle(Default()) } }, ALERT_WARNING_TOP, 10000, false) + //消息埋点 + V2XEventAnalyticsManager.triggerV2XEvent(poiType, alertContent, ttsContent, + DataSourceType.AICLOUD,CommunicationType.V2N) } }.receive() } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java index 5a8928a2e0..c19ae38fe7 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventScenario.java @@ -1,6 +1,8 @@ package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road; import com.mogo.commons.AbsMogoApplication; +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.WarningDirectionEnum; import com.mogo.eagle.core.data.map.entity.MarkerExploreWay; @@ -23,6 +25,7 @@ import com.mogo.eagle.function.biz.v2x.v2n.scenario.view.IV2XMarker; import com.mogo.eagle.core.network.utils.GsonUtil; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; +import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager; import java.util.Objects; import java.util.concurrent.TimeUnit; @@ -131,6 +134,8 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp CallerHmiManager.INSTANCE.warningV2X(poiType, alarmText, ttsText, this,WarningDirectionEnum.ALERT_WARNING_TOP, TimeUnit.SECONDS.toMillis(5), false); + //消息埋点 + V2XEventAnalyticsManager.INSTANCE.triggerV2XEvent(poiType,alarmText,ttsText, DataSourceType.AICLOUD, CommunicationType.V2N); } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java index 4799a8fc3b..9703733a1e 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/warning/V2XFrontWarningScenario.java @@ -8,6 +8,9 @@ import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; import android.util.Log; import androidx.annotation.Nullable; + +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.WarningDirectionEnum; import com.mogo.eagle.core.data.map.MogoLocation; @@ -23,6 +26,8 @@ import com.mogo.eagle.function.biz.v2x.v2n.scenario.impl.AbsV2XScenario; import com.mogo.eagle.function.biz.v2x.v2n.scenario.view.IV2XMarker; import com.mogo.eagle.core.data.v2x.V2XWarningTarget; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; +import com.mogo.eagle.function.biz.v2x.v2n.utils.V2XEventAnalyticsManager; + import java.math.BigDecimal; import java.util.Locale; import java.util.concurrent.TimeUnit; @@ -82,6 +87,9 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoChas getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), this,getDirection(), TimeUnit.SECONDS.toMillis(5), false); + //消息埋点 + V2XEventAnalyticsManager.INSTANCE.triggerV2XEvent(v2xType,getAlertContentForFrontWarning(mMarkerEntity).toString(), + mMarkerEntity.getTts(), DataSourceType.AICLOUD, CommunicationType.V2N); } } } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2XEventAnalyticsManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2XEventAnalyticsManager.kt new file mode 100644 index 0000000000..ca7f4bf77a --- /dev/null +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/utils/V2XEventAnalyticsManager.kt @@ -0,0 +1,103 @@ +package com.mogo.eagle.function.biz.v2x.v2n.utils + +import com.mogo.cloud.passport.MoGoAiCloudClientConfig +import com.mogo.commons.utils.MogoAnalyticUtils +import com.mogo.eagle.core.data.app.AppConfigInfo +import com.mogo.eagle.core.data.enums.CommunicationType +import com.mogo.eagle.core.data.enums.DataSourceType +import com.mogo.eagle.core.data.map.MogoLocation +import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationWGS84Listener +import com.mogo.eagle.core.function.api.biz.IFuncBizProvider +import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager +import com.mogo.eagle.core.utilcode.util.AppUtils +import com.mogo.eagle.core.utilcode.util.DateTimeUtils +import java.util.concurrent.atomic.AtomicBoolean + +/** + * V2消息播报埋点统计 + */ +object V2XEventAnalyticsManager: IMoGoChassisLocationWGS84Listener, IFuncBizProvider { + + private const val TAG = "V2XEventAnalyticsManager" + private val hasInit by lazy { AtomicBoolean(false) } + + private const val EVENT_KEY_V2X_MSG_EVENT = "event_key_v2x_msg_event" //消息盒子播报V2X事件埋点关键字 + + private const val EVENT_PARAMS_POI_TYPE = "poiType" //事件类型 + private const val EVENT_PARAMS_CONTENT ="content" // 事件内容 + private const val EVENT_PARAMS_TTS_CONTENT ="ttsContent" // 语音播报内容 + private const val EVENT_PARAMS_DISPLAY_TIME ="displayTime" // 展示时间 + private const val EVENT_PARAMS_DATA_SOURCE ="dataSource" // 数据来源 + private const val EVENT_PARAMS_COMMUNICATION_TYPE ="communicationType" //通信类型 + private const val EVENT_PARAMS_PLATE_NUMBER ="plateNumber" // 车牌号 + private const val EVENT_PARAMS_CAR_SN ="carSn" // 鹰眼SN + private const val EVENT_PARAMS_EYE_VERSION ="eyeVersion" // 鹰眼版本 + private const val EVENT_PARAMS_LONGITUDE ="longitude" // 经度 + private const val EVENT_PARAMS_LATITUDE ="latitude" // 纬度 + private const val EVENT_PARAMS_HEADING ="heading" // 航向角 + + private var longitude: Double?=null //经度 + private var latitude: Double?=null //纬度 + private var heading: Double?=null //航向角 + + private var oldTime = System.currentTimeMillis() + + fun init(){ + if (hasInit.compareAndSet(false, true)){ + registerListener() + } + } + + private fun registerListener(){ + // 添加 ADAS车辆状态&定位 监听 + CallerChassisLocationWGS84ListenerManager.addListener(TAG, this) + } + + private fun unRegisterListener(){ + // 移除 ADAS车辆状态&定位 监听 + CallerChassisLocationWGS84ListenerManager.removeListener(TAG) + } + + override fun onAttrZombieAnalyticsEvent() { + val timeDiff = (System.currentTimeMillis() - oldTime)/1000 + if(timeDiff<30){ + return + } + oldTime = System.currentTimeMillis() + triggerV2XEvent("ATTR_ZOMBIE","感知数据-僵尸车状态下发","",DataSourceType.TELEMATIC,CommunicationType.V2V) + } + + fun triggerV2XEvent(poiType: String,content: String?,ttsContent: String?, + dataSource: DataSourceType,communicationType: CommunicationType){ + val msgEventParams = HashMap() + msgEventParams[EVENT_PARAMS_POI_TYPE] = poiType //事件类型 + msgEventParams[EVENT_PARAMS_CONTENT] = content?:"" //事件内容 + msgEventParams[EVENT_PARAMS_TTS_CONTENT] = ttsContent?:"" //语音播报内容 + msgEventParams[EVENT_PARAMS_DISPLAY_TIME] = DateTimeUtils.getTimeText( + System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss) //展示时间 + msgEventParams[EVENT_PARAMS_DATA_SOURCE] = dataSource.name //数据来源 + msgEventParams[EVENT_PARAMS_COMMUNICATION_TYPE] = communicationType.name //通信类型 + msgEventParams[EVENT_PARAMS_PLATE_NUMBER] = AppConfigInfo.plateNumber //车牌号 + msgEventParams[EVENT_PARAMS_CAR_SN] = MoGoAiCloudClientConfig.getInstance().sn //鹰眼SN + msgEventParams[EVENT_PARAMS_EYE_VERSION] = AppUtils.getAppVersionName() //鹰眼版本 + msgEventParams[EVENT_PARAMS_LONGITUDE] = "$longitude" //经度 + msgEventParams[EVENT_PARAMS_LATITUDE] = "$latitude" //纬度 + msgEventParams[EVENT_PARAMS_HEADING] = "$heading" //航向角 + MogoAnalyticUtils.track(EVENT_KEY_V2X_MSG_EVENT,msgEventParams) + } + + override fun onChassisLocationWGS84(gnssInfo: MogoLocation) { + gnssInfo.let { + longitude = it.longitude + latitude = it.latitude + heading = it.heading + } + } + + fun onDestroy(){ + if (hasInit.compareAndSet(true, false)){ + unRegisterListener() + } + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt index 61b27f6b4a..9439104f36 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoObuDcCombineManager.kt @@ -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 ) } diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt index d084c91a6f..e62c7c8d5a 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt @@ -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 ) } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt index b0789fcd00..ab2ad0e171 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackerSourceFilterHelper.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.business.identify import android.annotation.SuppressLint import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.enums.TrafficTypeEnum +import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import mogo.telematics.pad.MessagePad.* @@ -71,6 +72,8 @@ object TrackerSourceFilterHelper { color = "#9BA8BCFF" } } + //消息埋点 + CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent() } // pnc预警 diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/CommunicationType.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/CommunicationType.kt new file mode 100644 index 0000000000..2cd0d22106 --- /dev/null +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/CommunicationType.kt @@ -0,0 +1,25 @@ +package com.mogo.eagle.core.data.enums + +/** + * V2X消息通信类型 + */ +enum class CommunicationType(name: String) { + V2V("V2V"),//车与车通信 + V2N("V2N"),//车与运营商网络通讯 + V2I("V2I"),//车与路标基础设施通信 + V2P("V2P"),//车与人通信 + V2X("V2X");//即车队外界所有信息的交换 + +// companion object{ +// fun getName(type: CommunicationType): String{ +// return when(type){ +// V2V -> "V2V" +// V2N -> "V2N" +// V2I -> "V2I" +// V2P -> "V2P" +// V2X -> "V2X" +// } +// } +// } + +} \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IFuncBizProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IFuncBizProvider.kt index 594d2cbfeb..f5586708c6 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IFuncBizProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IFuncBizProvider.kt @@ -12,5 +12,7 @@ interface IFuncBizProvider { /** * 根据lineId获取整条道路的V2X事件 */ - fun onV2XEvents(v2XEventData: List?) {} + fun onV2XEvents(v2XEventData: List?) {} + + fun onAttrZombieAnalyticsEvent(){} } \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuSaveMessageListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuSaveMessageListener.kt index 129098b7bd..e261ba2295 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuSaveMessageListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuSaveMessageListener.kt @@ -1,5 +1,6 @@ package com.mogo.eagle.core.function.api.datacenter.obu +import com.mogo.eagle.core.data.enums.CommunicationType import com.mogo.eagle.core.data.enums.DataSourceType /** @@ -15,6 +16,6 @@ interface IMoGoObuSaveMessageListener { * @param tts 事件语音播报 * @param sourceType 来源 */ - fun onMoGoObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType) + fun onMoGoObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType, communicationType: CommunicationType) } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/biz/CallerFuncBizListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/biz/CallerFuncBizListenerManager.kt index 61e3c01ca3..5011192afb 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/biz/CallerFuncBizListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/biz/CallerFuncBizListenerManager.kt @@ -30,4 +30,11 @@ object CallerFuncBizListenerManager: CallerBase() { listener.onV2XEvents(v2XEventData) } } + + fun invokeAttrZombieAnalyticsEvent(){ + M_LISTENERS.forEach{ + val listener = it.value + listener.onAttrZombieAnalyticsEvent() + } + } } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuSaveMessageListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuSaveMessageListenerManager.kt index 3d26721004..5a3e69ef2e 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuSaveMessageListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuSaveMessageListenerManager.kt @@ -1,10 +1,9 @@ package com.mogo.eagle.core.function.call.obu +import com.mogo.eagle.core.data.enums.CommunicationType import com.mogo.eagle.core.data.enums.DataSourceType import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuSaveMessageListener -import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuWarningRsiListener import com.mogo.eagle.core.function.call.base.CallerBase -import com.mogo.support.obu.ObuScene /** * OBU 保存到数据中心,展示在消息盒子的数据 @@ -12,11 +11,11 @@ import com.mogo.support.obu.ObuScene */ object CallerObuSaveMessageListenerManager : CallerBase() { - fun invokeObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType) { + fun invokeObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType,communicationType: CommunicationType) { M_LISTENERS.forEach { val tag = it.key val listener = it.value - listener.onMoGoObuSaveMessage(type, content, tts, sourceType) + listener.onMoGoObuSaveMessage(type, content, tts, sourceType,communicationType) } }