[2.13.2][feat]V2X事件汇总的消息加入消息盒子
This commit is contained in:
@@ -4,12 +4,13 @@ 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.MogoServicePaths.PATH_V2X_MODULE
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
|
||||
import com.mogo.eagle.core.function.api.v2x.IV2XEventProvider
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightManager
|
||||
import com.mogo.eagle.core.function.v2x.events.V2XEventManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
@Route(path = PATH_V2X_MODULE)
|
||||
class V2XProvider : IMoGoFunctionServerProvider {
|
||||
class V2XProvider : IV2XEventProvider {
|
||||
|
||||
override val functionName: String
|
||||
get() = "V2XProvider"
|
||||
@@ -22,6 +23,10 @@ class V2XProvider : IMoGoFunctionServerProvider {
|
||||
}
|
||||
}
|
||||
|
||||
override fun queryWholeRoadEvents() {
|
||||
V2XEventManager.queryWholeRoadEvents()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
//不处理
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.*
|
||||
import android.util.*
|
||||
import androidx.localbroadcastmanager.content.*
|
||||
import com.mogo.cloud.passport.*
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.module.ServiceConst.CARD_TYPE_ROAD_CONDITION
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.EventTypeHelper
|
||||
@@ -18,6 +19,7 @@ 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.DataSourceType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
@@ -25,6 +27,7 @@ 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.*
|
||||
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.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
|
||||
@@ -49,6 +52,9 @@ import com.mogo.eagle.core.function.v2x.internal.data.V2XMarkerCardResult
|
||||
import com.mogo.eagle.core.function.v2x.internal.data.V2XOptimalRoute
|
||||
import com.mogo.eagle.core.function.v2x.internal.data.V2XWarningTarget
|
||||
import com.mogo.eagle.core.function.v2x.internal.event.V2XEvent
|
||||
import com.mogo.eagle.core.function.v2x.road.V2XEventServiceApi
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.utils.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
@@ -505,8 +511,6 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
}
|
||||
|
||||
private fun realQueryV2xEvents(lineId: String, sn: String) {
|
||||
/*
|
||||
TODO fufeng 先注掉,编译通过
|
||||
v2xEventDisposable = MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(V2XEventServiceApi::class.java)
|
||||
.queryAllV2XEventsByLineId(lineId, sn)
|
||||
@@ -528,7 +532,7 @@ object V2XEventManager : IMoGoMapLocationListener, IMoGoTokenCallback, IV2XCallb
|
||||
msgBoxBean.sourceType = DataSourceType.SUMMARY
|
||||
CallerMsgBoxManager.saveMsgBox(msgBoxBean)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
private fun getLineId(): Long {
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.mogo.eagle.core.function.v2x.road
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.mogo.eagle.core.data.BaseData
|
||||
|
||||
|
||||
@Keep
|
||||
data class V2XEventResult (
|
||||
@SerializedName("result")
|
||||
var result: Result?
|
||||
): BaseData()
|
||||
|
||||
@Keep
|
||||
data class Result(
|
||||
@SerializedName("eventList")
|
||||
var v2XEventList: List<V2XEvent>?
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class V2XEvent(
|
||||
@SerializedName("receiveTime")
|
||||
var receiveTime: Long,
|
||||
|
||||
@SerializedName("detectTime")
|
||||
var detectTime: Long,
|
||||
|
||||
@SerializedName("id")
|
||||
var id: String?,
|
||||
|
||||
@SerializedName("center")
|
||||
var center: Center?,
|
||||
|
||||
@SerializedName("centerRoad")
|
||||
var centerRoad: CenterRoad?,
|
||||
|
||||
@SerializedName("radius")
|
||||
var radius: Double,
|
||||
|
||||
@SerializedName("poiType")
|
||||
var poiType: String?
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class Center(
|
||||
@SerializedName("lat")
|
||||
var lat: Double,
|
||||
|
||||
@SerializedName("lon")
|
||||
var lon: Double
|
||||
)
|
||||
|
||||
@Keep
|
||||
data class CenterRoad(
|
||||
@SerializedName("bearing")
|
||||
var bearing: Double,
|
||||
|
||||
@SerializedName("laneNo")
|
||||
var laneNo: Long,
|
||||
|
||||
@SerializedName("roadId")
|
||||
var roadId: String?,
|
||||
|
||||
@SerializedName("roadName")
|
||||
var roadName: String?,
|
||||
|
||||
@SerializedName("tileId")
|
||||
var tileId: Long
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.mogo.eagle.core.function.v2x.road
|
||||
|
||||
import io.reactivex.Observable
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Query
|
||||
|
||||
interface V2XEventServiceApi {
|
||||
|
||||
@GET("/eagleEye-mis/config/queryV2NInformation")
|
||||
fun queryAllV2XEventsByLineId(@Query("lineId") lineId: String, @Query("sn") sn: String): Observable<V2XEventResult>
|
||||
}
|
||||
Reference in New Issue
Block a user