[6.2.6][小智形象] 添加v2n小智形象状态回调

This commit is contained in:
renwj
2023-12-18 15:48:27 +08:00
parent dec66f0eee
commit 70ae305978
8 changed files with 130 additions and 0 deletions

View File

@@ -8,6 +8,9 @@ import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.map.Infrastructure
import com.mogo.eagle.core.data.biz.notice.NoticeNormalData
import com.mogo.eagle.core.data.biz.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.Event
import com.mogo.eagle.core.function.api.hmi.xiaozhi.listener.OnXiaoZhiStateChangeListener
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State
/**
* @author xiaoyuzhou
@@ -200,4 +203,18 @@ interface IMoGoHmiProvider :IProvider{
*/
fun setTaxiUnmanedDriverLineRoutingVerifyMode(isMode: Boolean)
/**
* 添加小智形象展示的状态监听
*/
fun registerXiaoZhiStatusChangeListener(listener: OnXiaoZhiStateChangeListener)
/**
* 移除小智形象展示的状态监听
*/
fun unRegisterXiaoZhiStatusChangedListener(listener: OnXiaoZhiStateChangeListener)
/**
* 通知小智形象要变化了
*/
fun notifyXiaoZhiStatusChanged(event: Event, state: State)
}

View File

@@ -0,0 +1,15 @@
package com.mogo.eagle.core.function.api.hmi.xiaozhi
import com.alibaba.android.arouter.facade.template.IProvider
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.Event
import com.mogo.eagle.core.function.api.hmi.xiaozhi.listener.OnXiaoZhiStateChangeListener
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State
interface IXiaoZhiStateManager : IProvider {
fun addListener(listener: OnXiaoZhiStateChangeListener)
fun removeListener(listener: OnXiaoZhiStateChangeListener)
fun notify(event: Event, state: State)
}

View File

@@ -0,0 +1,6 @@
package com.mogo.eagle.core.function.api.hmi.xiaozhi.event
enum class Event {
V2N
}

View File

@@ -0,0 +1,9 @@
package com.mogo.eagle.core.function.api.hmi.xiaozhi.listener
import com.mogo.eagle.core.function.api.hmi.xiaozhi.event.Event
import com.mogo.eagle.core.function.api.hmi.xiaozhi.state.State
interface OnXiaoZhiStateChangeListener {
fun onChanged(event: Event, state: State)
}

View File

@@ -0,0 +1,8 @@
package com.mogo.eagle.core.function.api.hmi.xiaozhi.state
enum class State {
START,
DOING,
STOP
}