[2.13.0_feat]消息盒子数据中心管理各类消息

This commit is contained in:
chenfufeng
2022-11-25 12:20:16 +08:00
parent 9ff67dc940
commit 3f3c7406e6
26 changed files with 545 additions and 88 deletions

View File

@@ -25,6 +25,9 @@ import com.mogo.eagle.core.data.map.entity.MarkerExploreWay
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.data.traffic.*
import com.mogo.eagle.core.function.api.hmi.warning.*
import com.mogo.eagle.core.function.api.map.listener.*
@@ -32,6 +35,7 @@ import com.mogo.eagle.core.function.call.hmi.*
import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.v2x.events.alarm.*
import com.mogo.eagle.core.function.v2x.events.bridge.*
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
@@ -572,7 +576,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
}
}
// 显示弹框,语音提示
CallerHmiManager.showWarningV2X(
CallerHmiManager.warningV2X(
tempAppId.toString(),
tempContent,
tempTts,
@@ -592,7 +596,8 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
}
},
true,
5000L
5000L,
MsgBoxType.V2X
)
CallerMapUIServiceManager.getMarkerService()?.updateITrafficInfo(trafficData)
}

View File

@@ -7,9 +7,13 @@ import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
import com.mogo.eagle.core.data.msgbox.MsgBoxType;
import com.mogo.eagle.core.data.msgbox.V2XMsg;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
import com.mogo.eagle.core.function.v2x.events.consts.V2XConst;
import com.mogo.eagle.core.function.v2x.events.manager.V2XStatusManager;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
@@ -93,8 +97,10 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
V2XRoadEventEntity content = entity != null ? entity.getContent() : null;
if (content != null) {
//显示警告红边
CallerHmiManager.INSTANCE.showWarningV2X(content.getPoiType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5));
// //显示警告红边
CallerHmiManager.INSTANCE.warningV2X(content.getPoiType(), content.getAlarmContent(),
content.getTts(), TAG, this, !entity.isOnlyShow(),
TimeUnit.SECONDS.toMillis(5), MsgBoxType.V2X);
}
}

View File

@@ -5,8 +5,12 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
import com.mogo.eagle.core.data.msgbox.MsgBoxType;
import com.mogo.eagle.core.data.msgbox.V2XMsg;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
import com.mogo.eagle.core.function.v2x.events.entity.net.V2XOptimalRouteDataRes;
@@ -53,7 +57,10 @@ public class V2XOptimalRouteVREventScenario
if (entity != null) {
V2XOptimalRouteDataRes content = entity.getContent();
if (content != null) {
CallerHmiManager.INSTANCE.showWarningV2X(entity.getType() + "", "为您推荐最优路线", "已为您选择最优路线", TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30));
CallerHmiManager.INSTANCE.warningV2X(entity.getType() + "",
"为您推荐最优路线", "已为您选择最优路线", TAG,
this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(30),
MsgBoxType.V2X);
}
}
}

View File

@@ -10,9 +10,13 @@ import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.data.map.entity.V2XMessageEntity;
import com.mogo.eagle.core.data.msgbox.MsgBoxBean;
import com.mogo.eagle.core.data.msgbox.MsgBoxType;
import com.mogo.eagle.core.data.msgbox.V2XMsg;
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener;
import com.mogo.eagle.core.function.api.map.listener.IMoGoMapLocationListener;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XMarker;
@@ -59,7 +63,10 @@ public class V2XFrontWarningScenario extends AbsV2XScenario implements IMoGoMapL
int v2xType = getV2XTypeForFrontWarning(mMarkerEntity);
V2XMessageEntity entity = getV2XMessageEntity();
if (v2xType != 0) {
CallerHmiManager.INSTANCE.showWarningV2X(v2xType + "", getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(3));
CallerHmiManager.INSTANCE.warningV2X(v2xType + "",
getAlertContentForFrontWarning(mMarkerEntity), mMarkerEntity.getTts(),
TAG, this, !entity.isOnlyShow(),
TimeUnit.SECONDS.toMillis(3), MsgBoxType.V2X);
}
}
}

View File

@@ -20,6 +20,10 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.zhjt.service_biz.BizConfig
import kotlin.math.abs
import kotlin.math.ceil
@@ -200,14 +204,15 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
private fun redLightWarning() {
CallerLogger.d("$M_V2X$TAG", "=====闯红灯预警=====")
ThreadUtils.runOnUiThread {
CallerHmiManager.showWarningV2X(
CallerHmiManager.warningV2X(
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
EventTypeEnum.TYPE_USECASE_ID_IVP.content,
EventTypeEnum.TYPE_USECASE_ID_IVP.tts,
EventTypeEnum.TYPE_USECASE_ID_IVP.poiType,
null,
true,
5000L
5000L,
MsgBoxType.V2X
)
}
}
@@ -227,14 +232,15 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
EventTypeEnum.getWarningTts(EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType),
speed
)
CallerHmiManager.showWarningV2X(
CallerHmiManager.warningV2X(
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
content,
tts,
EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType,
null,
true,
5000L
5000L,
MsgBoxType.V2X
)
}
}

View File

@@ -26,6 +26,10 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.zhjt.service_biz.BizConfig
class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListener,
@@ -241,14 +245,15 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
ttsContent: String,
tag: String
) {
CallerHmiManager.showWarningV2X(
CallerHmiManager.warningV2X(
v2xType, alertContent, ttsContent, tag,
object : IMoGoWarningStatusListener {
override fun onShow() {}
override fun onDismiss() {}
},
true,
5000L
5000L,
MsgBoxType.V2X
)
}