[2.15.0][Feat]新增监听司机屏的回调
This commit is contained in:
@@ -108,6 +108,8 @@ class TeleMsgHandler : IMsgHandler {
|
||||
val sn = String(it.body)
|
||||
isReceiveSN = true
|
||||
NettyTcpClient.sSERVER_SN = sn
|
||||
invokeNettyConnResult("乘客屏收到司机屏发过来的SN为:$sn")
|
||||
CallerTelematicListenerManager.dispatchServerSn(sn)
|
||||
}
|
||||
// 美化模式是否忽略条件直接绘制
|
||||
11 -> {
|
||||
|
||||
@@ -2,4 +2,6 @@ package com.mogo.eagle.core.function.api.telematic
|
||||
|
||||
interface IReceivedMsgListener {
|
||||
fun onReceivedMsg(type: Int, byteArray: ByteArray)
|
||||
|
||||
fun onReceivedServerSn(sn: String?) {}
|
||||
}
|
||||
@@ -11,4 +11,11 @@ object CallerTelematicListenerManager: CallerBase<IReceivedMsgListener>() {
|
||||
listener.onReceivedMsg(type, byteArray)
|
||||
}
|
||||
}
|
||||
|
||||
fun dispatchServerSn(sn: String?) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onReceivedServerSn(sn)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user