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:
@@ -1,65 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.analytics
|
||||
|
||||
import android.content.Context
|
||||
import androidx.annotation.Keep
|
||||
import androidx.collection.ArrayMap
|
||||
import com.elegant.analytics.Analytics
|
||||
import com.elegant.analytics.AnalyticsConfig
|
||||
import com.elegant.analytics.IAnalyticsParamsProvider
|
||||
import com.elegant.analytics.UploadMode
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
|
||||
/**
|
||||
* 埋点&数据统计 管理
|
||||
* @author donghongyu
|
||||
*/
|
||||
object AnalyticsManager {
|
||||
|
||||
@Keep
|
||||
fun init(context: Context?, isDebug: Boolean) {
|
||||
// 1 - debug 近实时上报,积累一条埋点上报,或者积累3秒上报一次。
|
||||
// 2 - 本地缓存,聚合上报,积累30条埋点上报,或者积累60秒上报一次。
|
||||
AnalyticsConfig.getInstance(context).appKey = "0915430e5fdcbb553391f2a35cb8489f"
|
||||
AnalyticsConfig.getInstance(context).uploadMode = if (isDebug) UploadMode.instant else UploadMode.cache
|
||||
AnalyticsConfig.getInstance(context).setShouldLog(isDebug)
|
||||
// 设置参数提供者
|
||||
AnalyticsConfig.getInstance(context).paramsProvider = object : IAnalyticsParamsProvider {
|
||||
// 静态参数
|
||||
override fun staticParams(): Map<String, Any> {
|
||||
return getAnalyticsCustomParams(isDebug)
|
||||
}
|
||||
|
||||
//动态参数
|
||||
override fun dynamicParams(): Map<String, Any>? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
Analytics.getInstance().start(context)
|
||||
}
|
||||
|
||||
/**
|
||||
* 埋点
|
||||
*
|
||||
* @param event 事件名称
|
||||
* @param properties 事件参数
|
||||
*/
|
||||
fun track(event: String?, properties: HashMap<String, Any>) {
|
||||
Analytics.getInstance().track(event, properties)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 静态的统计参数
|
||||
*/
|
||||
fun getAnalyticsCustomParams(isDebug: Boolean): Map<String, Any> {
|
||||
val map: MutableMap<String, Any> = ArrayMap()
|
||||
map["debug"] = if (isDebug) 1 else 0
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["app_version"] = AppUtils.getAppVersionName()
|
||||
map["app_identity_mode"] = FunctionBuildConfig.appIdentityMode
|
||||
|
||||
return map
|
||||
}
|
||||
}
|
||||
@@ -415,4 +415,43 @@ object CallerAutoPilotControlManager {
|
||||
providerApi?.setIsDrawPointCloud(isDrawPointCloud)
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1FrontDoorCmd(switchCmd: Int): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1FrontDoorCmd(switchCmd) ?: false
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1AirConditionerCmd(
|
||||
switchCmd: Int,
|
||||
modeCmd: Int,
|
||||
windSpeedCmd: Int,
|
||||
temperatureCmd: Int
|
||||
): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1AirConditionerCmd(switchCmd, modeCmd, windSpeedCmd, temperatureCmd) ?: false
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1HeaderCmd(switchCmd: Int, windSpeedCmd: Int): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1HeaderCmd(switchCmd, windSpeedCmd) ?: false
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1MainLamp1Cmd(switchCmd: Int): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1MainLamp1Cmd(switchCmd) ?: false
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1MainLamp2Cmd(switchCmd: Int): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1MainLamp2Cmd(switchCmd) ?: false
|
||||
}
|
||||
|
||||
/**
|
||||
* 车门控制
|
||||
*/
|
||||
fun sendRoboBusJinlvM1SmallLampCmd(switchCmd: Int): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1SmallLampCmd(switchCmd) ?: false
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd: SpecialVehicleTaskCmdOuterClass.RoboBusJinlvM1Cmd): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1TaskCmd(roboBusJinlvM1Cmd) ?: false
|
||||
}
|
||||
|
||||
fun sendPlanningCmd(cmd: Int): Boolean {
|
||||
return providerApi?.sendPlanningCmd(cmd) ?: false
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
|
||||
object CallerAutopilotStatisticsListenerManager : CallerBase<IMoGoAutopilotStatisticsListener>() {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisBrakeStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆挂挡档位 回调监听
|
||||
* 车辆刹车 回调监听
|
||||
*/
|
||||
object CallerChassisBrakeStateListenerManager : CallerBase<IMoGoChassisBrakeStateListener>() {
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGearStateListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 车辆挂挡档位 回调监听
|
||||
* 车辆挂档档位 回调监听
|
||||
*/
|
||||
object CallerChassisGearStateListenerManager : CallerBase<IMoGoChassisGearStateListener>() {
|
||||
|
||||
/**
|
||||
* 车辆挂挡档位
|
||||
* 车辆挂档档位
|
||||
* @param gear 档位
|
||||
*/
|
||||
fun invokeAutopilotGearData(gear: Chassis.GearPosition) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
|
||||
/**
|
||||
@@ -16,7 +15,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
|
||||
|
||||
@@ -70,6 +70,16 @@ open class CallerBase<T : Any> {
|
||||
return
|
||||
}
|
||||
M_LISTENERS.remove(tag)
|
||||
|
||||
if (!M_LISTENERS_HZ.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_LISTENERS_HZ.remove(tag)
|
||||
|
||||
if (!M_LISTENERS_HZ_LAST_SEND_TIME.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_LISTENERS_HZ_LAST_SEND_TIME.remove(tag)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,6 +93,16 @@ open class CallerBase<T : Any> {
|
||||
M_LISTENERS.forEach {
|
||||
if (it.value == listener) {
|
||||
M_LISTENERS.remove(it.key)
|
||||
|
||||
if (!M_LISTENERS_HZ.containsKey(it.key)) {
|
||||
return
|
||||
}
|
||||
M_LISTENERS_HZ.remove(it.key)
|
||||
|
||||
if (!M_LISTENERS_HZ_LAST_SEND_TIME.containsKey(it.key)) {
|
||||
return
|
||||
}
|
||||
M_LISTENERS_HZ_LAST_SEND_TIME.remove(it.key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.mogo.eagle.core.function.api.devatools.apm.*
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
@@ -234,4 +235,6 @@ object CallerDevaToolsManager {
|
||||
fun queryAppUpgrade(){
|
||||
devaToolsProviderApi?.queryAppUpgrade()
|
||||
}
|
||||
|
||||
fun apmEnvProvider(): IApmEnvProvider? = devaToolsProviderApi?.apmEnvProvider()
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,5 +211,4 @@ object CallerHmiManager {
|
||||
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
hmiProviderApi?.updateStatusBarDownloadView(insert, tag, progress)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.mogo.eagle.core.function.call.map
|
||||
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.function.api.map.listener.IGaoDeMapLocationListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 高德地图定位监听
|
||||
*/
|
||||
object CallerGaoDeMapLocationListenerManager : CallerBase<IGaoDeMapLocationListener>() {
|
||||
|
||||
/**
|
||||
* 高德位置改变监听
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeMoGoLocationChanged(location: MogoLocation) {
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onMoGoLocationChanged(location)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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,23 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.markerService
|
||||
}
|
||||
|
||||
fun cacheHDDataByCity(listener: IHdCacheListener) {
|
||||
serviceProvider?.mapUIController?.cacheHDDataByCity(listener)
|
||||
}
|
||||
|
||||
fun isCityDataCached(): Boolean {
|
||||
return serviceProvider?.mapUIController?.isCityDataCached ?: false
|
||||
}
|
||||
|
||||
fun getOverlayManager(): IMogoOverlayManager?{
|
||||
return serviceProvider?.overlayManager
|
||||
}
|
||||
|
||||
fun getGDLocationServer(context: Context):IMogoGDLocationClient?{
|
||||
fun getGDLocationServer(context: Context): IMogoGDLocationClient?{
|
||||
return serviceProvider?.getGDLocationServer(context)
|
||||
}
|
||||
|
||||
fun cancelDownloadCacheData() {
|
||||
serviceProvider?.mapUIController?.cancelDownloadCacheData()
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.mogo.eagle.core.function.call.mofang
|
||||
|
||||
import com.mogo.eagle.core.function.api.mofang.IMoGoMoFangListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 魔方按键的处理
|
||||
*/
|
||||
object CallerMofangListenerManager : CallerBase<IMoGoMoFangListener>() {
|
||||
fun invokeMofangHandle(keyCode: Int, action: Int): Boolean {
|
||||
var isConsume = false
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
if (listener.onMofangHandle(keyCode, action))
|
||||
isConsume = true
|
||||
}
|
||||
return isConsume
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -40,4 +40,11 @@ object CallerObuApiManager {
|
||||
return providerApi.isConnected()
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置obu sdk的 日志
|
||||
*/
|
||||
fun setObuLog(isSet: Boolean) {
|
||||
providerApi.setObuLog(isSet)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.support.obu.model.MogoObuHvBasicsData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuSaveMessageListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuWarningRsiListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.support.obu.ObuScene
|
||||
|
||||
/**
|
||||
* OBU 保存到数据中心,展示在消息盒子的数据
|
||||
*
|
||||
*/
|
||||
object CallerObuSaveMessageListenerManager : CallerBase<IMoGoObuSaveMessageListener>() {
|
||||
|
||||
fun invokeObuSaveMessage(type: String, content: String, tts: String, sourceType: DataSourceType) {
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onMoGoObuSaveMessage(type, content, tts, sourceType)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.eagle.core.function.call.obucombine
|
||||
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.api.obucombine.IMoGoObuDcCombineListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.v2x.ObuWarningEvent
|
||||
@@ -15,44 +13,6 @@ object CallerObuDcCombineListenerManager : CallerBase<IMoGoObuDcCombineListener>
|
||||
private val M_DC_COMBINE_LISTENERS: ConcurrentHashMap<String, IMoGoObuDcCombineListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
/**
|
||||
* 添加 obu和dc数据通道 监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
// fun addListener(
|
||||
// @Nullable tag: String,
|
||||
// @Nullable listener: IMoGoObuDcCombineListener
|
||||
// ) {
|
||||
// if (M_DC_COMBINE_LISTENERS.containsKey(tag)) {
|
||||
// return
|
||||
// }
|
||||
// M_DC_COMBINE_LISTENERS[tag] = listener
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
*/
|
||||
// fun removeListener(@Nullable tag: String) {
|
||||
// if (!M_DC_COMBINE_LISTENERS.containsKey(tag)) {
|
||||
// return
|
||||
// }
|
||||
// M_DC_COMBINE_LISTENERS.remove(tag)
|
||||
// }
|
||||
|
||||
/**
|
||||
* 删除自动驾驶按钮选中监听
|
||||
* @param listener 要删除的监听对象
|
||||
*/
|
||||
// fun removeListener(@Nullable listener: IMoGoObuDcCombineListener) {
|
||||
// M_DC_COMBINE_LISTENERS.forEach {
|
||||
// if (it.value == listener) {
|
||||
// M_DC_COMBINE_LISTENERS.remove(it.key)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* v2i数据
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
@@ -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>() {
|
||||
|
||||
Reference in New Issue
Block a user