[opt3.0][adas lib] 自动驾驶启动统计对象下沉到adas-data中
This commit is contained in:
@@ -10,7 +10,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListene
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
|
||||
/**
|
||||
* Created on 2022/10/9
|
||||
|
||||
@@ -100,7 +100,7 @@ import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
|
||||
@@ -45,7 +45,7 @@ import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
|
||||
@@ -59,7 +59,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.support.obu.ObuScene
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
|
||||
/**
|
||||
* 启动自动驾驶状态统计监听
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
|
||||
object CallerAutopilotStatisticsListenerManager : CallerBase<IMoGoAutopilotStatisticsListener>() {
|
||||
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
package com.zhidao.support.adas.high.bean;
|
||||
package com.zhjt.mogo.adas.data.bean;
|
||||
|
||||
import com.zhidao.support.adas.high.common.Define;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
|
||||
/**
|
||||
* 自动驾驶启动统计 todo 凤坤,后续封装成pb,或者放入adas-data
|
||||
* 自动驾驶启动统计
|
||||
*/
|
||||
public class AutopilotStatistics {
|
||||
/**
|
||||
* 启动自动驾驶后的状态
|
||||
*/
|
||||
public interface AUTOPILOT_START_STATUS {
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
int SUCCESSFUL = 0;
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
int FAILED = 1;
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
int CANCEL = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动自动驾驶后状态
|
||||
* 0 成功
|
||||
* 1 失败
|
||||
* 2 取消
|
||||
* {@link com.zhidao.support.adas.high.common.Constants.AUTOPILOT_START_STATUS}
|
||||
* {@link AUTOPILOT_START_STATUS}
|
||||
*/
|
||||
@Define.AutopilotStartStatus
|
||||
public final int status;
|
||||
|
||||
/**
|
||||
@@ -36,7 +51,7 @@ public class AutopilotStatistics {
|
||||
*/
|
||||
public final MogoReportMsg.MogoReportMessage failedMessage;
|
||||
|
||||
public AutopilotStatistics(@Define.AutopilotStartStatus int status, long usedTime, MessagePad.SetAutopilotModeReq req, MogoReportMsg.MogoReportMessage failedMessage) {
|
||||
public AutopilotStatistics(int status, long usedTime, MessagePad.SetAutopilotModeReq req, MogoReportMsg.MogoReportMessage failedMessage) {
|
||||
this.status = status;
|
||||
this.usedTime = usedTime;
|
||||
this.req = req;
|
||||
@@ -21,7 +21,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.AutopilotReview;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zhidao.support.adas.high;
|
||||
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
|
||||
@@ -4,7 +4,8 @@ import android.os.SystemClock;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
@@ -60,7 +61,7 @@ public class AutopilotReview {
|
||||
startReq = req;
|
||||
startTime = SystemClock.elapsedRealtime();
|
||||
} else {
|
||||
onCallback(Constants.AUTOPILOT_START_STATUS.CANCEL);
|
||||
onCallback(AutopilotStatistics.AUTOPILOT_START_STATUS.CANCEL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +73,7 @@ public class AutopilotReview {
|
||||
public void onReportResult(MogoReportMsg.MogoReportMessage message) {
|
||||
if (startReq != null && message != null) {
|
||||
failedMessage = message;
|
||||
onCallback(Constants.AUTOPILOT_START_STATUS.FAILED);
|
||||
onCallback(AutopilotStatistics.AUTOPILOT_START_STATUS.FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +84,7 @@ public class AutopilotReview {
|
||||
*/
|
||||
public void onAutopilotResult(MessagePad.AutopilotState state) {
|
||||
if (startReq != null && state != null && state.getState() == 2) {
|
||||
onCallback(Constants.AUTOPILOT_START_STATUS.SUCCESSFUL);
|
||||
onCallback(AutopilotStatistics.AUTOPILOT_START_STATUS.SUCCESSFUL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,23 +110,6 @@ public class Constants {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动自动驾驶后的状态
|
||||
*/
|
||||
public interface AUTOPILOT_START_STATUS {
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
int SUCCESSFUL = 0;
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
int FAILED = 1;
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
int CANCEL = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用底盘数据类型
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhidao.support.adas.high.common;
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -47,9 +48,9 @@ public final class Define {
|
||||
public @interface SubscribeType {
|
||||
}
|
||||
|
||||
@IntDef(flag = true, value = {Constants.AUTOPILOT_START_STATUS.SUCCESSFUL,
|
||||
Constants.AUTOPILOT_START_STATUS.FAILED,
|
||||
Constants.AUTOPILOT_START_STATUS.CANCEL})
|
||||
@IntDef(flag = true, value = {AutopilotStatistics.AUTOPILOT_START_STATUS.SUCCESSFUL,
|
||||
AutopilotStatistics.AUTOPILOT_START_STATUS.FAILED,
|
||||
AutopilotStatistics.AUTOPILOT_START_STATUS.CANCEL})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface AutopilotStartStatus {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user