Merge remote-tracking branch 'origin/dev_arch_opt_3.0' into dev_arch_opt_3.0

# Conflicts:
#	OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/MogoOCHBusPassenger.java
#	OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/BusProvider.java
#	OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/SweeperProvider.java
#	OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/TaxiProvider.java
This commit is contained in:
donghongyu
2023-02-07 15:47:18 +08:00
126 changed files with 2159 additions and 2545 deletions

View File

@@ -104,14 +104,14 @@ object CallerAutoPilotControlManager {
/**
* 开启域控制器录制bag包
*/
@BizConfig(FuncBizConfig.FOUNDATION,"", FuncBizConfig.BIZ_BAG_RECORD)
@BizConfig(FuncBizConfig.FOUNDATION, "", FuncBizConfig.BIZ_BAG_RECORD)
fun recordPackage() {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.recordPackage(1, Random(SystemClock.elapsedRealtime()).nextInt())
}
}
@BizConfig(FuncBizConfig.FOUNDATION,"", FuncBizConfig.BIZ_BAG_RECORD)
@BizConfig(FuncBizConfig.FOUNDATION, "", FuncBizConfig.BIZ_BAG_RECORD)
fun recordPackage(duration: Int) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.recordPackage(1, Random(SystemClock.elapsedRealtime()).nextInt(), duration)
@@ -136,8 +136,8 @@ object CallerAutoPilotControlManager {
}
}
fun recordPackage(type: Int,id: Int,duration: Int,bduration: Int,topics: List<String>){
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
fun recordPackage(type: Int, id: Int, duration: Int, bduration: Int, topics: List<String>) {
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
providerApi?.recordPackage(type, id, duration, bduration, topics)
}
}
@@ -240,7 +240,7 @@ object CallerAutoPilotControlManager {
* isEnable = false 关闭
* @return boolean
*/
fun sendDetouring(isEnable: Boolean): Boolean?{
fun sendDetouring(isEnable: Boolean): Boolean? {
return providerApi?.sendDetouring(isEnable)
}
@@ -249,7 +249,7 @@ object CallerAutoPilotControlManager {
* @param speed 速度阈值 m/s
* @return boolean
*/
fun sendDetouringSpeed(speed: Double): Boolean?{
fun sendDetouringSpeed(speed: Double): Boolean? {
return providerApi?.sendDetouringSpeed(speed)
}
@@ -259,11 +259,11 @@ object CallerAutoPilotControlManager {
* @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合
* @param topicsNeedToCache
*/
fun getBadCaseConfig(reqType: Int,recordType: Int,topicsNeedToCache: List<String>): Boolean?{
fun getBadCaseConfig(reqType: Int, recordType: Int, topicsNeedToCache: List<String>): Boolean? {
// 司机屏才能查询数据采集的配置
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
return providerApi?.getBadCaseConfig(reqType, recordType, topicsNeedToCache)
}else{
} else {
return false
}
}
@@ -310,7 +310,13 @@ object CallerAutoPilotControlManager {
* @return boolean
*/
@JvmStatic
fun sendTripInfo(type: Int, lineName: String, departureStopName: String, arrivalStopName: String, isLastStop: Boolean) {
fun sendTripInfo(
type: Int,
lineName: String,
departureStopName: String,
arrivalStopName: String,
isLastStop: Boolean
) {
providerApi?.sendTripInfo(type, lineName, departureStopName, arrivalStopName, isLastStop)
}
@@ -401,4 +407,12 @@ object CallerAutoPilotControlManager {
fun sendSweeperFuTianTaskCmd(fuTianTaskCmd: SpecialVehicleTaskCmdOuterClass.RoboSweeperFuTianTaskCmd) {
providerApi?.sendSweeperFuTianTaskCmd(fuTianTaskCmd)
}
/**
* 打开点云绘制
*/
fun setIsDrawPointCloud(isDrawPointCloud: Boolean) {
providerApi?.setIsDrawPointCloud(isDrawPointCloud)
}
}

View File

@@ -14,7 +14,9 @@ object CallerPlanningRottingListenerManager : CallerBase<IMoGoPlanningRottingLis
private var globalPathResp: MessagePad.GlobalPathResp? = null
override fun doSomeAfterAddListener(tag: String, listener: IMoGoPlanningRottingListener) {
listener.onAutopilotRotting(globalPathResp)
globalPathResp?.let {
listener.onAutopilotRotting(globalPathResp)
}
}
/**

View File

@@ -1,9 +1,10 @@
package com.mogo.eagle.core.function.call.hmi
import android.content.Context
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.bindingcar.IPCUpgradeStateInfo
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.data.map.Infrastructure
@@ -18,38 +19,15 @@ import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
* @date 2021/9/17 3:59 下午
*
* HMI 调用者管理这里对外及其他模块提供功能的调用用啥写啥不要过度设计不允许直接将Provider暴露出去
*
*/
object CallerHmiManager {
private val waringProviderApi
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_HMI)
private val hmiProviderApi
get() = ARouter.getInstance().build(MogoServicePaths.PATH_FRAGMENT_HMI)
.navigation() as? IMoGoHmiProvider
/**
* 浓雾预警
*/
fun displayEffects() {
waringProviderApi?.displayEffects()
}
/**
* 控制显示sn绑定弹框
*/
fun setSnBinding(isOpen: Boolean) {
waringProviderApi?.setSnBinding(isOpen)
}
/**
* 是否展示obu的弱势交通
*/
fun setObuWeaknessTraffic(isOpen: Boolean) {
waringProviderApi?.setObuWeaknessTraffic(isOpen)
}
/**
* 是否展示云端的弱势交通
*/
fun setCloudWeaknessTraffic(isOpen: Boolean) {
waringProviderApi?.setCloudWeaknessTraffic(isOpen)
fun init(context:Context){
hmiProviderApi?.init(context)
}
/**
@@ -60,15 +38,15 @@ object CallerHmiManager {
alertContent: CharSequence?,
ttsContent: String?,
listenerIMoGo: IMoGoWarningStatusListener? = null,
playTts: Boolean = true,
direction: WarningDirectionEnum = WarningDirectionEnum.ALERT_WARNING_NON,
expireTime: Long = 5000L,
) {
waringProviderApi?.warningV2X(
hmiProviderApi?.warningV2X(
v2xType,
alertContent,
ttsContent,
listenerIMoGo,
playTts,
direction,
expireTime
)
}
@@ -78,25 +56,15 @@ object CallerHmiManager {
* @param direction
* @see WarningDirectionEnum
*/
fun showWarning(direction: WarningDirectionEnum) {
waringProviderApi?.showWarning(direction)
}
/**
* 展示指定方位上的红框预警
* @param direction
* @see WarningDirectionEnum
* @param closeTime 倒计时
*/
fun showWarning(direction: WarningDirectionEnum, closeTime: Long) {
waringProviderApi?.showWarning(direction, closeTime)
fun showWarning(v2xType: String, direction: WarningDirectionEnum, expireTime: Long) {
hmiProviderApi?.showWarning(v2xType, direction, expireTime)
}
/**
* 主动消失边框预警
*/
fun dismissWarning(direction: WarningDirectionEnum) {
waringProviderApi?.dismissWarning(direction)
hmiProviderApi?.dismissWarning(direction)
}
/**
@@ -104,31 +72,61 @@ object CallerHmiManager {
* @param trafficStylePushData
*/
fun showTrafficBanner(trafficStylePushData: NoticeTrafficStylePushData?) {
waringProviderApi?.showNoticeForTrafficWithData(trafficStylePushData)
hmiProviderApi?.showNoticeForTrafficWithData(trafficStylePushData)
}
/**
* 普通公告弹窗
*/
fun showNoticeNormalData(noticeNormal: NoticeNormalData) {
waringProviderApi?.showNoticeNormalData(noticeNormal)
hmiProviderApi?.showNoticeNormalData(noticeNormal)
}
/**
* 开启道路视频直播
*/
fun startRoadCameraLive(flvUrl: String) {
waringProviderApi?.startRoadCameraLive(flvUrl)
hmiProviderApi?.startRoadCameraLive(flvUrl)
}
/**
* 超视距感知关闭
*/
fun showNoSignalView() {
hmiProviderApi?.showNoSignView()
}
/**
* 展示工具栏
*/
fun showToolsView() {
hmiProviderApi?.showToolsView()
}
/**
* 关闭工具栏
*/
fun hideToolsView() {
hmiProviderApi?.hideToolsView()
}
/**
* 展示绑定车辆弹框
*/
fun showBindingCarDialog() {
waringProviderApi?.showToBindingcarDialog()
hmiProviderApi?.showToBindingCarDialog()
}
/**
* 展示修改绑定车辆弹框
*/
fun showModifyBindingCarDialog() {
waringProviderApi?.showModifyBindingcarDialog()
hmiProviderApi?.showModifyBindingCarDialog()
}
/**
* 展示升级app弹框
*/
fun showUpgradeDialog(
name: String,
url: String,
@@ -136,41 +134,35 @@ object CallerHmiManager {
content: String,
installType: String
) {
waringProviderApi?.showUpgradeDialog(name, url, title, content, installType)
hmiProviderApi?.showUpgradeDialog(name, url, title, content, installType)
}
/**
* 呈现工控机升级确认框
*/
fun showAdUpgradeDialog(images: List<String>, padSn: String, releaseId: String) {
waringProviderApi?.showAdUpgradeDialog(images, padSn, releaseId)
hmiProviderApi?.showAdUpgradeDialog(images, padSn, releaseId)
}
/**
* 更新工控机下载、升级状态
*/
fun showAdUpgradeStatus(ipcUpgradeStateInfo: IPCUpgradeStateInfo) {
waringProviderApi?.showAdUpgradeStatus(ipcUpgradeStateInfo)
hmiProviderApi?.showAdUpgradeStatus(ipcUpgradeStateInfo)
}
fun showNoSignalView() {
waringProviderApi?.showNoSignView()
/**
* 调度弹窗展示
*/
fun showDispatchDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) {
hmiProviderApi?.showDispatchDialog(msgData)
}
fun showToolsView() {
waringProviderApi?.showToolsView()
}
fun hideToolsView() {
waringProviderApi?.hideToolsView()
}
fun showSmallFragment() {
waringProviderApi?.showSmallFragment()
}
fun hideSmallFragment() {
waringProviderApi?.hideSmallFragment()
/**
* 隐藏调度弹窗
*/
fun dismissDispatchDialog() {
hmiProviderApi?.dismissDispatchDialog()
}
/**
@@ -184,11 +176,11 @@ object CallerHmiManager {
warningReportList: ArrayList<ReportEntity>,
reportLevel: Int
) {
waringProviderApi?.showIPCReportWindow(errorReportList, warningReportList, reportLevel)
hmiProviderApi?.showIPCReportWindow(errorReportList, warningReportList, reportLevel)
}
fun showVideoDialog(infList: List<Infrastructure>) {
waringProviderApi?.showVideoDialog(infList)
hmiProviderApi?.showVideoDialog(infList)
}
/**
@@ -196,49 +188,35 @@ object CallerHmiManager {
* 默认 light
*/
fun setStatusBarDarkOrLight(light: Boolean = true) {
waringProviderApi?.setStatusBarDarkOrLight(light)
hmiProviderApi?.setStatusBarDarkOrLight(light)
}
/**
* 更新(添加/删除)状态栏右侧元素
*/
fun updateStatusBarRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
waringProviderApi?.updateStatusBarRightView(insert, tag, viewGroup)
hmiProviderApi?.updateStatusBarRightView(insert, tag, viewGroup)
}
/**
* 更新(添加/删除)状态栏左侧元素
*/
fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
waringProviderApi?.updateStatusBarLeftView(insert, tag, viewGroup)
hmiProviderApi?.updateStatusBarLeftView(insert, tag, viewGroup)
}
/**
* 更新(添加/删除)状态栏右侧元素
*/
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
waringProviderApi?.updateStatusBarDownloadView(insert, tag, progress)
hmiProviderApi?.updateStatusBarDownloadView(insert, tag, progress)
}
/**
* 更新魔方的链接状态
*/
fun updateMfStatusView(tag: String, status: Boolean) {
waringProviderApi?.updateMfStatus(tag, status)
}
/**
* 调度弹窗展示
*/
fun showDispatchDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) {
waringProviderApi?.showDispatchDialog(msgData)
}
/**
* 隐藏调度弹窗
*/
fun dismissDispatchDialog(){
waringProviderApi?.dismissDispatchDialog()
hmiProviderApi?.updateMfStatus(tag, status)
}
}

View File

@@ -1,112 +0,0 @@
package com.mogo.eagle.core.function.call.map
import androidx.annotation.RawRes
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
import com.mogo.eagle.core.data.map.CenterLine
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider
import com.zhidao.support.adas.high.AdasManager
import com.zhidao.support.adas.high.common.Constants
import com.zhidao.support.adas.high.common.MessageType
/**
* @author xiaoyuzhou
* @date 2021/9/17 6:15 下午
* 高精度地图控制
*/
object CallerHDMapManager {
private val mapProviderApi: IMoGoMapFragmentProvider
get() = ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_MAP)
.navigation() as IMoGoMapFragmentProvider
/**
* 修改地图中心点
* MapAutoApi.CAR_CENTER_100 1/4
* MapAutoApi.CAR_CENTER_100 2/5
* MapAutoApi.CAR_CENTER_100 80米
* MapAutoApi.CAR_CENTER_100 2/5
*/
fun changeMaoViewAngle(type: Int) {
mapProviderApi.changeMaoViewAngle(type)
}
/**
* 修改高精地图自车图标
* 传入资源ID
*/
fun changeCurrentIcon(@RawRes iconId: Int) {
mapProviderApi.changeCurrentIcon(iconId)
}
/**
* 设置地图视线角度
*/
fun setMapDAngle(mode: Int) {
mapProviderApi.setMapDAngle(mode)
}
/**
* 获取车道中心线信息
*/
fun getCenterLineInfo(lon: Double, lat: Double, angle: Float): CenterLine? {
return mapProviderApi.getCenterLineInfo(lon, lat, angle)
}
/**
* 切换到自研vr
* @param isDayMode true-白天模式false-夜间模式
*/
fun stepInVrMode(isDayMode: Boolean) {
return mapProviderApi.stepInVrMode(isDayMode)
}
/**
*
* 打开点云绘制
*
* @param isDrawPointCloud 是否绘制点云
*/
fun setIsDrawPointCloud(isDrawPointCloud: Boolean) {
if (isDrawPointCloud) {
AdasManager.getInstance().subscribeInterface(
Constants.TERMINAL_ROLE.DRIVER,
Constants.SUBSCRIBE_TYPE.SUBSCRIBE,
MessageType.TYPE_RECEIVE_POINT_CLOUD)
} else {
AdasManager.getInstance().subscribeInterface(
Constants.TERMINAL_ROLE.DRIVER,
Constants.SUBSCRIBE_TYPE.UNSUBSCRIBE,
MessageType.TYPE_RECEIVE_POINT_CLOUD)
}
FunctionBuildConfig.isDrawPointCloudData = isDrawPointCloud
return mapProviderApi.setIsDrawPointCloud(isDrawPointCloud)
}
/**
* 设制点云大小
* @param pointCloudSize 点云的点大小
*/
fun setPointCloudSize(pointCloudSize: Float) {
return mapProviderApi.setPointCloudSize(pointCloudSize)
}
/**
* 设置点云颜色
*
* @param color // color:"#RRGGBB*
*/
fun setPointCloudColor(color: String) {
return mapProviderApi.setPointCloudColor(color)
}
/**
* 设置地图是否是Debug模式
* @param debugMode 是否开启Debug模式
*/
fun setDebugMode(debugMode: Boolean) {
return mapProviderApi.setDebugMode(debugMode)
}
}

View File

@@ -1,6 +1,6 @@
package com.mogo.eagle.core.function.call.vip
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.function.api.vip.IMoGoVipSetListener
import com.mogo.eagle.core.function.api.v2x.IMoGoVipSetListener
import com.mogo.eagle.core.function.call.base.CallerBase
object CallVipSetListenerManager : CallerBase<IMoGoVipSetListener>() {
@@ -12,7 +12,7 @@ object CallVipSetListenerManager : CallerBase<IMoGoVipSetListener>() {
}
fun invokeVipSetStatus(vipStatus: Boolean) {
this.vipSet = vipStatus
vipSet = vipStatus
M_LISTENERS.forEach {
val tag = it.key
val listener = it.value

View File

@@ -16,9 +16,16 @@ object CallerLimitingVelocityListenerManager : CallerBase<ILimitingVelocityListe
listener.onLimitingVelocityChange(mCurrentLimitingVelocity, sourceType)
}
fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
fun invokeUnion(limitingVelocity: Int, sourceType: DataSourceType){
this.mCurrentLimitingVelocity = limitingVelocity
this.sourceType = sourceType
M_LISTENERS.forEach {
val listener = it.value
listener.onUnion(limitingVelocity, sourceType)
}
}
fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
M_LISTENERS.forEach {
val listener = it.value
listener.onLimitingVelocityChange(limitingVelocity, sourceType)

View File

@@ -1,9 +1,9 @@
package com.mogo.eagle.core.function.call.trafficlight
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.TrafficLightEnum
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.base.CallerBase
object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>() {
@@ -17,7 +17,7 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>
}
fun invokeTrafficLightStatus(trafficLightResult: TrafficLightResult) {
this.trafficLightResult = trafficLightResult
CallerTrafficLightListenerManager.trafficLightResult = trafficLightResult
M_LISTENERS.forEach {
val listener = it.value
listener.onTrafficLightStatus(trafficLightResult)
@@ -38,10 +38,10 @@ object CallerTrafficLightListenerManager : CallerBase<IMoGoTrafficLightListener>
}
}
fun invokeObuTrafficLightStatus(light: TrafficLightEnum) {
fun invokeTrafficLightPlusSource(light: TrafficLightEnum, remain:Int = -1, lightSource: DataSourceType) {
M_LISTENERS.forEach {
val listener = it.value
listener.onObuTrafficLightStatus(light)
listener.onTrafficLightPlusSource(light ,remain, lightSource)
}
}

View File

@@ -0,0 +1,22 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.function.api.v2x.IV2XEventListener
import com.mogo.eagle.core.function.call.base.CallerBase
object CallerV2XWarningListenerManager : CallerBase<IV2XEventListener>() {
fun show(v2xType: String, direction: WarningDirectionEnum, time: Long) {
M_LISTENERS.forEach {
val listener = it.value
listener.show(v2xType, direction, time)
}
}
fun dismiss(direction: WarningDirectionEnum = WarningDirectionEnum.ALERT_WARNING_ALL) {
M_LISTENERS.forEach {
val listener = it.value
listener.dismiss(direction)
}
}
}

View File

@@ -1,28 +0,0 @@
package com.mogo.eagle.core.function.call.v2x
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
import com.mogo.eagle.core.function.call.base.CallerBase
/**
* 限速信息监听
*/
object CallerViewLimitingVelocityListenerManager : CallerBase<ILimitingVelocityListener>() {
private var mCurrentLimitingVelocity = 0
private var sourceType = DataSourceType.DEFAULT
override fun doSomeAfterAddListener(tag: String, listener: ILimitingVelocityListener) {
listener.onLimitingVelocityChange(mCurrentLimitingVelocity, sourceType)
}
fun invokeOnLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
this.mCurrentLimitingVelocity = limitingVelocity
this.sourceType = sourceType
M_LISTENERS.forEach {
val listener = it.value
listener.onLimitingVelocityChange(limitingVelocity, sourceType)
}
}
}