Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0

# Conflicts:
#	core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/constants/MogoServicePaths.java
This commit is contained in:
wangmingjun
2023-02-20 10:39:15 +08:00
259 changed files with 1738 additions and 1849 deletions

View File

@@ -16,7 +16,7 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils
*/
object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocationGCJ02Listener>() {
val TAG = "CallerChassisLocationGCJ20ListenerManager"
private const val TAG = "CallerChassisLocationGCJ20ListenerManager"
@Volatile
private var mGnssInfo: MogoLocation? = null
@@ -36,6 +36,8 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
setListenerHz(tag, callBackHz)
}
//todo 宏宇 添加HZ的移除操作
fun getChassisLocationGCJ02(): MogoLocation? {
return mGnssInfo
}

View File

@@ -2,8 +2,8 @@ package com.mogo.eagle.core.function.call.biz
import androidx.annotation.MainThread
import com.mogo.eagle.core.data.map.Infrastructure
import com.mogo.eagle.core.data.v2x.V2XEvent
import com.mogo.eagle.core.function.api.v2x.IFuncBizProvider
import com.mogo.eagle.core.data.v2x.V2XEventData
import com.mogo.eagle.core.function.api.biz.IFuncBizProvider
import com.mogo.eagle.core.function.call.base.CallerBase
object CallerFuncBizListenerManager: CallerBase<IFuncBizProvider>() {
@@ -24,10 +24,10 @@ object CallerFuncBizListenerManager: CallerBase<IFuncBizProvider>() {
}
@MainThread
fun invokeV2XEvents(v2xEvents: List<V2XEvent>?) {
fun invokeV2XEvents(v2XEventData: List<V2XEventData>?) {
M_LISTENERS.forEach {
val listener = it.value
listener.onV2XEvents(v2xEvents)
listener.onV2XEvents(v2XEventData)
}
}
}

View File

@@ -1,61 +1,26 @@
package com.mogo.eagle.core.function.call.cloud
import com.mogo.eagle.core.data.v2x.V2XEvent
import com.mogo.eagle.core.function.api.cloud.IMoGoCloudListener
import java.util.concurrent.ConcurrentHashMap
import com.mogo.eagle.core.function.call.base.CallerBase
object CallerCloudListenerManager {
private val M_CLOUD_LISTENER: ConcurrentHashMap<String, IMoGoCloudListener> =
ConcurrentHashMap()
/**
* 添加监听
* @param tag 标记,用来注销监听使用
* @param listener 监听回调
*/
fun registerCloudListener(
tag: String,
listener: IMoGoCloudListener
) {
if (M_CLOUD_LISTENER.containsKey(tag)) {
return
}
M_CLOUD_LISTENER[tag] = listener
}
/**
* 删除监听
* @param tag 标记,用来注销监听使用
*/
fun unRegisterCloudListener(tag: String) {
if (!M_CLOUD_LISTENER.containsKey(tag)) {
return
}
M_CLOUD_LISTENER.remove(tag)
}
/**
* 删除监听
* @param listener 要删除的监听对象
*/
fun unRegisterCloudListener(listener: IMoGoCloudListener) {
if (!M_CLOUD_LISTENER.containsValue(listener)) {
return
}
M_CLOUD_LISTENER.forEach {
if (it.value == listener) {
M_CLOUD_LISTENER.remove(it.key)
}
}
}
object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
/**
* 分发获取到的设备sn
*/
fun invokeCloudTokenGot(token: String, sn: String) {
M_CLOUD_LISTENER.forEach {
M_LISTENERS.forEach {
val listener = it.value
listener.tokenGot(token, sn)
}
}
fun invokeSocketAck(event: V2XEvent) {
M_LISTENERS.forEach {
val listener = it.value
listener.onAck(event)
}
}
}

View File

@@ -30,5 +30,11 @@ object CallerHmiListenerManager : CallerBase<IMoGoCheckAutoPilotBtnListener>() {
}
}
fun invokeHDDataCacheStatus(isCached: Boolean) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.updateHDDataCacheStatus(isCached)
}
}
}

View File

@@ -211,5 +211,4 @@ object CallerHmiManager {
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
hmiProviderApi?.updateStatusBarDownloadView(insert, tag, progress)
}
}

