Merge branch 'dev_arch_opt_3.0' into dev_robosweeper-d_app-module_221230_1.1.0
# Conflicts: # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperOrderModel.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/util/SweeperAnalyticsManager.java # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java # core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.mogo.eagle.core.function.datacenter.aicloud
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.cloud.socket.SocketManager
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_AI_CLOUD)
|
||||
class AiCloudSocketBizProvider : IMoGoFunctionServerProvider {
|
||||
override val functionName: String
|
||||
get() = "AiCloudSocketBizProvider"
|
||||
|
||||
override fun init(context: Context?) {
|
||||
SocketManager.getInstance().init(AbsMogoApplication.getApp(), 0.0, 0.0)
|
||||
SocketManager.getInstance().registerOnMessageListener(401012, V2XMessageListener401012())
|
||||
SocketManager.getInstance().registerOnMessageListener(401018, V2XMessageListener401018())
|
||||
SocketManager.getInstance().registerOnMessageListener(402000, V2XMessageListener402000())
|
||||
SocketManager.getInstance().registerOnMessageListener(404000, V2XMessageListener404000())
|
||||
//SocketManager.getInstance().registerOnMessageListener(503000, V2XMessageListener503000())
|
||||
SocketManager.getInstance().registerOnMessageListener(70001, V2XMessageListener70001())
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mogo.eagle.core.function.datacenter.aicloud
|
||||
|
||||
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener
|
||||
import com.mogo.eagle.core.data.v2x.*
|
||||
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
|
||||
import roadwork.Road
|
||||
|
||||
internal class V2XMessageListener70001: IMogoCloudSocketOnMessageListener<V2XRoadXData> {
|
||||
|
||||
override fun target(msgType: Int): Class<V2XRoadXData> = V2XRoadXData::class.java
|
||||
|
||||
override fun onMsgReceived(msgType: Int, data: V2XRoadXData?) {
|
||||
if (msgType != 70001) {
|
||||
return
|
||||
}
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
CallerCloudListenerManager.invokeSocketAck(V2XEvent.RoadEventX(data = data))
|
||||
}
|
||||
}
|
||||
|
||||
internal class V2XMessageListener401012: IMogoCloudSocketOnMessageListener<V2XMarkerCardResult> {
|
||||
|
||||
override fun target(msgType: Int): Class<V2XMarkerCardResult> = V2XMarkerCardResult::class.java
|
||||
|
||||
override fun onMsgReceived(msgType: Int, data: V2XMarkerCardResult?) {
|
||||
if (msgType != 401012) {
|
||||
return
|
||||
}
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
CallerCloudListenerManager.invokeSocketAck(V2XEvent.Road(data = data))
|
||||
}
|
||||
}
|
||||
|
||||
internal class V2XMessageListener401018: IMogoCloudSocketOnMessageListener<V2XWarningTarget> {
|
||||
|
||||
override fun target(msgType: Int): Class<V2XWarningTarget> = V2XWarningTarget::class.java
|
||||
|
||||
override fun onMsgReceived(msgType: Int, data: V2XWarningTarget?) {
|
||||
if (msgType != 401018) {
|
||||
return
|
||||
}
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
CallerCloudListenerManager.invokeSocketAck(V2XEvent.Warning(data = data))
|
||||
}
|
||||
}
|
||||
|
||||
internal class V2XMessageListener402000: IMogoCloudSocketOnMessageListener<V2XOptimalRoute> {
|
||||
|
||||
override fun target(msgType: Int): Class<V2XOptimalRoute> = V2XOptimalRoute::class.java
|
||||
|
||||
override fun onMsgReceived(msgType: Int, data: V2XOptimalRoute?) {
|
||||
if (msgType != 402000) {
|
||||
return
|
||||
}
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
CallerCloudListenerManager.invokeSocketAck(V2XEvent.OptimalRoute(data = data))
|
||||
}
|
||||
}
|
||||
|
||||
internal class V2XMessageListener404000: IMogoCloudSocketOnMessageListener<V2XAdvanceWarning> {
|
||||
|
||||
override fun target(msgType: Int): Class<V2XAdvanceWarning> = V2XAdvanceWarning::class.java
|
||||
|
||||
override fun onMsgReceived(msgType: Int, data: V2XAdvanceWarning?) {
|
||||
if (msgType != 404000) {
|
||||
return
|
||||
}
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
CallerCloudListenerManager.invokeSocketAck(V2XEvent.ForwardsWarning(data = data))
|
||||
}
|
||||
}
|
||||
|
||||
internal class V2XMessageListener503000: IMogoCloudSocketOnMessageListener<Road.RW_PB> {
|
||||
|
||||
override fun target(msgType: Int): Class<Road.RW_PB> = Road.RW_PB::class.java
|
||||
|
||||
override fun onMsgReceived(msgType: Int, data: Road.RW_PB?) {
|
||||
if (msgType != 503000) {
|
||||
return
|
||||
}
|
||||
if (data == null) {
|
||||
return
|
||||
}
|
||||
CallerCloudListenerManager.invokeSocketAck(V2XEvent.RoadAI(data = data))
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.datacenter.autopilot
|
||||
|
||||
import android.Manifest.permission
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.annotation.RequiresPermission
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
@@ -737,4 +736,41 @@ class MoGoAutopilotControlProvider :
|
||||
MessageType.TYPE_RECEIVE_POINT_CLOUD)
|
||||
}
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1FrontDoorCmd(switchCmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(switchCmd)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1AirConditionerCmd(
|
||||
switchCmd: Int,
|
||||
modeCmd: Int,
|
||||
windSpeedCmd: Int,
|
||||
temperatureCmd: Int
|
||||
): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1AirConditionerCmd(switchCmd, modeCmd, windSpeedCmd, temperatureCmd)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1HeaderCmd(switchCmd: Int, windSpeedCmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1HeaderCmd(switchCmd, windSpeedCmd)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1MainLamp1Cmd(switchCmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1MainLamp1Cmd(switchCmd)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1MainLamp2Cmd(switchCmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1MainLamp2Cmd(switchCmd)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1SmallLampCmd(switchCmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1SmallLampCmd(switchCmd)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd)
|
||||
}
|
||||
|
||||
override fun sendPlanningCmd(cmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendPlanningCmd(cmd)
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
@@ -173,7 +173,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotBrakeLightData(vehicleState.brakeLightStatus)
|
||||
//方向盘转向角数据
|
||||
CallerChassisSteeringStateListenerManager.invokeAutopilotSteeringData(vehicleState.steering)
|
||||
//挂挡档位数据
|
||||
//挂档档位数据
|
||||
CallerChassisGearStateListenerManager.invokeAutopilotGearData(vehicleState.gear)
|
||||
//加速度
|
||||
CallerChassisAccStateListenerManager.invokeAutopilotAcc(vehicleState.accel)
|
||||
@@ -237,7 +237,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
chassisStates.gearSystemStates?.let { gearSystemStates ->
|
||||
gearSystemStates.gearPosition?.let {
|
||||
//挂挡档位数据
|
||||
//挂档档位数据
|
||||
CallerChassisGearStateListenerManager.invokeAutopilotGearData(it)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.datacenter.autopilot.adapter
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.debug.DebugConfig.*
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -27,12 +28,15 @@ class MoGoAdasMsgConnectStatusListenerImpl :
|
||||
OnAdasConnectStatusListener,
|
||||
IMoGoAutopilotStatusListener,
|
||||
IMoGoCloudListener {
|
||||
private val TAG = "ConnectStatus"
|
||||
|
||||
companion object{
|
||||
private const val TAG = "ConnectStatus"
|
||||
}
|
||||
|
||||
private var connectStatus = false
|
||||
|
||||
init {
|
||||
CallerCloudListenerManager.registerCloudListener(TAG, this)
|
||||
CallerCloudListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onConnectionIPCStatus(ipcConnectionStatus: Int, reason: String?) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.eagle.core.function.datacenter.autopilot.server
|
||||
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
package com.mogo.eagle.core.function.datacenter.location
|
||||
|
||||
import com.amap.api.location.AMapLocation
|
||||
import com.amap.api.location.AMapLocationClient
|
||||
import com.amap.api.location.AMapLocationClientOption
|
||||
import com.amap.api.location.AMapLocationListener
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGnssListener
|
||||
import com.mogo.eagle.core.function.api.map.listener.IGaoDeMapLocationListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerGaoDeMapLocationListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.MultiDisplayUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.support.obu.model.MogoObuHvBasicsData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
@@ -31,12 +26,11 @@ import mogo.telematics.pad.MessagePad
|
||||
object MoGoLocationDispatcher :
|
||||
IMoGoChassisGnssListener,
|
||||
IMoGoObuLocationWGS84Listener,
|
||||
AMapLocationListener {
|
||||
IGaoDeMapLocationListener {
|
||||
|
||||
private val TAG = "MoGoLocationManager"
|
||||
private const val TAG = "MoGoLocationManager"
|
||||
|
||||
private var mCityCode: String? = null
|
||||
private var mapLocation: AMapLocation? = null
|
||||
|
||||
/**
|
||||
* 最后一次工控机GNSS返回更新的位置
|
||||
@@ -54,33 +48,10 @@ object MoGoLocationDispatcher :
|
||||
private var lastGaoDeLocation: MogoLocation = MogoLocation()
|
||||
|
||||
fun initListener() {
|
||||
// 高德SDK隐私政策
|
||||
AMapLocationClient.updatePrivacyShow(Utils.getApp(), true, true)
|
||||
AMapLocationClient.updatePrivacyAgree(Utils.getApp(), true)
|
||||
|
||||
try {
|
||||
val mLocationClient = AMapLocationClient(Utils.getApp())
|
||||
|
||||
//初始化定位参数
|
||||
//声明mLocationOption对象
|
||||
val mLocationOption = AMapLocationClientOption()
|
||||
//设置定位监听
|
||||
mLocationClient.setLocationListener(this)
|
||||
//设置定位模式为高精度模式,Battery_Saving为低功耗模式,Device_Sensors是仅设备模式
|
||||
mLocationOption.locationMode = AMapLocationClientOption.AMapLocationMode.Hight_Accuracy
|
||||
//设置定位间隔,单位毫秒,默认为2000ms
|
||||
mLocationOption.interval = 1000
|
||||
//设置定位参数
|
||||
mLocationClient.setLocationOption(mLocationOption)
|
||||
// 启动定位监听
|
||||
mLocationClient.startLocation()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
// 初始化监听订阅工控机位置信息
|
||||
CallerChassisGnssListenerManager.addListener(TAG, this)
|
||||
CallerObuLocationWGS84ListenerManager.addListener(TAG, this)
|
||||
CallerGaoDeMapLocationListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onChassisGnss(gnssInfo: MessagePad.GnssInfo) {
|
||||
@@ -88,13 +59,13 @@ object MoGoLocationDispatcher :
|
||||
lastGnssLocation.gnssInfo = gnssInfo
|
||||
lastGnssLocation.lastReceiveTime = TimeUtils.getNowMills()
|
||||
// 将高德中的一些用于业务的数据进行融合,例如:CityCode、address等
|
||||
mapLocation?.let {
|
||||
lastGaoDeLocation.let {
|
||||
//agps 高德
|
||||
//agps_rtk 高德-高精
|
||||
lastGnssLocation.locType = 1000 // 定位类型为WGS84进行转译的坐标
|
||||
lastGnssLocation.satellite = 4
|
||||
|
||||
lastGnssLocation.cityName = it.city
|
||||
lastGnssLocation.cityName = it.cityName
|
||||
lastGnssLocation.cityCode = it.cityCode
|
||||
lastGnssLocation.provider = it.provider
|
||||
lastGnssLocation.address = it.address
|
||||
@@ -128,79 +99,42 @@ object MoGoLocationDispatcher :
|
||||
MultiDisplayUtils.getOtherDisplay()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 高德地图位置改变回调
|
||||
* @param aMapLocation 位置信息
|
||||
* @param mogoLocation 位置信息
|
||||
*/
|
||||
override fun onLocationChanged(aMapLocation: AMapLocation) {
|
||||
mapLocation = aMapLocation
|
||||
// 更新GNSS 信息
|
||||
lastGaoDeLocation.lastReceiveTime = TimeUtils.getNowMills()
|
||||
|
||||
// 将高德中的一些用于业务的数据进行融合,例如:CityCode、address等
|
||||
mapLocation?.let {
|
||||
// 转换 GCJ02-->WGS84 坐标
|
||||
val wgs84Location =
|
||||
CoordinateTransform.GCJ02ToWGS84(it.longitude, it.latitude)
|
||||
|
||||
lastGaoDeLocation.longitude = wgs84Location[0]
|
||||
lastGaoDeLocation.latitude = wgs84Location[1]
|
||||
lastGaoDeLocation.heading = it.bearing.toDouble()
|
||||
lastGaoDeLocation.gnssSpeed = it.speed
|
||||
lastGaoDeLocation.altitude = it.altitude
|
||||
lastGaoDeLocation.satelliteTime = it.time
|
||||
lastGaoDeLocation.lastReceiveTime = TimeUtils.getNowMills()
|
||||
|
||||
lastGaoDeLocation.locType = 1 // 定位类型为高德坐标(网路或者硬件定位)
|
||||
lastGaoDeLocation.satellite = 4
|
||||
|
||||
lastGaoDeLocation.cityName = it.city
|
||||
lastGaoDeLocation.cityCode = it.cityCode
|
||||
lastGaoDeLocation.provider = it.provider
|
||||
lastGaoDeLocation.address = it.address
|
||||
lastGaoDeLocation.district = it.district
|
||||
lastGaoDeLocation.province = it.province
|
||||
lastGaoDeLocation.adCode = it.adCode
|
||||
lastGaoDeLocation.locationDetail = it.locationDetail
|
||||
lastGaoDeLocation.poiName = it.poiName
|
||||
lastGaoDeLocation.aoiName = it.aoiName
|
||||
lastGaoDeLocation.street = it.street
|
||||
lastGaoDeLocation.streetNum = it.streetNum
|
||||
lastGaoDeLocation.description = it.description
|
||||
lastGaoDeLocation.buildingId = it.buildingId
|
||||
lastGaoDeLocation.floor = it.floor
|
||||
lastGaoDeLocation.errorCode = it.errorCode
|
||||
lastGaoDeLocation.errorInfo = it.errorInfo
|
||||
}
|
||||
override fun onMoGoLocationChanged(mogoLocation: MogoLocation) {
|
||||
// 更新GaoDe 信息
|
||||
lastGaoDeLocation = mogoLocation
|
||||
|
||||
// 计算最后一次工控机同步的定位是否超时,如果超时则切换为高德地图定位,暂定超过30秒需要切换
|
||||
if (1 == FunctionBuildConfig.gpsProvider) {
|
||||
if (TimeUtils.getNowMills() - lastGnssLocation.lastReceiveTime > 30000) {
|
||||
if (TimeUtils.getNowMills() - lastGnssLocation.lastReceiveTime > 10000) {
|
||||
syncGaoDeLocation()
|
||||
}
|
||||
} else if (2 == FunctionBuildConfig.gpsProvider) {
|
||||
if (TimeUtils.getNowMills() - lastOBULocation.lastReceiveTime > 30000) {
|
||||
if (TimeUtils.getNowMills() - lastOBULocation.lastReceiveTime > 10000) {
|
||||
syncGaoDeLocation()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 本地SP缓存城市Code
|
||||
val cityCode = aMapLocation.cityCode
|
||||
val cityCode = mogoLocation.cityCode
|
||||
if (cityCode != null && cityCode.isNotEmpty()) {
|
||||
mCityCode = aMapLocation.cityCode
|
||||
mCityCode = mogoLocation.cityCode
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
|
||||
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(
|
||||
SharedPrefsConstants.LOCATION_LATITUDE,
|
||||
aMapLocation.latitude.toString()
|
||||
mogoLocation.latitude.toString()
|
||||
)
|
||||
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
|
||||
.putString(
|
||||
SharedPrefsConstants.LOCATION_LONGITUDE,
|
||||
aMapLocation.longitude.toString()
|
||||
mogoLocation.longitude.toString()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -236,13 +170,13 @@ object MoGoLocationDispatcher :
|
||||
lastOBULocation.lastReceiveTime = TimeUtils.getNowMills()
|
||||
|
||||
// 将高德中的一些用于业务的数据进行融合,例如:CityCode、address等
|
||||
mapLocation?.let {
|
||||
lastGaoDeLocation.let {
|
||||
//agps 高德
|
||||
//agps_rtk 高德-高精
|
||||
lastOBULocation.locType = 1000 // 定位类型为WGS84进行转译的坐标
|
||||
lastOBULocation.satellite = 4
|
||||
|
||||
lastOBULocation.cityName = it.city
|
||||
lastOBULocation.cityName = it.cityName
|
||||
lastOBULocation.cityCode = it.cityCode
|
||||
lastOBULocation.provider = it.provider
|
||||
lastOBULocation.address = it.address
|
||||
@@ -274,4 +208,5 @@ object MoGoLocationDispatcher :
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,16 +2,13 @@ package com.mogo.eagle.core.function.datacenter.obu
|
||||
|
||||
import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuProvider
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.CommonUtils
|
||||
import com.mogo.support.obu.MogoObuManager
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -20,7 +17,6 @@ import com.mogo.support.obu.MogoObuManager
|
||||
@Route(path = MogoServicePaths.PATH_V2X_OBU_MOGO)
|
||||
class MoGoObuProvider : IMoGoObuProvider {
|
||||
private val TAG = "MoGoObuProvider"
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val taxiObuIp = "192.168.1.199" //obu的taxi和bus的ip已经全部统一成1网段ip
|
||||
|
||||
@@ -36,10 +32,11 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
MogoObuDcCombineManager.INSTANCE.init(context)
|
||||
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress())
|
||||
|
||||
//bus乘客版本obu功能去掉,大理项目需要全部车辆接收,不在限制
|
||||
//bus乘客版本obu功能去掉,大理项目需要全部车辆接收,不再限制
|
||||
mContext = context
|
||||
mContext?.let {
|
||||
val ipAddress = SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, taxiObuIp)
|
||||
val ipAddress =
|
||||
SharedPrefsMgr.getInstance(context).getString(MoGoConfig.OBU_IP, taxiObuIp)
|
||||
//mogo obu
|
||||
MogoPrivateObuNewManager.INSTANCE.connectObu(
|
||||
it,
|
||||
@@ -53,32 +50,28 @@ class MoGoObuProvider : IMoGoObuProvider {
|
||||
* 通过控制面板设置ip,进行传递
|
||||
*/
|
||||
override fun connect(ipAddress: String) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
) {
|
||||
//不处理
|
||||
} else {
|
||||
mContext?.let {
|
||||
// 保存本地OBU IP地址
|
||||
SharedPrefsMgr.getInstance(it).putString(MoGoConfig.OBU_IP, ipAddress)
|
||||
mContext?.let {
|
||||
// 保存本地OBU IP地址
|
||||
SharedPrefsMgr.getInstance(it).putString(MoGoConfig.OBU_IP, ipAddress)
|
||||
|
||||
//连接 mogo obu
|
||||
MogoPrivateObuNewManager.INSTANCE.connectObu(
|
||||
it,
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
|
||||
}
|
||||
//连接 mogo obu
|
||||
MogoPrivateObuNewManager.INSTANCE.connectObu(
|
||||
it,
|
||||
ipAddress,
|
||||
CommonUtils.getIpAddressString()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun disConnect() {
|
||||
MogoPrivateObuNewManager.INSTANCE.disconnect()
|
||||
MogoPrivateObuNewManager.INSTANCE.disConnectObu()
|
||||
}
|
||||
|
||||
override fun isConnected(): Boolean {
|
||||
return MogoObuManager.getInstance().connectStatus == 1
|
||||
return MogoPrivateObuNewManager.INSTANCE.isConnected()
|
||||
}
|
||||
|
||||
override fun setObuLog(isChecked: Boolean) {
|
||||
MogoPrivateObuNewManager.INSTANCE.setObuLog(isChecked)
|
||||
}
|
||||
}
|
||||
@@ -6,29 +6,22 @@ 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.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.obu.IMoGoObuWarningMapListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuWarningRsiListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuWarningRsmListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuWarningSpatListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuMapMathListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsiListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsmListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningSpatListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.*
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OBU
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.mogo.support.obu.constants.MogoObuConstants
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lixiaopeng
|
||||
@@ -78,7 +71,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
onMogoObuMapMath(mapMatchData)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* RSI预警信息 CvxRtiThreatIndInfo(交通标志预警(前方限速、前方学校等等),交通事件预警(前方拥堵、前方积水等等))
|
||||
*/
|
||||
@@ -140,9 +132,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (rsiWarningData.warningMsgList[0].signSerialNum) {
|
||||
// MogoObuConstants.RTS.RTI_TYPE_INTERSECTION -> { //十字路口
|
||||
// appId = V2iEventTypeEnum.TYPE_ID_NTERSECTION.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
@@ -191,10 +180,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
}
|
||||
// MogoObuConstants.RTS.RTI_TYPE_GO_STRAIGHT_TURN_RIGHT -> { //直行或右转
|
||||
// appId =
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_GO_STRAIGHT_TURN_RIGHT.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
@@ -258,11 +243,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
MogoObuConstants.STATUS.ADD -> {
|
||||
saveObuToDcData(appId, alertContent, ttsContent)
|
||||
showWarning(appId, alertContent, ttsContent, direction)
|
||||
// 更新数据,是否需要
|
||||
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)?.let {
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficThreatLevelInfo(it)
|
||||
// }
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
@@ -272,14 +252,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_NON)
|
||||
// 更新数据,删除标牌?
|
||||
// TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(rsiWarningData)
|
||||
// ?.let {
|
||||
// // 事件结束,还原车辆颜色
|
||||
// it.threatLevel = 0x01
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficInfo(it)
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -296,25 +268,55 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
)
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (rsmWarningData != null && rsmWarningData.participant != null) {
|
||||
var v2xType = ""
|
||||
if (rsmWarningData.participant.ptcType == 1) { //机动车
|
||||
v2xType =
|
||||
var v2xType = when (rsmWarningData.participant.ptcType) {
|
||||
1 -> { //机动车
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
} else if (rsmWarningData.participant.ptcType == 2) { //非机动车
|
||||
v2xType =
|
||||
}
|
||||
2 -> { //非机动车
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
} else if (rsmWarningData.participant.ptcType == 3) { //行人
|
||||
v2xType =
|
||||
}
|
||||
3 -> { //行人
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
} else { //未知
|
||||
v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
else -> { //未知
|
||||
EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
}
|
||||
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
|
||||
val alertContent =
|
||||
EventTypeEnumNew.getWarningContent(v2xType)
|
||||
var level = -1
|
||||
val direction =
|
||||
getMessageDirection(rsmWarningData.participant.targetPosition) //TODO 只有一个
|
||||
val direction = getMessageDirection(rsmWarningData.participant.targetPosition)
|
||||
//模型的显示
|
||||
when (rsmWarningData.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
// 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TODO
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)
|
||||
?.let {
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.removeCvxRvInfoIndInfo(rsmWarningData.participant.ptcId.toString())
|
||||
}
|
||||
}
|
||||
|
||||
if (rsmWarningData.warningMsg != null && rsmWarningData.warningMsg.warningDataList != null && rsmWarningData.warningMsg.warningDataList.size > 0) {
|
||||
level = rsmWarningData.warningMsg.warningDataList[0].warningLevel
|
||||
CallerLogger.d(
|
||||
@@ -323,45 +325,36 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
rsmWarningData.warningMsg.warningDataList[0].status
|
||||
} --v2xType--- $v2xType ---alertContent = $alertContent ---ttsContent= $ttsContent"
|
||||
)
|
||||
|
||||
when (rsmWarningData.warningMsg.warningDataList[0].status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//更新模型的颜色
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
saveObuToDcData(v2xType, alertContent, ttsContent)
|
||||
showWarning(v2xType, alertContent, ttsContent, direction)
|
||||
|
||||
// 更新数据 TODO
|
||||
// TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)?.let {
|
||||
//// TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficThreatLevelInfo(it)
|
||||
// }
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
// 删除
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_ALL)
|
||||
// 更新数据 TODO 由于obu通过域控需要转换单位,这里临时转换,后面3.0不需要转换
|
||||
// TrafficDataConvertUtils.cvxPtcThreatIndInfo2TrafficData(rsmWarningData)?.let {
|
||||
// // 事件结束,还原交通参与者颜色
|
||||
// it.threatLevel = 0x01
|
||||
//// TrafficMarkerDrawer.updateITrafficThreatLevelInfo(it)
|
||||
// CallerMapUIServiceManager.getMarkerService()
|
||||
// ?.updateITrafficThreatLevelInfo(it)
|
||||
// }
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.removeCvxRvInfoIndInfo(rsmWarningData.participant.ptcId.toString())
|
||||
// TrafficMarkerDrawer.removeCvxRvInfoIndInfo(rsmWarningData.participantOfOne.ptcID.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -383,10 +376,6 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
* 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道
|
||||
*/
|
||||
fun onMogoObuMapMath(data: ObuScene.MapMatchData?) {
|
||||
CallerLogger.d(
|
||||
"${M_OBU}${TAG}",
|
||||
"MogoObuDcCombineManager onMogoObuMapMath HmiBuildConfig.isShowObuLimitSpeedView = " + HmiBuildConfig.isShowObuLimitSpeedView
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuLimitSpeedView) {
|
||||
if (data != null) {
|
||||
CallerLogger.d(
|
||||
@@ -398,7 +387,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
} --- data.speedMaxLimit = ${data.speedMaxLimit}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加 TODO
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
(data.speedMaxLimit * 0.02 * 3.6).roundToInt().toInt(),
|
||||
DataSourceType.OBU
|
||||
@@ -469,6 +458,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 移除顶部弹窗,当收不到信号的时候触发一次
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightDisapper()
|
||||
isShowGreenWave = false
|
||||
isShowRunRedLight = false
|
||||
}
|
||||
@@ -598,18 +588,7 @@ class MogoObuDcCombineManager private constructor() : IMoGoObuWarningRsiListener
|
||||
* 保存obu通过工控机传输的数据到消息盒子
|
||||
*/
|
||||
private fun saveObuToDcData(type: String, content: String, tts: String) {
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
type,
|
||||
content,
|
||||
tts
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.TELEMATIC
|
||||
}
|
||||
)
|
||||
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(type, content, tts, DataSourceType.TELEMATIC)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,20 +4,16 @@ import android.content.Context
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
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.angle.Default
|
||||
import com.mogo.eagle.core.function.api.map.angle.TooClose
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuSaveMessageListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
@@ -29,9 +25,11 @@ import com.mogo.support.obu.ObuBase
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.mogo.support.obu.constants.MogoObuComType
|
||||
import com.mogo.support.obu.constants.MogoObuConstants
|
||||
import com.mogo.support.obu.constants.MogoObuLogLevel
|
||||
import com.mogo.support.obu.constants.MogoObuTopicId
|
||||
import com.mogo.support.obu.model.*
|
||||
import com.mogo.support.obu.option.MogoObuCom
|
||||
import com.mogo.support.obu.option.MogoObuLog
|
||||
import com.mogo.support.obu.option.MogoObuOptions
|
||||
import com.zhidao.support.obu.ObuManager
|
||||
import com.zhidao.support.obu.OnObuListener
|
||||
@@ -74,7 +72,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
.build()
|
||||
|
||||
//每次连接的时候如果连接连接了,先断开,防止ip改变等导致的连接失败
|
||||
if (ObuManager.getInstance().connectStatus == 1) {
|
||||
if (ObuManager.getInstance().connectStatus == MogoObuConstants.CONNECT_STATUS.CONNECTED) {
|
||||
try {
|
||||
ObuManager.getInstance().disconnect()
|
||||
} catch (e: Exception) {
|
||||
@@ -84,12 +82,32 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
ObuManager.getInstance().connect(options)
|
||||
}
|
||||
|
||||
fun getMogoObuListener(): OnObuListener {
|
||||
return mogoObuListener
|
||||
/**
|
||||
* 断开新obu
|
||||
*/
|
||||
fun disConnectObu() {
|
||||
try {
|
||||
ObuManager.getInstance().disconnect()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
fun disconnect() {
|
||||
ObuManager.getInstance().disconnect()
|
||||
/**
|
||||
* 新obu是否连接
|
||||
*/
|
||||
fun isConnected(): Boolean {
|
||||
return ObuManager.getInstance().connectStatus == MogoObuConstants.CONNECT_STATUS.CONNECTED
|
||||
}
|
||||
|
||||
fun setObuLog(isChecked: Boolean) {
|
||||
ObuManager.getInstance().setEnableLog(isChecked)
|
||||
val builder: MogoObuLog.Builder =
|
||||
MogoObuLog.newBuilder().setEnableStdio(isChecked)
|
||||
if (isChecked) {
|
||||
builder.setStdioLevel(MogoObuLogLevel.DBG)
|
||||
}
|
||||
ObuManager.getInstance().logConfig(builder.build())
|
||||
}
|
||||
|
||||
private val mogoObuListener: OnObuListener = object : OnObuListener {
|
||||
@@ -133,15 +151,16 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
* v2v预警信息 CvxRvInfoIndInfo CvxV2vThreatIndInfo 他车
|
||||
*/
|
||||
override fun onObuRvWarning(data: ObuScene.RvWarningData) {
|
||||
// if (HmiBuildConfig.isShowObuV2vView) { //TODO 临时需要关闭v2v开关
|
||||
if (data.warningMsg != null && !data.warningMsg.warningDataList.isNullOrEmpty()) {
|
||||
// 更新数据,远车数据,之前要匹配uuid
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data.vehBasicsMsg)?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()?.updateITrafficLocationInfo(it)
|
||||
}
|
||||
if (HmiBuildConfig.isShowObuV2vView) {
|
||||
if (data.warningMsg != null) {
|
||||
// 更新数据,远车数据,之前要匹配uuid
|
||||
TrafficDataConvertUtilsNew.cvxRvInfoIndInfo2TrafficData(data.vehBasicsMsg)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficLocationInfo(it)
|
||||
}
|
||||
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", data.toString())
|
||||
data.let {
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}", data.toString())
|
||||
//预警信息,预警类型 threat_level 2、3
|
||||
data.vehBasicsMsg?.let {
|
||||
//预警方位
|
||||
@@ -150,14 +169,12 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
var appId = ""
|
||||
var level = -1
|
||||
var status = -1
|
||||
data.warningMsg?.let {
|
||||
if (data.warningMsg.warningDataList != null && data.warningMsg.warningDataList.size > 0) {
|
||||
level = data.warningMsg.warningDataList[0].warningLevel
|
||||
appId = data.warningMsg.warningDataList[0].warningType.toString()
|
||||
status = data.warningMsg.warningDataList[0].status
|
||||
//拼凑数据
|
||||
handleSdkObu(appId, direction, status, level, data)
|
||||
}
|
||||
if (data.warningMsg.warningDataList != null && data.warningMsg.warningDataList.size > 0) {
|
||||
level = data.warningMsg.warningDataList[0].warningLevel
|
||||
appId = data.warningMsg.warningDataList[0].warningType.toString()
|
||||
status = data.warningMsg.warningDataList[0].status
|
||||
//拼凑数据
|
||||
handleSdkObu(appId, direction, status, level, data)
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
@@ -169,224 +186,230 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 红绿灯预警信息 CvxIvpThreatIndInfo
|
||||
*/
|
||||
override fun onObuSpatWarning(data: ObuScene.SpatWarningData) {
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lightsList
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
handlerTrafficLight(
|
||||
data.warningType,
|
||||
data.status,
|
||||
data.lightsList
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RSI预警信息 onMogoObuRsiWarning(交通标志预警(前方限速、前方学校等等),交通事件预警(前方拥堵、前方积水等等))
|
||||
*/
|
||||
override fun onObuRsiWarning(data: ObuScene.RsiWarningData) {
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (data.warningMsgList != null && data.warningMsgList.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = data.warningMsgList[0].sceneType.toString()
|
||||
val status = data.status
|
||||
val level = data.warningMsgList[0].warningLevel
|
||||
val direction = getMessageDirection(data.warningMsgList[0].targetPosition)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsiWarning appId = $appId --status = $status --level = $level -- eventSerialNum = ${data.warningMsgList[0].eventSerialNum} ---signSerialNum = ${data.warningMsgList[0].signSerialNum} --- direction = $direction -- targetPosition = ${data.warningMsgList[0].targetPosition}"
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (data.warningMsgList != null && data.warningMsgList.size > 0) {
|
||||
var alertContent = ""
|
||||
var ttsContent = ""
|
||||
var appId = data.warningMsgList[0].sceneType.toString()
|
||||
val status = data.status
|
||||
val level = data.warningMsgList[0].warningLevel
|
||||
val direction = getMessageDirection(data.warningMsgList[0].targetPosition)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsiWarning appId = $appId --status = $status --level = $level -- eventSerialNum = ${data.warningMsgList[0].eventSerialNum} ---signSerialNum = ${data.warningMsgList[0].signSerialNum} --- direction = $direction -- targetPosition = ${data.warningMsgList[0].targetPosition}"
|
||||
)
|
||||
|
||||
if (appId != "0") {
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (data.warningMsgList[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
if (appId != "0") {
|
||||
when (appId) {
|
||||
// 道路危险情况预警
|
||||
MogoObuConstants.RSI_SCENE_TYPE.HLW.toString() -> {
|
||||
when (data.warningMsgList[0].eventSerialNum) {
|
||||
MogoObuConstants.RTE.RTI_TYPE_BREAKDOWN -> {//车辆故障
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_BREAKDOWN_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_ROAD_WATER -> { //道路积水
|
||||
appId = EventTypeEnumNew.FOURS_PONDING.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_PARKING_VIOLATION -> { //异常停车
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PARKING.poiType
|
||||
}
|
||||
// MogoObuConstants.RTE.RTI_TYPE_CONSTRUCTION_RTE -> { //施工占道,和标牌重复
|
||||
// appId = EventTypeEnumNew.FOURS_ROAD_WORK.poiType
|
||||
// }
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
MogoObuConstants.RTE.RTI_TYPE_SPEEDING -> { //超速行驶
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_SLW.poiType
|
||||
}
|
||||
MogoObuConstants.RTE.RTI_TYPE_RETRIGRADE -> { //车辆逆行
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_VEHICLE_RETROGRADE.poiType
|
||||
}
|
||||
}
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (data.warningMsgList[0].signSerialNum) {
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
//车内标牌
|
||||
MogoObuConstants.RSI_SCENE_TYPE.IVS.toString() -> {
|
||||
when (data.warningMsgList[0].signSerialNum) {
|
||||
MogoObuConstants.RTS.RTI_TYPE_SHAPR_TURNS -> { //急转弯
|
||||
appId = EventTypeEnumNew.TYPE_ID_SHAPR_TURNS.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_BRIDGE -> { //桥梁
|
||||
appId = EventTypeEnumNew.TYPE_ID_BRIDGE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_PEDESTRIAN -> { //行人
|
||||
appId = EventTypeEnumNew.TYPE_ID_PEDESTRIAN.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SLIPPERY_ROAD -> { //路滑
|
||||
appId = EventTypeEnumNew.TYPE_ID_SLIPPERY_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_TUNNEL -> { //隧道
|
||||
appId = EventTypeEnumNew.TYPE_ID_TUNNEL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_FERRY -> { //渡轮
|
||||
appId = EventTypeEnumNew.TYPE_ID_FERRY.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_UNEVEN_ROAD -> { //路面不平
|
||||
appId = EventTypeEnumNew.TYPE_ID_UNEVEN_ROAD.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NON_MOTOR_VEHICLE -> { //非机动车
|
||||
appId = EventTypeEnumNew.TYPE_ID_NON_MOTOR_VEHICLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_OBSTACLE -> { //障碍
|
||||
appId = EventTypeEnumNew.TYPE_ID_OBSTACLE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_CONSTRUCTION -> { //施工
|
||||
appId = EventTypeEnumNew.TYPE_FOURS_ROAD_WORK.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_VEHICLE_QUEUE -> { //车队
|
||||
appId = EventTypeEnumNew.TYPE_VEHICLE_QUEUE.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_PASSING -> { //不通
|
||||
appId = EventTypeEnumNew.TYPE_NO_PASSING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TURNING_AROUND -> { //禁止掉头
|
||||
appId = EventTypeEnumNew.TYPE_NO_TURNING_AROUND.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_STOPPING -> { //禁止停车
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_PARKING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NO_TOOTING -> { //禁止鸣笛
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_NO_TOOTING.poiType
|
||||
}
|
||||
// MogoObuConstants.RTS.RTI_TYPE_SPEED_LIMIT -> { //限速
|
||||
// appId =
|
||||
// EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
// }
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
MogoObuConstants.RTS.RTI_TYPE_BUS_WARNING -> { //公交提醒
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_BUS_WARNING.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_NARROW_RIGHT -> { //右侧变窄/车道数减少
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_NARROW_RIGHT.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_GAS_STATION -> { //加油站
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_GAS_STATION.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_SCHOOL -> { //学校
|
||||
appId =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType
|
||||
}
|
||||
MogoObuConstants.RTS.RTI_TYPE_ACCIDENT -> { //事故
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ACCIDENT.poiType
|
||||
}
|
||||
}
|
||||
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //标牌是没有影响范围的
|
||||
alertContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString()
|
||||
)
|
||||
}
|
||||
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //标牌是没有影响范围的
|
||||
alertContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString()
|
||||
)
|
||||
}
|
||||
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
}
|
||||
}
|
||||
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new onMogoObuRsiWarning appId = $appId ---status = $status --- ttsContent = $ttsContent --alertContent = $alertContent -- eventSerialNum = ${data.warningMsgList[0].eventSerialNum} ---signSerialNum = ${data.warningMsgList[0].signSerialNum} ---direction = ${direction.direction} --distance = ${
|
||||
Math.round(data.warningMsgList[0].distance)
|
||||
} ---eventRadius = ${Math.round(data.warningMsgList[0].eventRadius)} --speedMaxLimit = ${data.warningMsgList[0].speedMaxLimit.toInt()}"
|
||||
)
|
||||
|
||||
when (status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
// 拥堵
|
||||
MogoObuConstants.RSI_SCENE_TYPE.TJW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_TJW.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
alertContent = String.format( //事件才有影响范围
|
||||
alertContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
ttsContent = String.format(
|
||||
ttsContent,
|
||||
Math.round(data.warningMsgList[0].distance).toString(),
|
||||
Math.round(data.warningMsgList[0].eventRadius).toString()
|
||||
)
|
||||
}
|
||||
saveObuData(appId, alertContent, ttsContent)
|
||||
showWarning(appId, alertContent, ttsContent, direction)
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
//限速预警, ADD处理一次
|
||||
MogoObuConstants.RSI_SCENE_TYPE.SLW.toString() -> {
|
||||
appId = EventTypeEnumNew.TYPE_USECASE_ID_ROAD_SPEED_LIMIT.poiType
|
||||
alertContent = EventTypeEnumNew.getWarningContent(appId)
|
||||
ttsContent = EventTypeEnumNew.getWarningTts(appId)
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"new onMogoObuRsiWarning appId = $appId ---status = $status --- ttsContent = $ttsContent --alertContent = $alertContent -- eventSerialNum = ${data.warningMsgList[0].eventSerialNum} ---signSerialNum = ${data.warningMsgList[0].signSerialNum} ---direction = ${direction.direction} --distance = ${
|
||||
Math.round(data.warningMsgList[0].distance)
|
||||
} ---eventRadius = ${Math.round(data.warningMsgList[0].eventRadius)} --speedMaxLimit = ${data.warningMsgList[0].speedMaxLimit.toInt()}"
|
||||
)
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficInfo(it)
|
||||
when (status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//不显示弹框,语音提示,数据在消息盒子里面展示,此处不在处理弹框
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
saveObuData(appId, alertContent, ttsContent)
|
||||
showWarning(appId, alertContent, ttsContent, direction)
|
||||
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据
|
||||
TrafficDataConvertUtilsNew.cvxRtiThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原车辆颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficInfo(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -405,133 +428,132 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsmWarning ------> ${data.toString()}"
|
||||
)
|
||||
// if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (data != null && data.participant != null) {
|
||||
var v2xType = ""
|
||||
if (data.participant.ptcType == 1) { //机动车
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 2) { //非机动车
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
} else if (data.participant.ptcType == 3) { //行人
|
||||
v2xType =
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
} else { //未知
|
||||
v2xType = EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
|
||||
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
|
||||
val alertContent =
|
||||
EventTypeEnumNew.getWarningContent(v2xType)
|
||||
var level = -1
|
||||
val direction = getMessageDirection(data.participant.targetPosition)
|
||||
|
||||
//物体数据绘制
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsmWarning ---- data.status = ${data.status} ---data.participant.ptcId = ${data.participant.ptcId} ---data.participant.ptcType = ${data.participant.ptcType} ---data.warningMsg = ${data.warningMsg} -----data = ${data.toString()}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
// 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TODO
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (HmiBuildConfig.isShowObuWeaknessTrafficView) {
|
||||
// 交通参与者类型 0x0:未知 UNKNOWN | 1机动车 2:非机动车 NON_MOTOR | 3:行人 PEDESTRIAN 4:obu
|
||||
if (data != null && data.participant != null) {
|
||||
var v2xType = when (data.participant.ptcType) {
|
||||
1 -> { //机动车
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_MOTOR_VEHICLES.poiType
|
||||
}
|
||||
2 -> { //非机动车
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_NOT_MOTOR_VEHICLES.poiType
|
||||
}
|
||||
3 -> { //行人
|
||||
EventTypeEnumNew.TYPE_USECASE_ID_VRUCW_PERSON.poiType
|
||||
}
|
||||
else -> { //未知
|
||||
EventTypeEnumNew.TYPE_ERROR.poiType
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
|
||||
}
|
||||
}
|
||||
|
||||
//预警status
|
||||
if (data.warningMsg != null && data.warningMsg.warningDataList != null && data.warningMsg.warningDataList.size > 0) {
|
||||
level = data.warningMsg.warningDataList[0].warningLevel //默认是1个
|
||||
val ttsContent = EventTypeEnumNew.getWarningTts(v2xType)
|
||||
val alertContent = EventTypeEnumNew.getWarningContent(v2xType)
|
||||
var level = -1
|
||||
val direction = getMessageDirection(data.participant.targetPosition)
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningDataList[0].status} ---v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent ---level = $level"
|
||||
"onMogoObuRsmWarning ---- data.status = ${data.status} ---data.participant.ptcId = ${data.participant.ptcId} ---data.participant.ptcType = ${data.participant.ptcType} ---data.warningMsg = ${data.warningMsg} -----data = ${data.toString()}"
|
||||
)
|
||||
when (data.warningMsg.warningDataList[0].status) {
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//更新模型的颜色
|
||||
// 更新数据,模型变色的时候是不是update,如果不是更新,可能导致模型不变色,(add的时候,是否有level高的) TODO
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
saveObuData(v2xType, alertContent, ttsContent)
|
||||
showWarning(v2xType, alertContent, ttsContent, direction)
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_ALL)
|
||||
// 更新数据 TODO 删除原来的,改变颜色,删除marker。不影响别的模型添加
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
// 事件结束,还原交通参与者颜色
|
||||
it.threatLevel = 0x01
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
|
||||
}
|
||||
}
|
||||
|
||||
//预警status
|
||||
if (data.warningMsg != null && data.warningMsg.warningDataList != null && data.warningMsg.warningDataList.size > 0) {
|
||||
level = data.warningMsg.warningDataList[0].warningLevel //默认是1个
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuRsmWarning ---status---> ${data.status} ---data.warningMsg.warningData[0].status = ${data.warningMsg.warningDataList[0].status} ---v2xType = $v2xType ---alertContent = $alertContent ---ttsContent = $ttsContent ---level = $level"
|
||||
)
|
||||
when (data.warningMsg.warningDataList[0].status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
//更新模型的颜色
|
||||
TrafficDataConvertUtilsNew.cvxPtcThreatIndInfo2TrafficData(data)
|
||||
?.let {
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.updateITrafficThreatLevelInfo(it)
|
||||
}
|
||||
|
||||
if (alertContent.isEmpty() || ttsContent.isEmpty()) {
|
||||
return
|
||||
}
|
||||
saveObuData(v2xType, alertContent, ttsContent)
|
||||
showWarning(v2xType, alertContent, ttsContent, direction)
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> {// 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
// 关闭警告红边
|
||||
CallerHmiManager.dismissWarning(WarningDirectionEnum.ALERT_WARNING_ALL)
|
||||
//删除弱势交通元素
|
||||
CallerMapUIServiceManager.getMarkerService()
|
||||
?.removeCvxRvInfoIndInfo(data.participant.ptcId.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图匹配 是OBU算法输出地图匹配结果,主车匹配道路哪条路或者哪条车道
|
||||
*/
|
||||
override fun onObuMapMath(data: ObuScene.MapMatchData?) {
|
||||
if (data != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuMapMath = ${data.status} --speedMaxLimit = ${(data.speedMaxLimit * 3.6).roundToInt()}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
UiThreadHandler.post {
|
||||
if (data.speedMaxLimit > 0) {
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
(data.speedMaxLimit * 3.6).roundToInt(), DataSourceType.OBU
|
||||
)
|
||||
if (HmiBuildConfig.isShowObuV2iView) {
|
||||
if (data != null) {
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"onMogoObuMapMath = ${data.status} --speedMaxLimit = ${(data.speedMaxLimit * 3.6).roundToInt()}"
|
||||
)
|
||||
when (data.status) {
|
||||
MogoObuConstants.STATUS.ADD -> { // 添加
|
||||
UiThreadHandler.post {
|
||||
if (data.speedMaxLimit > 0) {
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
(data.speedMaxLimit * 3.6).roundToInt(), DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
MogoObuConstants.STATUS.UPDATE -> { // 更新
|
||||
}
|
||||
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
UiThreadHandler.post {
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
-1,
|
||||
DataSourceType.OBU
|
||||
)
|
||||
MogoObuConstants.STATUS.DELETE -> { // 删除
|
||||
UiThreadHandler.post {
|
||||
CallerLimitingVelocityListenerManager.invokeUnion(
|
||||
-1,
|
||||
DataSourceType.OBU
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -543,7 +565,6 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
* 获取消息的方位 车辆相关
|
||||
*/
|
||||
private fun getMessageDirection(targetClassification: Int): WarningDirectionEnum {
|
||||
// CallerLogger.d("$M_OBU${TAG_MOGO_NEW_OBU}", "预警红边:预警方向->$targetClassification")
|
||||
return when (targetClassification) {
|
||||
MogoObuConstants.VEH_TARGET_POSITION.AHEAD_IN_LANE,
|
||||
MogoObuConstants.VEH_TARGET_POSITION.ONCOMING_IN_LANE -> WarningDirectionEnum.ALERT_WARNING_TOP //正前方
|
||||
@@ -589,7 +610,9 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
if (FunctionBuildConfig.isObuWarningFusionUnion) {
|
||||
alertContent = "前车距离过近"
|
||||
ttsContent = "前车距离过近"
|
||||
CallerObuWarningListenerManager.invokeTrackerFusionData(ObuManager.getInstance().obuRvToTrackedObject(info))
|
||||
CallerObuWarningListenerManager.invokeTrackerFusionData(
|
||||
ObuManager.getInstance().obuRvToTrackedObject(info)
|
||||
)
|
||||
} else {
|
||||
alertContent =
|
||||
EventTypeEnumNew.getWarningContent(EventTypeEnumNew.TYPE_USECASE_ID_FCW.poiType)
|
||||
@@ -650,7 +673,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
ttsContent =
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_LCW.poiType)
|
||||
v2xType = EventTypeEnumNew.TYPE_USECASE_ID_LCW.poiType
|
||||
if (
|
||||
if (
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_TOP_LEFT ||
|
||||
direction == WarningDirectionEnum.ALERT_WARNING_BOTTOM_LEFT
|
||||
@@ -714,11 +737,6 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
v2xType = EventTypeEnumNew.TYPE_USECASE_ID_EVW.poiType
|
||||
}
|
||||
|
||||
// 这里处理固定的提示信息,包括了<紧急车辆提醒>
|
||||
else -> {
|
||||
// ttsContent = EventTypeEnumNew.getWarningTts(appId.toString())
|
||||
// alertContent = EventTypeEnumNew.getWarningContent(appId.toString())
|
||||
}
|
||||
}
|
||||
|
||||
when (status) {
|
||||
@@ -799,9 +817,9 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
MogoObuConstants.STATUS.DELETE -> {
|
||||
// 移除顶部弹窗
|
||||
CallerTrafficLightListenerManager.disableTrafficLight()
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightDisapper()
|
||||
isShowGreenWave = false
|
||||
isShowRunRedLight = false
|
||||
CallerTrafficLightListenerManager.invokeTrafficLightDisapper()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -833,10 +851,6 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
1 -> {//闯红灯 V2I_RLVW_VIOLATION_TYPE_RUNNING_RED_LIGHT 一个红灯周期只显示一次
|
||||
if (!isShowRunRedLight) {
|
||||
isShowRunRedLight = true
|
||||
CallerLogger.d(
|
||||
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
|
||||
"changeTrafficLightStatus 闯红灯 --------> "
|
||||
)
|
||||
ttsContent =
|
||||
EventTypeEnumNew.getWarningTts(EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType)
|
||||
alertContent =
|
||||
@@ -938,18 +952,7 @@ class MogoPrivateObuNewManager private constructor() {
|
||||
* 保存obu直连数据到消息盒子
|
||||
*/
|
||||
private fun saveObuData(type: String, content: String, tts: String) {
|
||||
CallerMsgBoxManager.saveMsgBox(
|
||||
MsgBoxBean(
|
||||
MsgBoxType.V2X,
|
||||
V2XMsg(
|
||||
type,
|
||||
content,
|
||||
tts
|
||||
)
|
||||
).apply {
|
||||
sourceType = DataSourceType.OBU
|
||||
}
|
||||
)
|
||||
CallerObuSaveMessageListenerManager.invokeObuSaveMessage(type, content, tts, DataSourceType.OBU)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.datacenter.v2x
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.ILimitingVelocityListener
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.TrafficLightEnum
|
||||
import com.mogo.eagle.core.data.trafficlight.*
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.union.IMoGoTrafficLightListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import perception.TrafficLightOuterClass
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
@@ -87,7 +88,16 @@ object DataManager {
|
||||
msg.timestamp = System.currentTimeMillis()
|
||||
msg.bean2Json = GsonUtils.toJson(msg.bean)
|
||||
when (type) {
|
||||
MsgBoxType.V2X, MsgBoxType.OBU, MsgBoxType.NOTICE, MsgBoxType.OPERATION -> {
|
||||
MsgBoxType.V2X -> {
|
||||
// 汇总消息不存数据库
|
||||
if (msg.sourceType != DataSourceType.SUMMARY) {
|
||||
synchronized(this) {
|
||||
notifyList.add(msg)
|
||||
}
|
||||
}
|
||||
CallerMsgBoxListenerManager.invokeListener(MsgCategory.NOTICE, msg)
|
||||
}
|
||||
MsgBoxType.OBU, MsgBoxType.NOTICE, MsgBoxType.OPERATION -> {
|
||||
synchronized(this) {
|
||||
notifyList.add(msg)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_MSG_BOX_MODULE
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxProvider
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxProvider
|
||||
import com.mogo.eagle.core.function.msgbox.DataManager.saveAllMessages2Disk
|
||||
|
||||
@Route(path = PATH_MSG_BOX_MODULE)
|
||||
|
||||
Reference in New Issue
Block a user