[CallerAutoPilotStatusListenerManager -> OchAutoPilotStatusListenerManager]
This commit is contained in:
yangyakun
2024-04-19 16:34:41 +08:00
parent 9606e5689d
commit fb2abb828b
27 changed files with 244 additions and 309 deletions

View File

@@ -28,4 +28,10 @@ public class ArrivedStation {
return new ArrivedStation(mogoLocation);
}
@Override
public String toString() {
return "ArrivedStation{" +
"mogoLocation=" + mogoLocation +
'}';
}
}

View File

@@ -0,0 +1,95 @@
package com.mogo.och.common.module.manager.autopilot.autopilot;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.och.common.module.manager.autopilot.autopilot.ArrivedStation;
import com.zhjt.mogo.adas.data.AdasConstants;
import mogo.telematics.pad.MessagePad;
import mogo_msg.MogoReportMsg;
import system_master.SsmInfo;
import system_master.SystemStatusInfo;
public interface IOchAutopilotStatusListener {
/**
* 自驾路线触发下载请求回调
*/
default void onAutopilotTrajectoryDownloadReq(AutopilotControlParameters.AutoPilotLine autoPilotLine, int downloadType) {
}
/**
* 自动驾驶状态信息
*
* @param state 状态信息
*/
default void onAutopilotStatusResponse(int state) {
}
/**
* 自动驾驶docker信息
*
* @param dockerVersion docker版本
*/
default void onAutopilotDockerInfo(String dockerVersion) {
}
/**
* 自动驾驶到站
*
* @param arrivalNotification 所到车站的简单信息
*/
default void onAutopilotArriveAtStation(ArrivedStation arrivalNotification) {
}
/**
* 工控机获取SN
*/
default void onAutopilotSNRequest(MessagePad.BasicInfoReq basicInfoReq) {
}
/**
* 监控事件报告
*/
default void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo) {
}
/**
* 监控事件报告
*/
default void onAutopilotGuardian(MogoReportMsg.MogoReportMessage guardianInfo, long lineId) {
}
/**
* 工控机连接状态回调
*/
default void onAutopilotIpcConnectStatusChanged(AdasConstants.IpcConnectionStatus status, String reason) {
}
/**
* 域控SSM接口接收超时
* 状态变动时才会回调默认SSM状态正常
*
* @param isTimeout trueSSM接口接收超时 falseSSM接口恢复正常
*/
default void onSsmReceiveTimeout(boolean isTimeout) {
}
/**
* 工控机主动查询 AdasManager#sendStatusQueryReq(),后会收到如下回调
*/
default void onAutopilotStatusRespByQuery(SystemStatusInfo.StatusInfo status) {
}
/**
* 定频SSM
* 老版本 SSMSystemStatusInfo.StatusInfo HQ、M1 MAP350开始弃用其他车型MAP360开始弃用
*/
default void onSystemStatus(SsmInfo.SsmStatusInf statusInf) {
}
/**
* 自动驾驶路线ID回调
*/
default void onAutopilotRouteLineId(long lineId) {
}
}

View File

@@ -1,95 +0,0 @@
package com.mogo.och.common.module.manager.autopilot.autopilot
import com.zhjt.mogo.adas.data.AdasConstants
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import system_master.SsmInfo
import system_master.SystemStatusInfo
interface IOchAutopilotStatusListener {
/**
* 自动驾驶状态信息
*
* @param state 状态信息
*/
fun onAutopilotStatusResponse(state: Int) {}
/**
* 自动驾驶docker信息
*
* @param dockerVersion docker版本
*/
fun onAutopilotDockerInfo(dockerVersion:String){}
/**
* 自动驾驶到站
*
* @param arrivalNotification 所到车站的简单信息
*/
fun onAutopilotArriveAtStation(arrivalNotification: ArrivedStation?) {}
/**
* 工控机获取SN
*/
fun onAutopilotSNRequest(basicInfoReq: MessagePad.BasicInfoReq) {}
/**
* 监控事件报告
*/
fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {}
/**
* 监控事件报告
*/
fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?,lineId: Long) {}
/**
* 工控机连接状态回调
*/
fun onAutopilotIpcConnectStatusChanged(status: AdasConstants.IpcConnectionStatus, reason: String?) {}
/**
* 域控SSM接口接收超时
* 状态变动时才会回调默认SSM状态正常
* @param isTimeout trueSSM接口接收超时 falseSSM接口恢复正常
*/
fun onSsmReceiveTimeout(isTimeout: Boolean) {}
/**
* 工控机主动查询 AdasManager#sendStatusQueryReq(),后会收到如下回调
*/
fun onAutopilotStatusRespByQuery(status: SystemStatusInfo.StatusInfo) {}
/**
* 定频SSM
* 老版本 SSMSystemStatusInfo.StatusInfo HQ、M1 MAP350开始弃用其他车型MAP360开始弃用
*/
fun onSystemStatus(statusInf: SsmInfo.SsmStatusInf) {}
/**
* 自动驾驶路线ID回调
*/
fun onAutopilotRouteLineId(lineId: Long){}
companion object {
/**
* 不可自动驾驶目前场景是刚开机adas还未和工控机连接
*/
const val STATUS_AUTOPILOT_DISABLE = 0
/**
* 可自动驾驶,工控机连接正常,且处于人工干预状态
*/
const val STATUS_AUTOPILOT_ENABLE = 1
/**
* 自动驾驶中,可能是停车,可能是行进,但是是机器在处理车的前进后退,不是人
*/
const val STATUS_AUTOPILOT_RUNNING = 2
/**
* 平行驾驶
*/
const val STATUS_PARALLEL_DRIVING = 7
}
}

View File

@@ -1,5 +1,6 @@
package com.mogo.och.common.module.manager.autopilot.autopilot
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.och.common.module.utils.CallerBase
@@ -19,6 +20,17 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
}
override fun onAutopilotTrajectoryDownloadReq(
autoPilotLine: AutopilotControlParameters.AutoPilotLine,
downloadType: Int
) {
super.onAutopilotTrajectoryDownloadReq(autoPilotLine, downloadType)
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotTrajectoryDownloadReq(autoPilotLine,downloadType)
}
}
override fun onAutopilotStatusResponse(state: Int) {
super.onAutopilotStatusResponse(state)
M_LISTENERS.forEach {