View File

@@ -5,6 +5,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.function.api.map.IMogoMapService
import com.mogo.eagle.core.function.api.map.marker.IMogoMarkerService
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.map.hdcache.IHdCacheListener
import com.mogo.map.location.IMogoGDLocationClient
import com.mogo.map.marker.IMogoMarkerManager
import com.mogo.map.overlay.IMogoOverlayManager
@@ -30,11 +31,19 @@ object CallerMapUIServiceManager {
return serviceProvider?.markerService
}
fun cacheHDDataByCity(listener: IHdCacheListener) {
serviceProvider?.mapUIController?.cacheHDDataByCity(listener)
}
fun isCityDataCached(): Boolean {
return serviceProvider?.mapUIController?.isCityDataCached ?: true
}
fun getOverlayManager(): IMogoOverlayManager?{
return serviceProvider?.overlayManager
}
fun getGDLocationServer(context: Context):IMogoGDLocationClient?{
fun getGDLocationServer(context: Context): IMogoGDLocationClient?{
return serviceProvider?.getGDLocationServer(context)
}
}

View File

@@ -1,78 +0,0 @@
package com.mogo.eagle.core.function.call.map
import android.os.Looper
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.api.v2x.IV2XEventProvider
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
/**
* @author xiaoyuzhou
* @date 2021/9/17 6:15 下午
* 小地图调用者管理这里对外及其他模块提供小地图功能的调用用啥写啥不要过度设计不允许直接将Provider暴露出去
*/
object CallerSmpManager : CallerBase<Any>() {
// private val mogoSmallMapProvider: IMogoSmallMapProvider
// get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_SMP)
// .navigation() as IMogoSmallMapProvider
private val v2xProvider: IV2XEventProvider
get() = ARouter.getInstance().build(MogoServicePaths.PATH_V2X_MODULE)
.navigation() as IV2XEventProvider
/**
* 绘制路径线
*/
@JvmStatic
fun drawablePolyline(coordinates: List<MogoLatLng?>?) {
// mogoSmallMapProvider.drawablePolyline(coordinates)
}
/**
* 清除路径线
*/
@JvmStatic
fun clearPolyline() {
// mogoSmallMapProvider.clearPolyline()
}
/**
* 显示面板
*/
@JvmStatic
fun showPanel() {
// mogoSmallMapProvider.showPanel()
}
/**
* 隐藏面板
*/
@JvmStatic
fun hidePanel() {
// mogoSmallMapProvider.hidePanel()
}
@JvmStatic
fun startQueryV2XEvents() {
if (Thread.currentThread() !== Looper.getMainLooper().thread) {
UiThreadHandler.post {
v2xProvider.queryWholeRoadEvents()
}
} else {
v2xProvider.queryWholeRoadEvents()
}
}
@JvmStatic
fun clearV2XMarkers() {
// if (Thread.currentThread() !== Looper.getMainLooper().thread) {
// UiThreadHandler.post {
// mogoOverViewMapProvider.clearV2XMarkers()
// }
// } else {
// mogoOverViewMapProvider.clearV2XMarkers()
// }
}
}

View File

@@ -1,10 +1,8 @@
package com.mogo.eagle.core.function.call.msgbox
import androidx.annotation.Nullable
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
import com.mogo.eagle.core.function.call.base.CallerBase
import java.util.concurrent.ConcurrentHashMap
/**
* @author XuXinChao

View File

@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.msgbox
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**

View File

@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.call.msgbox
import android.content.Context
import com.mogo.eagle.core.data.constants.MogoServicePaths
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.call.base.CallerBase
object CallerMsgBoxManager {

View File

@@ -40,4 +40,11 @@ object CallerObuApiManager {
return providerApi.isConnected()
}
/**
* 设置obu sdk的 日志
*/
fun setObuLog(isSet: Boolean) {
providerApi.setObuLog(isSet)
}
}

View File

@@ -1,7 +1,7 @@
package com.mogo.eagle.core.function.call.v2x
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.base.CallerBase
/**

View File

@@ -3,7 +3,7 @@ package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
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.base.CallerBase
object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>() {