[dev_arch_opt_3.0] 封装obu显示数据

This commit is contained in:
lixiaopeng
2023-02-20 18:20:20 +08:00
parent ca1832210a
commit 6d2deb6582
7 changed files with 101 additions and 53 deletions

View File

@@ -0,0 +1,22 @@
package com.mogo.eagle.core.function.call.obu
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) {
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value
listener.onMoGoObuSaveMessage(type, content, tts)
}
}
}

View File

@@ -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数据
*/