新建IMoGoFunctionProvider.java提供给功能模块进行初始化加载的一些定义
Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.mogo.eagle.core.function.api.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/16 4:40 下午
|
||||
* 功能提供者基础
|
||||
*/
|
||||
public interface IMoGoFunctionProvider extends IProvider {
|
||||
/**
|
||||
* 创建图层,如果功能需要在HMI单独创建新的图层才需要实现
|
||||
*
|
||||
* @param context 上下文
|
||||
* @return 图层Fragment
|
||||
*/
|
||||
Fragment createCoverage(Context context, Bundle data);
|
||||
|
||||
/**
|
||||
* 功能模块唯一标识
|
||||
*
|
||||
* @return 功能模块名称
|
||||
*/
|
||||
@NonNull
|
||||
String getFunctionName();
|
||||
|
||||
default void onDestroy() {
|
||||
Log.d("IMoGoFunctionProvider", "onDestroy");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.mogo.eagle.core.function.api.hmi.warning
|
||||
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/2 7:36 下午
|
||||
*/
|
||||
interface IMoGoWaringProvider : IMoGoFunctionProvider {
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
*
|
||||
* @param v2xType V2X类型
|
||||
* @param alertContent 提醒文本
|
||||
* @param ttsContent tts语音播报消息
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(
|
||||
v2xType: Int,
|
||||
alertContent: String?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
listener: WarningStatusListener?
|
||||
)
|
||||
|
||||
/**
|
||||
* 关闭指定floatTag 的 VR下V2X预警弹窗
|
||||
* @param tag 弹窗标识
|
||||
*/
|
||||
fun disableWarningV2X(tag: String?)
|
||||
|
||||
/**
|
||||
* 展示红绿灯预警
|
||||
*
|
||||
* @param checkLightId 0-都是默认,1-红,2-黄,3-绿
|
||||
*/
|
||||
fun showWarningTrafficLight(checkLightId: Int)
|
||||
|
||||
/**
|
||||
* 关闭红绿灯预警
|
||||
*/
|
||||
fun disableWarningTrafficLight()
|
||||
|
||||
/**
|
||||
* 修改红灯倒计时
|
||||
*/
|
||||
fun changeCountdownRed(redNum: Int)
|
||||
|
||||
/**
|
||||
* 修改黄灯倒计时
|
||||
*/
|
||||
fun changeCountdownYellow(yellowNum: Int)
|
||||
|
||||
/**
|
||||
* 修改绿灯倒计时
|
||||
*/
|
||||
fun changeCountdownGreen(greenNum: Int)
|
||||
|
||||
/**
|
||||
* @param readNum 红灯倒计时
|
||||
* @param yellowNum 黄灯倒计时
|
||||
* @param greenNum 绿灯倒计时
|
||||
*/
|
||||
fun changeCountdownTrafficLightNum(readNum: Int, yellowNum: Int, greenNum: Int)
|
||||
|
||||
/**
|
||||
* 展示限速预警
|
||||
*
|
||||
* @param limitingSpeed 限速速度
|
||||
*/
|
||||
fun showLimitingVelocity(limitingSpeed: Int)
|
||||
|
||||
/**
|
||||
* 关闭限速预警
|
||||
*/
|
||||
fun disableLimitingVelocity()
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
* @param direction
|
||||
* @see WarningDirectionEnum
|
||||
*/
|
||||
fun showWarning(direction: WarningDirectionEnum)
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
* @param direction
|
||||
* @see WarningDirectionEnum
|
||||
* @param closeTime 倒计时
|
||||
*/
|
||||
fun showWarning(direction: WarningDirectionEnum, closeTime: Long)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.eagle.core.function.api.hmi.warning
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/13 4:41 下午
|
||||
*/
|
||||
interface WarningStatusListener {
|
||||
fun onShow() {}
|
||||
fun onDismiss() {}
|
||||
}
|
||||
Reference in New Issue
Block a user