[650]feat: 路侧事件弹框,增加caller 调用方式;

This commit is contained in:
aibingbing
2024-06-18 18:41:23 +08:00
parent 150e30f635
commit b7fa4ff81f
7 changed files with 131 additions and 14 deletions

View File

@@ -0,0 +1,37 @@
package com.mogo.eagle.core.function.call.hmi
import com.mogo.eagle.core.data.road.RoadV2NEventWindowBean
import com.mogo.eagle.core.function.api.hmi.v2n.IRoadV2NEventWindowListener
import com.mogo.eagle.core.function.call.base.CallerBase
import java.util.UUID
/**
* 路侧V2N事件弹框 调用者管理类
*/
object CallerRoadV2NEventWindowListenerManager : CallerBase<IRoadV2NEventWindowListener>() {
fun show(
timestamp: Long,
iconResId: Int,
hintStr: String,
isNeedTTS: Boolean,
cameraIp: String
): String {
val uuid = UUID.randomUUID().toString()
val data = RoadV2NEventWindowBean(uuid, timestamp, iconResId, hintStr, isNeedTTS, cameraIp)
M_LISTENERS.forEach {
val listener = it.value
listener.show(data)
}
return uuid
}
fun dismiss(uuid: String) {
M_LISTENERS.forEach {
val listener = it.value
listener.dismiss(
uuid
)
}
}
}