[6.6.0]
[common] [自驾埋点变更]
This commit is contained in:
@@ -5,8 +5,10 @@ import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.bus.fragment.BusFragment
|
||||
import com.mogo.och.bus.util.BusAnalyticsManager
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -23,11 +25,13 @@ class BusDriverProvider : CommonServiceImpl() {
|
||||
if(busFragment==null){
|
||||
busFragment = BusFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = BusAnalyticsManager
|
||||
return busFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
busFragment = null
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
}
|
||||
|
||||
override fun init(context: Context) {
|
||||
|
||||
@@ -40,10 +40,10 @@ import com.mogo.och.bus.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.bus.constant.BusConst;
|
||||
import com.mogo.och.bus.net.OrderServiceManager;
|
||||
import com.mogo.och.bus.presenter.BusModelLoopManager;
|
||||
import com.mogo.och.bus.util.BusAnalyticsManager;
|
||||
import com.mogo.och.bus.util.BusTrajectoryManager;
|
||||
import com.mogo.och.bus.util.BusVoiceManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.IOchOnMessageListener;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction2;
|
||||
@@ -400,7 +400,7 @@ public class OrderModel {
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage, System.currentTimeMillis());
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage, System.currentTimeMillis());
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.e( M_BUS + TAG, "mAdasStartFailureListener = "+startFailedMessage );
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
@@ -678,7 +678,14 @@ public class OrderModel {
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
|
||||
BusAnalyticsManager.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
// 非自驾状态---->预写日志----> 启动自驾 ---> 自驾启动成功 ----> 上报日志
|
||||
// 自驾状态---->启动自驾 ---> 自驾启动成功
|
||||
@@ -704,7 +711,7 @@ public class OrderModel {
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand);
|
||||
|
||||
//3、距离轨迹15m计算
|
||||
String resion = OchAutoPilotManager.canStartAutoPilot(busRoutesResult.getLineId());
|
||||
String resion = OchAutoPilotManager.canStartAutoPilotByDistance(busRoutesResult.getLineId());
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
@@ -717,7 +724,7 @@ public class OrderModel {
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long)busRoutesResult.getLineId());
|
||||
resion = OchAutoPilotManager.canStartAutoPilot(busRoutesResult.getLineId());
|
||||
resion = OchAutoPilotManager.canStartAutoPilotByDistance(busRoutesResult.getLineId());
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
@@ -1254,7 +1261,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
currentStation.getName(), nextStation.getName(), currentLineId,"",System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@@ -1262,7 +1269,7 @@ public class OrderModel {
|
||||
if (backgroundCurrentStationIndex >= stationList.size() - 1) {
|
||||
return;
|
||||
}
|
||||
BusAnalyticsManager.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
}
|
||||
|
||||
public void triggerUnableStartAPReasonEvent() {
|
||||
@@ -1271,7 +1278,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
currentStation.getName(), nextStation.getName(), String.valueOf(currentLineId),"",
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.mogo.och.bus.util
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey
|
||||
|
||||
/**
|
||||
* OCH Bus埋点工具
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
object BusAnalyticsManager: OchAutopilotAnalytics() {
|
||||
object BusAnalyticsManager: IOchEventKey {
|
||||
|
||||
// 埋点key:接管后点击'自动驾驶'按钮启动
|
||||
private const val EVENT_KEY_RESTART_AUTOPILOT = "event_key_och_bus_restart_autopilot"
|
||||
|
||||
@@ -4,11 +4,13 @@ import android.content.Context
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.magic.mogo.och.charter.fragment.DriverM1Fragment
|
||||
import com.magic.mogo.och.charter.manager.CharterAnalyticsManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonService
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
|
||||
|
||||
/**
|
||||
@@ -26,11 +28,13 @@ class CharterDriverProvider : CommonServiceImpl() {
|
||||
if(fragment==null){
|
||||
fragment = DriverM1Fragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = CharterAnalyticsManager.getInstance()
|
||||
return fragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
fragment = null
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
}
|
||||
|
||||
override fun init(context: Context) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package com.magic.mogo.och.charter.manager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
|
||||
public class CharterAnalyticsManager extends OchAutopilotAnalytics {
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey;
|
||||
|
||||
public class CharterAnalyticsManager implements IOchEventKey {
|
||||
|
||||
// 埋点key:接管后点击'自动驾驶'按钮启动
|
||||
private static final String EVENT_KEY_RESTART_AUTOPILOT = "event_key_och_charter_restart_autopilot";
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.magic.mogo.och.charter.callback.ChangeDestCallback
|
||||
import com.magic.mogo.och.charter.callback.DriverM1OrderCallback
|
||||
import com.magic.mogo.och.charter.callback.IDriverM1ControllerStatusCallback
|
||||
import com.magic.mogo.och.charter.constant.CharterConst
|
||||
import com.magic.mogo.och.charter.manager.CharterAnalyticsManager
|
||||
import com.magic.mogo.och.charter.manager.CharterTrajectoryManager
|
||||
import com.magic.mogo.och.charter.net.DriverM1ServiceManager
|
||||
import com.mogo.commons.module.intent.IMogoIntentListener
|
||||
@@ -40,6 +39,7 @@ import com.mogo.och.common.module.callback.OchAdasStartFailureCallback
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.common.module.manager.device.LightAirconditionDoorManager
|
||||
@@ -307,7 +307,7 @@ class DriverM1Model {
|
||||
startFailedCode: String,
|
||||
startFailedMessage: String
|
||||
) {
|
||||
CharterAnalyticsManager.getInstance()
|
||||
OchAutopilotAnalytics
|
||||
.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis())
|
||||
if (mControllerStatusCallback != null) {
|
||||
|
||||
@@ -453,7 +453,14 @@ class DriverM1Model {
|
||||
*/
|
||||
private fun startAutopilot() {
|
||||
|
||||
CharterAnalyticsManager.getInstance().triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
//判断轨迹Id是否可用
|
||||
mCurrentRoute?.let {
|
||||
@@ -529,7 +536,7 @@ class DriverM1Model {
|
||||
val orderNo = mCurrentOrder?.orderNo
|
||||
if(startSiteName!=null&&endSiteName!=null) {
|
||||
|
||||
CharterAnalyticsManager.getInstance().triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
isRestart, send,
|
||||
startSiteName, endSiteName, it, orderNo?:"", System.currentTimeMillis()
|
||||
)
|
||||
@@ -541,7 +548,7 @@ class DriverM1Model {
|
||||
if (mCurrentOrder == null) {
|
||||
return
|
||||
}
|
||||
CharterAnalyticsManager.getInstance().triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
}
|
||||
|
||||
private fun triggerUnableStartAPReasonEvent() {
|
||||
@@ -552,7 +559,7 @@ class DriverM1Model {
|
||||
val startSiteName = mCurrentOrder?.startSiteName
|
||||
val endSiteName = mCurrentOrder?.siteName
|
||||
if (startSiteName != null && endSiteName != null) {
|
||||
CharterAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.triggerUnableStartAPReasonEvent(
|
||||
startSiteName, endSiteName, it.toString(),"",
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason
|
||||
)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.mogo.och.common.module.manager.autopilot.autopilot;
|
||||
|
||||
public interface IOchEventKey {
|
||||
// 无人化taxi event_key_unmanned_taxi_start_service *
|
||||
// bus event_key_och_bus_start_service *
|
||||
// shuttle event_key_och_bus_start_service *
|
||||
// charter event_key_och_charter_start_service
|
||||
// taxi event_key_och_taxi_start_service *
|
||||
// 无人化taxiPa event_key_unmanned_taxi_start_service
|
||||
String getEventKeyStartService();
|
||||
|
||||
// 无人化taxi event_key_unmanned_taxi_restart_autopilot *
|
||||
// bus event_key_och_bus_restart_autopilot *
|
||||
// shuttle event_key_och_bus_restart_autopilot *
|
||||
// charter event_key_och_charter_restart_autopilot
|
||||
// taxi event_key_och_taxi_restart_autopilot *
|
||||
// 无人化taxiPa event_key_unmanned_taxi_restart_autopilot
|
||||
String getEventKeyRestartService();
|
||||
|
||||
// 无人化taxi event_key_och_taxi_ap_unable_start_reason *
|
||||
// bus event_key_och_bus_ap_unable_start_reason *
|
||||
// shuttle event_key_och_bus_ap_unable_start_reason *
|
||||
// charter event_key_och_charter_ap_unable_start_reason
|
||||
// taxi event_key_och_taxi_ap_unable_start_reason *
|
||||
// 无人化taxiPa event_key_och_taxi_ap_unable_start_reason
|
||||
String getEventKeyApUnableStartReason();
|
||||
|
||||
// 无人化taxi event_key_unmanned_taxi_click_start_autopilot
|
||||
// bus event_key_och_bus_click_start_autopilot
|
||||
// shuttle event_key_och_bus_click_start_autopilot
|
||||
// charter event_key_och_charter_click_start_autopilot
|
||||
// taxi event_key_och_taxi_click_start_autopilot
|
||||
// 无人化taxiPa event_key_och_taxi_passenger_click_start_autopilot
|
||||
String getEventKeyClickStartAutopilot();
|
||||
|
||||
}
|
||||
@@ -5,10 +5,13 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.msgbox.AutopilotMsg
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoFsm2024Listener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoReceiveReceivedAckListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerReceiveReceivedAckListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||
@@ -16,17 +19,23 @@ import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
|
||||
import com.zhjt.mogo.adas.common.MessageType
|
||||
import com.zhjt.mogo.adas.data.bean.ReceivedAck
|
||||
import com.zhjt.mogo.adas.data.bean.ReceivedAck.Status
|
||||
import fsm.Fsm2024
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
object OchAutoPilotManager : IMoGoReceiveReceivedAckListener {
|
||||
object OchAutoPilotManager : IMoGoReceiveReceivedAckListener, IMoGoFsm2024Listener {
|
||||
|
||||
const val TAG = "OchAutoPilotManager"
|
||||
|
||||
private val globalSessionId = AtomicLong(-1)
|
||||
private val fsmBackSessionId = AtomicLong(-1L)
|
||||
|
||||
init {
|
||||
CallerReceiveReceivedAckListenerManager.addListener(TAG,this)
|
||||
CallerFsm2024ListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun canStartAutoPilot(lineId: Number?): String {
|
||||
fun canStartAutoPilotByDistance(lineId: Number?): String {
|
||||
return TrajectoryAndDistanceManager.canStartAutopilot(lineId).apply {
|
||||
if (!isNullOrBlank()) {
|
||||
// 去启动绘制高精地图上的轨迹
|
||||
@@ -38,6 +47,18 @@ object OchAutoPilotManager : IMoGoReceiveReceivedAckListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动自驾中禁止再次启动自驾
|
||||
*/
|
||||
@JvmStatic
|
||||
fun canStartAutopilotBySessionId():Boolean{
|
||||
return (globalSessionId.get()==-1L).apply {
|
||||
if(!this) {
|
||||
OchAutopilotAnalytics.triggerDistance2LineorStation(globalSessionId.get())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun canStartAutoPilotSSM(): Boolean {
|
||||
if (!FunctionBuildConfig.isDemoMode && !OCHAdasAbilityManager.getInstance().autopilotAbilityStatus) {
|
||||
@@ -61,9 +82,15 @@ object OchAutoPilotManager : IMoGoReceiveReceivedAckListener {
|
||||
return true
|
||||
}
|
||||
|
||||
fun clearGlobalSessionId(){
|
||||
globalSessionId.set(-1)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun startAutoPilot(controlParameters: AutopilotControlParameters?): Long {
|
||||
val sessionId = CallerAutoPilotControlManager.startAutoPilot(controlParameters)
|
||||
globalSessionId.set(sessionId)
|
||||
fsmBackSessionId.set(-1L)
|
||||
OchAutopilotAnalytics.triggerStartAutopilotParameters(controlParameters, sessionId)
|
||||
return sessionId
|
||||
}
|
||||
@@ -74,4 +101,22 @@ object OchAutoPilotManager : IMoGoReceiveReceivedAckListener {
|
||||
OchAutopilotAnalytics.triggerStartAutopilotParametersAck(receivedAck.toString(),receivedAck.status == Status.NORMAL)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
override fun onFSM2024State(fsmState: Fsm2024.FSMStateMsg) {
|
||||
fsmBackSessionId.set(fsmState.failToPilotSessionId)
|
||||
CallerLogger.e(TAG,"收到FSM2024的SeesiongId:${fsmState.failToPilotSessionId}")
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动自驾失败切 FSM返回的Session和启动SessionId 不同
|
||||
*/
|
||||
fun checkStartSeesionAndFailSessionId(){
|
||||
if(globalSessionId.get() != fsmBackSessionId.get()){
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailCheckSeesiongDiff(globalSessionId.get(),
|
||||
fsmBackSessionId.get())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,6 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
super.onAutopilotStatusResponse(state)
|
||||
autopilotState = state
|
||||
}
|
||||
|
||||
@@ -178,4 +177,9 @@ object OchAutoPilotStatusListenerManager : CallerBase<IOchAutopilotStatusListene
|
||||
listener.canStartAutopilot(canStartAutopilot)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponseFromCan(state: Int) {
|
||||
super.onAutopilotStatusResponseFromCan(state)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.mogo.och.common.module.manager.autopilot.autopilot
|
||||
|
||||
import android.text.TextUtils
|
||||
import com.alibaba.android.arouter.exception.InitException
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.utils.MogoAnalyticUtils
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
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
|
||||
@@ -13,72 +13,35 @@ import com.mogo.eagle.core.utilcode.util.DateTimeUtils
|
||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
abstract class OchAutopilotAnalytics {
|
||||
object OchAutopilotAnalytics {
|
||||
|
||||
companion object{
|
||||
private const val EVENT_PARAM_AUTOPILOTANALYTICS_GROUP = "start_autopilot_group"
|
||||
private const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境:true/false
|
||||
private const val EVENT_PARAM_START_SUCCESS_TIME = "time_success"
|
||||
private const val EVENT_PARAM_START_FAIL_TIME = "time_fail"
|
||||
private const val EVENT_PARAM_CLICK_TIME = "time_click"
|
||||
private const val EVENT_PARAM_START_NAME = "start_name"
|
||||
private const val EVENT_PARAM_END_NAME = "end_name"
|
||||
private const val EVENT_PARAM_LINE_ID = "line_id"
|
||||
private const val EVENT_PARAM_ORDER_NUMBER = "order_num"
|
||||
private const val EVENT_PARAM_UNABLE_START_REASON = "unable_start_reason"
|
||||
private const val EVENT_PARAM_MAP_ORIGINAL_DATA = "map_original_data" // 域控原始状态信息
|
||||
private const val EVENT_PARAM_AUTOPILOT_STATE = "autopilot_state" //原始的自动驾驶状态
|
||||
private const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
|
||||
private const val EVENT_PARAM_START_FAILURE_CODE = "start_autopilot_failure_code" // 启动自驾失败code
|
||||
private const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_SESSION_ID = "start_autopilot_cmd_session_id" //启动自驾命令请求的sessionId
|
||||
private const val EVENT_PARAM_AUTOPILOTANALYTICS_GROUP = "start_autopilot_group"
|
||||
private const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境:true/false
|
||||
private const val EVENT_PARAM_START_SUCCESS_TIME = "time_success"
|
||||
private const val EVENT_PARAM_START_FAIL_TIME = "time_fail"
|
||||
private const val EVENT_PARAM_CLICK_TIME = "time_click"
|
||||
private const val EVENT_PARAM_START_NAME = "start_name"
|
||||
private const val EVENT_PARAM_END_NAME = "end_name"
|
||||
private const val EVENT_PARAM_LINE_ID = "line_id"
|
||||
private const val EVENT_PARAM_ORDER_NUMBER = "order_num"
|
||||
private const val EVENT_PARAM_UNABLE_START_REASON = "unable_start_reason"
|
||||
private const val EVENT_PARAM_MAP_ORIGINAL_DATA = "map_original_data" // 域控原始状态信息
|
||||
private const val EVENT_PARAM_AUTOPILOT_STATE = "autopilot_state" //原始的自动驾驶状态
|
||||
private const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
|
||||
private const val EVENT_PARAM_START_FAILURE_CODE = "start_autopilot_failure_code" // 启动自驾失败code
|
||||
private const val EVENT_PARAM_START_FAILURE_MSG = "start_autopilot_failure_msg" // 启动自驾失败原因
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_SESSION_ID = "start_autopilot_cmd_session_id" //启动自驾命令请求的sessionId
|
||||
|
||||
private const val EVENT_KEY_START_AUTOPILOT_PARAMETERS = "event_key_och_start_autopilot_parameters"
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_PARAMETERS= "start_autopilot_parameters" // 启动自驾参数
|
||||
private const val EVENT_KEY_START_AUTOPILOT_PARAMETERS = "event_key_och_start_autopilot_parameters"
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_PARAMETERS= "start_autopilot_parameters" // 启动自驾参数
|
||||
|
||||
private const val EVENT_KEY_START_AUTOPILOT_ACK = "event_key_och_start_autopilot_ack"
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_ACK= "start_autopilot_parameters_ack" // 启动自驾参数
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS= "start_autopilot_parameters_ack_isSuccess" // 启动自驾参数
|
||||
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_DISTANCE = "event_key_vehicle_start_autopilot_state_distance_15"
|
||||
|
||||
|
||||
fun triggerStartAutopilotParameters(controlParameters: AutopilotControlParameters?, sessionId: Long){
|
||||
val params = HashMap<String, Any>()
|
||||
params[EVENT_PARAM_ENV_ONLINE] = DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE
|
||||
params[EVENT_PARAM_START_AUTOPILOT_SESSION_ID] = sessionId
|
||||
params[EVENT_PARAM_START_AUTOPILOT_PARAMETERS] = "${controlParameters.toString()}_${controlParameters?.autoPilotLine}_routeID:${controlParameters?.routeID}_routeName:${controlParameters?.routeName}"
|
||||
params[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.addCommonParams(params)
|
||||
MogoAnalyticUtils.track(EVENT_KEY_START_AUTOPILOT_PARAMETERS, params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 底盘收到启动自驾的ack
|
||||
*/
|
||||
fun triggerStartAutopilotParametersAck(data:String,isSuccess:Boolean){
|
||||
val params = HashMap<String, Any>()
|
||||
params[EVENT_PARAM_ENV_ONLINE] = DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE
|
||||
params[EVENT_PARAM_START_AUTOPILOT_ACK] = data
|
||||
params[EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS] = isSuccess
|
||||
params[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.addCommonParams(params)
|
||||
MogoAnalyticUtils.track(EVENT_KEY_START_AUTOPILOT_ACK, params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动自驾判断距离
|
||||
*/
|
||||
fun triggerDistance2LineorStation(info: String){
|
||||
val map = hashMapOf<String, Any>()
|
||||
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.writeChainLog("启动自驾距离判断",info, eventID = EVENT_KEY_INFO_AUTOPILOT_DISTANCE, patch = map)
|
||||
}
|
||||
}
|
||||
private const val EVENT_KEY_START_AUTOPILOT_ACK = "event_key_och_start_autopilot_ack"
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_ACK= "start_autopilot_parameters_ack" // 启动自驾参数
|
||||
private const val EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS= "start_autopilot_parameters_ack_isSuccess" // 启动自驾参数
|
||||
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_DISTANCE = "event_key_vehicle_start_autopilot_state_distance_15"
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION = "event_key_vehicle_start_autopilot_state_sessiong"
|
||||
|
||||
private val LOOP_PERIOD_15S = 15 * 1000L
|
||||
|
||||
@@ -86,19 +49,80 @@ abstract class OchAutopilotAnalytics {
|
||||
private var mStartAutopilotKey: String? = null
|
||||
private val mStartAutopilotParams = HashMap<String, Any>()
|
||||
|
||||
var ochEventKey: IOchEventKey? = null
|
||||
|
||||
private val timeOutRunnable = Runnable {
|
||||
|
||||
/**
|
||||
* 正式把参数传给底层
|
||||
*/
|
||||
fun triggerStartAutopilotParameters(controlParameters: AutopilotControlParameters?, sessionId: Long){
|
||||
val params = HashMap<String, Any>()
|
||||
params[EVENT_PARAM_ENV_ONLINE] = DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE
|
||||
params[EVENT_PARAM_START_AUTOPILOT_SESSION_ID] = sessionId
|
||||
params[EVENT_PARAM_START_AUTOPILOT_PARAMETERS] = "${controlParameters.toString()}_${controlParameters?.autoPilotLine}_routeID:${controlParameters?.routeID}_routeName:${controlParameters?.routeName}"
|
||||
params[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.addCommonParams(params)
|
||||
MogoAnalyticUtils.track(EVENT_KEY_START_AUTOPILOT_PARAMETERS, params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 底盘收到启动自驾的ack
|
||||
*/
|
||||
fun triggerStartAutopilotParametersAck(data:String,isSuccess:Boolean){
|
||||
val params = HashMap<String, Any>()
|
||||
params[EVENT_PARAM_ENV_ONLINE] = DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE
|
||||
params[EVENT_PARAM_START_AUTOPILOT_ACK] = data
|
||||
params[EVENT_PARAM_START_AUTOPILOT_ACK_SUCCESS] = isSuccess
|
||||
params[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.addCommonParams(params)
|
||||
MogoAnalyticUtils.track(EVENT_KEY_START_AUTOPILOT_ACK, params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动自驾判断距离
|
||||
*/
|
||||
fun triggerDistance2LineorStation(info: String){
|
||||
val map = hashMapOf<String, Any>()
|
||||
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.writeChainLog("启动自驾距离判断",info, eventID = EVENT_KEY_INFO_AUTOPILOT_DISTANCE, patch = map)
|
||||
}
|
||||
/**
|
||||
* 等待底盘返回的间隙 重复启动自驾
|
||||
*/
|
||||
fun triggerDistance2LineorStation(globalSessionId : Long){
|
||||
val map = hashMapOf<String, Any>()
|
||||
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.writeChainLog("启动自驾Sessiong判断","已有globalSessionId:${globalSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION, patch = map)
|
||||
}
|
||||
|
||||
/**
|
||||
* 等待底盘返回的间隙 重复启动自驾
|
||||
*/
|
||||
fun triggerStartAutopilotFailCheckSeesiongDiff(globalSessionId: Long, fsmBackSessionId: Long){
|
||||
val map = hashMapOf<String, Any>()
|
||||
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.writeChainLog("启动自驾失败且SessionId不同","globalSessionId:${globalSessionId}——————fsmBackSessionId:${fsmBackSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION, patch = map)
|
||||
}
|
||||
|
||||
|
||||
private val timeOutRunnable = Runnable {
|
||||
// 15s内未开启,上报失败埋点
|
||||
triggerStartAutopilotFailureEvent("", "15s后app等待超时", System.currentTimeMillis())
|
||||
}
|
||||
|
||||
/**
|
||||
* 底盘明确告知启动自驾失败
|
||||
*/
|
||||
fun triggerStartAutopilotFailureEventByAdas(failCode: String, failMsg: String, startFailDate: Long) {
|
||||
BizLoopManager.removeCallback(timeOutRunnable)
|
||||
// 判断Session 是否相同
|
||||
OchAutoPilotManager.checkStartSeesionAndFailSessionId()
|
||||
triggerStartAutopilotFailureEvent(failCode, failMsg, startFailDate)
|
||||
}
|
||||
|
||||
private fun clearStartAutopilotParams() {
|
||||
mStartAutopilotParams.clear()
|
||||
OchAutoPilotManager.clearGlobalSessionId()
|
||||
}
|
||||
|
||||
private fun triggerStartAutopilotFailureEvent(failCode: String, failMsg: String, startFailDate: Long) {
|
||||
@@ -215,7 +239,12 @@ abstract class OchAutopilotAnalytics {
|
||||
// charter event_key_och_charter_start_service
|
||||
// taxi event_key_och_taxi_start_service *
|
||||
// 无人化taxiPa event_key_unmanned_taxi_start_service
|
||||
abstract fun getEventKeyStartService(): String
|
||||
fun getEventKeyStartService(): String{
|
||||
if(ochEventKey==null){
|
||||
throw InitException("请设置启动自驾埋点key")
|
||||
}
|
||||
return ochEventKey!!.getEventKeyStartService()
|
||||
}
|
||||
|
||||
// 无人化taxi event_key_unmanned_taxi_restart_autopilot *
|
||||
// bus event_key_och_bus_restart_autopilot *
|
||||
@@ -223,7 +252,12 @@ abstract class OchAutopilotAnalytics {
|
||||
// charter event_key_och_charter_restart_autopilot
|
||||
// taxi event_key_och_taxi_restart_autopilot *
|
||||
// 无人化taxiPa event_key_unmanned_taxi_restart_autopilot
|
||||
abstract fun getEventKeyRestartService(): String
|
||||
fun getEventKeyRestartService(): String{
|
||||
if(ochEventKey==null){
|
||||
throw InitException("请设置启动自驾埋点key")
|
||||
}
|
||||
return ochEventKey!!.getEventKeyRestartService()
|
||||
}
|
||||
|
||||
// 无人化taxi event_key_och_taxi_ap_unable_start_reason *
|
||||
// bus event_key_och_bus_ap_unable_start_reason *
|
||||
@@ -231,7 +265,12 @@ abstract class OchAutopilotAnalytics {
|
||||
// charter event_key_och_charter_ap_unable_start_reason
|
||||
// taxi event_key_och_taxi_ap_unable_start_reason *
|
||||
// 无人化taxiPa event_key_och_taxi_ap_unable_start_reason
|
||||
abstract fun getEventKeyApUnableStartReason(): String
|
||||
fun getEventKeyApUnableStartReason(): String{
|
||||
if(ochEventKey==null){
|
||||
throw InitException("请设置启动自驾埋点key")
|
||||
}
|
||||
return ochEventKey!!.getEventKeyApUnableStartReason()
|
||||
}
|
||||
|
||||
// 无人化taxi event_key_unmanned_taxi_click_start_autopilot
|
||||
// bus event_key_och_bus_click_start_autopilot
|
||||
@@ -239,6 +278,11 @@ abstract class OchAutopilotAnalytics {
|
||||
// charter event_key_och_charter_click_start_autopilot
|
||||
// taxi event_key_och_taxi_click_start_autopilot
|
||||
// 无人化taxiPa event_key_och_taxi_passenger_click_start_autopilot
|
||||
abstract fun getEventKeyClickStartAutopilot(): String
|
||||
fun getEventKeyClickStartAutopilot(): String{
|
||||
if(ochEventKey==null){
|
||||
throw InitException("请设置启动自驾埋点key")
|
||||
}
|
||||
return ochEventKey!!.getEventKeyClickStartAutopilot()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.offline.fragment.ShuttleFragment
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.offline.util.BusAnalyticsManager
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -28,10 +30,12 @@ class ShuttleDriverProvider : CommonServiceImpl() {
|
||||
if(busFragment==null){
|
||||
busFragment = ShuttleFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = BusAnalyticsManager.getInstance()
|
||||
return busFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
busFragment = null
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction;
|
||||
@@ -54,7 +55,6 @@ import com.mogo.och.offline.callback.IBusControllerStatusCallback;
|
||||
import com.mogo.och.offline.callback.IRefreshBusStationsCallback;
|
||||
import com.mogo.och.offline.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.offline.constant.BusConst;
|
||||
import com.mogo.och.offline.util.BusAnalyticsManager;
|
||||
import com.mogo.och.offline.util.BusTrajectoryManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
@@ -249,7 +249,7 @@ public class OrderModel {
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage, System.currentTimeMillis());
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage, System.currentTimeMillis());
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode) {
|
||||
CallerLogger.e(M_BUS + TAG, "mAdasStartFailureListener = " + startFailedMessage);
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
@@ -499,7 +499,15 @@ public class OrderModel {
|
||||
* @param isRestart
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
BusAnalyticsManager.getInstance().triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
//1、判断轨迹url是否可用
|
||||
if (busRoutesResult != null) {
|
||||
@@ -992,7 +1000,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
currentStation.getName(), nextStation.getName(), busRoutesResult.getLineId(), "", System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@@ -1000,7 +1008,7 @@ public class OrderModel {
|
||||
if (stationList == null || backgroundCurrentStationIndex >= stationList.size() - 1) {
|
||||
return;
|
||||
}
|
||||
BusAnalyticsManager.getInstance().triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
}
|
||||
|
||||
public void triggerUnableStartAPReasonEvent() {
|
||||
@@ -1009,7 +1017,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
currentStation.getName(), nextStation.getName(), String.valueOf(busRoutesResult.getLineId()), "",
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package com.mogo.och.offline.util;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey;
|
||||
|
||||
/**
|
||||
* OCH Bus埋点工具
|
||||
* <p>
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
public class BusAnalyticsManager extends OchAutopilotAnalytics {
|
||||
public class BusAnalyticsManager implements IOchEventKey {
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
private static final String EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_bus_ap_unable_start_reason";
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.shuttle.fragment.ShuttleFragment
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.shuttle.util.ShuttleAnalyticsEventKey
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -28,10 +30,12 @@ class ShuttleDriverProvider : CommonServiceImpl() {
|
||||
if(busFragment==null){
|
||||
busFragment = ShuttleFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = ShuttleAnalyticsEventKey.getInstance()
|
||||
return busFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
busFragment = null
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.mogo.och.common.module.biz.login.LoginStatusManager;
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
|
||||
import com.mogo.och.common.module.constant.OchCommonConst;
|
||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager;
|
||||
@@ -42,7 +43,6 @@ import com.mogo.och.common.module.manager.socket.cloud.OCHSocketMessageManager;
|
||||
import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction;
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager;
|
||||
import com.mogo.och.common.module.manager.socket.lan.LedScreenManager;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.AppConnectMsg;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BaseDPMsg;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BusCacheKey;
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType;
|
||||
@@ -69,7 +69,6 @@ import com.mogo.och.shuttle.callback.IRefreshBusStationsCallback;
|
||||
import com.mogo.och.shuttle.callback.ISlidePannelHideCallback;
|
||||
import com.mogo.och.shuttle.constant.BusConst;
|
||||
import com.mogo.och.shuttle.net.OrderServiceManager;
|
||||
import com.mogo.och.shuttle.util.BusAnalyticsManager;
|
||||
import com.mogo.och.shuttle.util.BusTrajectoryManager;
|
||||
import com.mogo.och.shuttle.util.ShuttleVoiceManager;
|
||||
|
||||
@@ -257,7 +256,7 @@ public class OrderModel {
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis());
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis());
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode){
|
||||
CallerLogger.e( M_BUS + TAG, "mAdasStartFailureListener = "+startFailedMessage );
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
@@ -593,7 +592,15 @@ public class OrderModel {
|
||||
* @param isRestart
|
||||
*/
|
||||
private void startAutopilot(boolean isRestart, int leaveIndex) {
|
||||
BusAnalyticsManager.getInstance().triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
//1、判断轨迹url是否可用
|
||||
if(busRoutesResult!=null){
|
||||
@@ -617,7 +624,7 @@ public class OrderModel {
|
||||
}
|
||||
// 3、距离轨迹15m计算
|
||||
//3、距离轨迹15m计算
|
||||
String resion = OchAutoPilotManager.canStartAutoPilot(busRoutesResult.getLineId());
|
||||
String resion = OchAutoPilotManager.canStartAutoPilotByDistance(busRoutesResult.getLineId());
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
MogoLocation nextStationPoint = new MogoLocation();
|
||||
if (backgroundCurrentStationIndex < stationList.size() - 1) {
|
||||
@@ -630,7 +637,7 @@ public class OrderModel {
|
||||
currentStationPoint.setLongitude(busStationBean.getGcjLon());
|
||||
currentStationPoint.setLatitude(busStationBean.getGcjLat());
|
||||
setTrajectoryStation(currentStationPoint,nextStationPoint, (long) busRoutesResult.getLineId());
|
||||
resion = OchAutoPilotManager.canStartAutoPilot(busRoutesResult.getLineId());
|
||||
resion = OchAutoPilotManager.canStartAutoPilotByDistance(busRoutesResult.getLineId());
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
@@ -1135,7 +1142,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.getInstance().triggerStartAutopilotEvent(isRestart, send,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestart, send,
|
||||
currentStation.getName(), nextStation.getName(), busRoutesResult.getLineId(),"",System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@@ -1143,7 +1150,7 @@ public class OrderModel {
|
||||
if (stationList == null || backgroundCurrentStationIndex >= stationList.size() - 1) {
|
||||
return;
|
||||
}
|
||||
BusAnalyticsManager.getInstance().triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
}
|
||||
|
||||
public void triggerUnableStartAPReasonEvent() {
|
||||
@@ -1152,7 +1159,7 @@ public class OrderModel {
|
||||
}
|
||||
BusStationBean currentStation = stationList.get(backgroundCurrentStationIndex);
|
||||
BusStationBean nextStation = stationList.get(backgroundCurrentStationIndex + 1);
|
||||
BusAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
currentStation.getName(), nextStation.getName(), String.valueOf(busRoutesResult.getLineId()),"",
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package com.mogo.och.shuttle.util;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey;
|
||||
|
||||
/**
|
||||
* OCH Bus埋点工具
|
||||
* <p>
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
public class BusAnalyticsManager extends OchAutopilotAnalytics {
|
||||
public class ShuttleAnalyticsEventKey implements IOchEventKey {
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
private static final String EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_bus_ap_unable_start_reason";
|
||||
@@ -22,10 +22,10 @@ public class BusAnalyticsManager extends OchAutopilotAnalytics {
|
||||
private static final String EVENT_KEY_CLICK_START_AUTOPILOT = "event_key_och_shuttle_click_start_autopilot";
|
||||
|
||||
private static final class SingletonHolder {
|
||||
private static final BusAnalyticsManager INSTANCE = new BusAnalyticsManager();
|
||||
private static final ShuttleAnalyticsEventKey INSTANCE = new ShuttleAnalyticsEventKey();
|
||||
}
|
||||
|
||||
public static BusAnalyticsManager getInstance() {
|
||||
public static ShuttleAnalyticsEventKey getInstance() {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,13 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.weaknet.fragment.ShuttleFragment
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.weaknet.database.repository.EventRepository
|
||||
import com.mogo.och.weaknet.database.repository.LineRepository
|
||||
import com.mogo.och.weaknet.database.repository.TaskRepository
|
||||
import com.mogo.och.weaknet.database.repository.TaskSiteRepository
|
||||
import com.mogo.och.weaknet.model.BusLineModel
|
||||
import com.mogo.och.weaknet.util.BusAnalyticsManager
|
||||
|
||||
/**
|
||||
* 网约车小巴业务实现入口
|
||||
@@ -40,12 +42,14 @@ class ShuttleDriverProvider : CommonServiceImpl() {
|
||||
if (busFragment == null) {
|
||||
busFragment = ShuttleFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = BusAnalyticsManager
|
||||
BusLineModel.init();
|
||||
return busFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
busFragment = null
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
BusLineModel.release()
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -27,10 +26,12 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback
|
||||
import com.mogo.och.common.module.manager.autopilot.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager.canStartAutoPilot
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager.canStartAutoPilotByDistance
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager.canStartAutoPilotSSM
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager.startAutoPilot
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.common.module.manager.distance.TrajectoryAndDistanceManager
|
||||
@@ -41,7 +42,6 @@ import com.mogo.och.common.module.manager.socket.cloud.action.OperateAction
|
||||
import com.mogo.och.common.module.manager.socket.lan.ILanMessageListener
|
||||
import com.mogo.och.common.module.manager.socket.lan.LanSocketManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.LedScreenManager
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.BusinessType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.TaskDetailsMsg
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
@@ -50,8 +50,6 @@ import com.mogo.och.common.module.utils.OCHThreadPoolManager
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.common.module.voice.VoiceNotice.showNotice
|
||||
import com.mogo.och.data.bean.BusRoutesResult
|
||||
import com.mogo.och.data.bean.BusTransferData
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
import com.mogo.och.weaknet.callback.IBusADASStatusCallback
|
||||
import com.mogo.och.weaknet.constant.BusConst
|
||||
@@ -156,7 +154,7 @@ object OrderModel {
|
||||
}
|
||||
|
||||
override fun onStartAutopilotFailure(startFailedCode: String, startFailedMessage: String) {
|
||||
BusAnalyticsManager.triggerStartAutopilotFailureEventByAdas(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailureEventByAdas(
|
||||
startFailedCode,
|
||||
startFailedMessage,
|
||||
System.currentTimeMillis()
|
||||
@@ -372,7 +370,15 @@ object OrderModel {
|
||||
* @param isRestart
|
||||
*/
|
||||
private fun startAutopilot(isRestart: Boolean) {
|
||||
BusAnalyticsManager.triggerClickStartAutopilotTime(System.currentTimeMillis())
|
||||
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.triggerClickStartAutopilotTime(System.currentTimeMillis())
|
||||
|
||||
//1、判断轨迹url是否可用
|
||||
if(LineManager.contraiInfo==null){
|
||||
@@ -399,10 +405,10 @@ object OrderModel {
|
||||
}
|
||||
|
||||
// 3、距离轨迹15m计算
|
||||
var resion = canStartAutoPilot(LineManager.contraiInfo!!.lineId)
|
||||
var resion = canStartAutoPilotByDistance(LineManager.contraiInfo!!.lineId)
|
||||
if (TrajectoryAndDistanceManager.errorTypeNoneLineId == resion) {
|
||||
setTrajectoryStation(false)
|
||||
resion = canStartAutoPilot(LineManager.contraiInfo!!.lineId)
|
||||
resion = canStartAutoPilotByDistance(LineManager.contraiInfo!!.lineId)
|
||||
}
|
||||
if (!StringUtils.isEmpty(resion)) {
|
||||
ToastUtils.showShort(resion)
|
||||
@@ -700,7 +706,7 @@ object OrderModel {
|
||||
fun triggerStartServiceEvent(isRestart: Boolean, send: Boolean) {
|
||||
LineManager.startStation?.let {startStation->
|
||||
LineManager.endStation?.let {endStation->
|
||||
BusAnalyticsManager.triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
isRestart,
|
||||
send,
|
||||
startStation.name,
|
||||
@@ -715,14 +721,14 @@ object OrderModel {
|
||||
}
|
||||
|
||||
fun triggerUpdateStartAutoPilotSessionId(sessionId: Long) {
|
||||
BusAnalyticsManager.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
}
|
||||
|
||||
fun triggerUnableStartAPReasonEvent() {
|
||||
LineManager.startStation?.let {startStation->
|
||||
LineManager.endStation?.let {endStation->
|
||||
if(LineManager.lineInfos!=null){
|
||||
BusAnalyticsManager.triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.triggerUnableStartAPReasonEvent(
|
||||
startStation.name, endStation.name,LineManager.lineInfos!!.lineId.toString() , "",
|
||||
OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.weaknet.util
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey
|
||||
|
||||
|
||||
/**
|
||||
@@ -9,7 +9,7 @@ import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalyt
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
object BusAnalyticsManager : OchAutopilotAnalytics() {
|
||||
object BusAnalyticsManager : IOchEventKey {
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
private const val EVENT_KEY_AP_UNABLE_START_REASON =
|
||||
|
||||
@@ -8,7 +8,9 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonService
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.taxi.ui.TaxiFragment
|
||||
import com.mogo.och.taxi.utils.TaxiAnalyticsManager
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -32,11 +34,13 @@ class TaxiDriverProvider : CommonServiceImpl() {
|
||||
if (ochTaxiFragment == null) {
|
||||
ochTaxiFragment = TaxiFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = TaxiAnalyticsManager
|
||||
return ochTaxiFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
super.resetFragment()
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
ochTaxiFragment = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStation;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager;
|
||||
@@ -82,7 +83,6 @@ import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum;
|
||||
import com.mogo.och.taxi.constant.TaxiOrderTypeEnum;
|
||||
import com.mogo.och.taxi.network.TaxiServiceManager;
|
||||
import com.mogo.och.taxi.utils.OrderUtil;
|
||||
import com.mogo.och.taxi.utils.TaxiAnalyticsManager;
|
||||
import com.mogo.och.taxi.utils.TaxiTrajectoryManager;
|
||||
import com.zhjt.service.chain.ChainLog;
|
||||
|
||||
@@ -896,7 +896,14 @@ public class TaxiModel {
|
||||
)
|
||||
public void startAutoPilot() {
|
||||
|
||||
TaxiAnalyticsManager.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.INSTANCE.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
|
||||
if (!checkCurrentOCHOrder()) {
|
||||
@@ -923,10 +930,10 @@ public class TaxiModel {
|
||||
}
|
||||
|
||||
//3、距离轨迹15m计算
|
||||
String resion = OchAutoPilotManager.canStartAutoPilot(mCurrentOCHOrder.lineId);
|
||||
String resion = OchAutoPilotManager.canStartAutoPilotByDistance(mCurrentOCHOrder.lineId);
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
setStation();
|
||||
resion = OchAutoPilotManager.canStartAutoPilot(mCurrentOCHOrder.lineId);
|
||||
resion = OchAutoPilotManager.canStartAutoPilotByDistance(mCurrentOCHOrder.lineId);
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
@@ -938,7 +945,7 @@ public class TaxiModel {
|
||||
FunctionBuildConfig.isPassStartAutopilotCommand);
|
||||
//4、ssm 给出数据
|
||||
if (!OchAutoPilotManager.canStartAutoPilotSSM()) {
|
||||
TaxiAnalyticsManager.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUnableStartAPReasonEvent(
|
||||
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr,
|
||||
String.valueOf(mCurrentOCHOrder.lineId),mCurrentOCHOrder.orderNo,
|
||||
OCHAdasAbilityManager.getInstance().getAutopilotUnAbilityReason());
|
||||
@@ -973,11 +980,11 @@ public class TaxiModel {
|
||||
+ " ,endSiteName=" + mCurrentOCHOrder.endSiteAddr
|
||||
+ "isRestartAutopilot = " + isRestartAutopilot);
|
||||
|
||||
TaxiAnalyticsManager.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, false,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, false,
|
||||
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr,
|
||||
(int) mCurrentOCHOrder.lineId,
|
||||
mCurrentOCHOrder.orderNo,System.currentTimeMillis());
|
||||
TaxiAnalyticsManager.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
OchAutopilotAnalytics.INSTANCE.triggerUpdateStartAutoPilotSessionId(sessionId);
|
||||
|
||||
if (mControllerStatusCallback != null) {
|
||||
mControllerStatusCallback.startOpenAutopilot();
|
||||
@@ -1070,7 +1077,7 @@ public class TaxiModel {
|
||||
|
||||
@Override
|
||||
public void onStartAutopilotFailure(@NotNull String startFailedCode, @NonNull String startFailedMessage) {
|
||||
TaxiAnalyticsManager.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis());
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis());
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode) {
|
||||
CallerLogger.e(M_TAXI + TAG, "mAdasStartFailureListener = " + startFailedMessage);
|
||||
mADASStatusCallback.onStartAdasFailure();
|
||||
@@ -1209,7 +1216,7 @@ public class TaxiModel {
|
||||
}
|
||||
if (mCurrentOCHOrder != null
|
||||
&& TaxiOrderStatusEnum.OnTheWayToEnd.getCode() == mCurrentOCHOrder.orderStatus) {
|
||||
TaxiAnalyticsManager.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, true,
|
||||
OchAutopilotAnalytics.INSTANCE.triggerStartAutopilotEvent(isRestartAutopilot, true,
|
||||
mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr,
|
||||
(int) mCurrentOCHOrder.lineId, mCurrentOCHOrder.orderNo,System.currentTimeMillis());
|
||||
if (FunctionBuildConfig.isDemoMode) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.mogo.och.taxi.utils
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey
|
||||
|
||||
/**
|
||||
* OCH Taxi埋点工具
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
object TaxiAnalyticsManager : OchAutopilotAnalytics() {
|
||||
object TaxiAnalyticsManager : IOchEventKey {
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
const val EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_taxi_ap_unable_start_reason"
|
||||
|
||||
@@ -9,8 +9,10 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonService
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.taxi.passenger.ui.TaxiPassengerBaseFragment
|
||||
import com.mogo.och.taxi.passenger.ui.statusview.StatusBarView
|
||||
import com.mogo.och.taxi.passenger.utils.TaxiPassengerAnalyticsManager
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -32,6 +34,8 @@ class TaxiPassengerProvider : CommonServiceImpl() {
|
||||
if (statusBarView == null) {
|
||||
statusBarView = StatusBarView(context)
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = TaxiPassengerAnalyticsManager
|
||||
|
||||
return statusBarView!!
|
||||
}
|
||||
|
||||
@@ -39,7 +43,8 @@ class TaxiPassengerProvider : CommonServiceImpl() {
|
||||
if(ochTaxiPassengerFragment==null){
|
||||
ochTaxiPassengerFragment = TaxiPassengerBaseFragment()
|
||||
}
|
||||
return ochTaxiPassengerFragment!!
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
return ochTaxiPassengerFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
|
||||
@@ -24,8 +24,8 @@ import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerBaseRespBean
|
||||
import com.mogo.och.taxi.passenger.bean.TaxiPassengerStartReqBean
|
||||
import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.taxi.passenger.network.TaxiPassengerServiceManager
|
||||
import com.mogo.och.taxi.passenger.utils.TaxiPassengerAnalyticsManager
|
||||
|
||||
object AutopilotManager : IOchAutopilotStatusListener {
|
||||
|
||||
@@ -42,7 +42,14 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
|
||||
fun startAutopilot():String {
|
||||
|
||||
TaxiPassengerAnalyticsManager.triggerClickStartAutopilotTime(System.currentTimeMillis())
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return "请等待结果后在重新启动"
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.triggerClickStartAutopilotTime(System.currentTimeMillis())
|
||||
|
||||
if (!checkCurrentOCHOrder()) {
|
||||
CallerLogger.e(
|
||||
@@ -76,10 +83,10 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
return "启动自动驾驶不满足条件"
|
||||
}
|
||||
//3、距离轨迹15m计算
|
||||
var resion = OchAutoPilotManager.canStartAutoPilot(TaxiPassengerModel.currentOCHOrder!!.lineId)
|
||||
var resion = OchAutoPilotManager.canStartAutoPilotByDistance(TaxiPassengerModel.currentOCHOrder!!.lineId)
|
||||
if(TrajectoryAndDistanceManager.errorTypeNoneLineId.equals(resion)){
|
||||
TaxiPassengerModel.setStation();
|
||||
resion = OchAutoPilotManager.canStartAutoPilot(TaxiPassengerModel.currentOCHOrder!!.lineId);
|
||||
resion = OchAutoPilotManager.canStartAutoPilotByDistance(TaxiPassengerModel.currentOCHOrder!!.lineId);
|
||||
}
|
||||
if (!StringUtils.isEmpty(resion)) {
|
||||
ToastUtils.showShort(resion)
|
||||
@@ -88,7 +95,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
}
|
||||
// 4、ssm 给出数据
|
||||
if (!OchAutoPilotManager.canStartAutoPilotSSM()) {
|
||||
TaxiPassengerAnalyticsManager.triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.triggerUnableStartAPReasonEvent(
|
||||
TaxiPassengerModel.currentOCHOrder!!.startSiteAddr,
|
||||
TaxiPassengerModel.currentOCHOrder!!.endSiteAddr,
|
||||
TaxiPassengerModel.currentOCHOrder!!.lineId.toString(),
|
||||
@@ -119,7 +126,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
+ " ,startSiteName=" + TaxiPassengerModel.currentOCHOrder!!.startSiteAddr
|
||||
+ " ,endSiteName=" + TaxiPassengerModel.currentOCHOrder!!.endSiteAddr
|
||||
)
|
||||
TaxiPassengerAnalyticsManager.triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
false,
|
||||
false,
|
||||
TaxiPassengerModel.currentOCHOrder!!.startSiteAddr,
|
||||
@@ -128,7 +135,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderNo,
|
||||
System.currentTimeMillis()
|
||||
)
|
||||
TaxiPassengerAnalyticsManager.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -206,7 +213,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
if (TaxiPassengerModel.currentOCHOrder != null && TaxiPassengerModel.curOrderStatus === TaxiOrderStatusEnum.UserArriveAtStart) {
|
||||
TaxiPassengerAnalyticsManager.triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
false,
|
||||
true,
|
||||
TaxiPassengerModel.currentOCHOrder!!.startSiteAddr,
|
||||
|
||||
@@ -37,8 +37,8 @@ import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum
|
||||
import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum.Companion.valueOf
|
||||
import com.mogo.och.taxi.passenger.network.TaxiPassengerServiceManager
|
||||
import com.mogo.och.common.module.biz.order.OrderModel
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.data.taxi.OrderQueryRouteInfoRespBean
|
||||
import com.mogo.och.taxi.passenger.utils.TaxiPassengerAnalyticsManager
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
@@ -232,7 +232,7 @@ object TaxiPassengerModel {
|
||||
|
||||
private val mAdasStartFailureListener: OchAdasStartFailureCallback = object : OchAdasStartFailureCallback {
|
||||
override fun onStartAutopilotFailure(startFailedCode: String, startFailedMessage: String) {
|
||||
TaxiPassengerAnalyticsManager.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis())
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis())
|
||||
}
|
||||
|
||||
override fun brakeStatusChanged(isBrakeAvailable: Boolean) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.taxi.passenger.utils
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey
|
||||
import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst
|
||||
|
||||
/**
|
||||
@@ -8,7 +8,7 @@ import com.mogo.och.taxi.passenger.constant.TaxiPassengerConst
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
object TaxiPassengerAnalyticsManager: OchAutopilotAnalytics() {
|
||||
object TaxiPassengerAnalyticsManager: IOchEventKey {
|
||||
|
||||
|
||||
override fun getEventKeyStartService(): String {
|
||||
|
||||
@@ -7,7 +7,9 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.unmanned.taxi.ui.base.TaxiFragment
|
||||
import com.mogo.och.unmanned.taxi.utils.TaxiAnalyticsManager
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -31,11 +33,13 @@ class TaxiUnmannedDriverProvider : CommonServiceImpl() {
|
||||
if(ochTaxiFragment==null){
|
||||
ochTaxiFragment = TaxiFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = TaxiAnalyticsManager.getInstance()
|
||||
return ochTaxiFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
CallerLogger.d(SceneConstant.M_TAXI + tag, "resetFragment")
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
ochTaxiFragment = null
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,12 @@ data class OrderDetail(
|
||||
result = 31 * result + planningLines.contentHashCode()
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "OrderDetail(orderStartSite=$orderStartSite, orderEndSite=$orderEndSite, planningLines=${planningLines.contentToString()}, bookingUserPhone='$bookingUserPhone', passengerSize=$passengerSize, fullMinutes=$fullMinutes, fullMileage=$fullMileage, orderLine=$orderLine)"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
data class Site(
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.mogo.och.common.module.manager.autopilot.autopilot.bean.ArrivedStatio
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchAutopilotStatusListener
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||
import com.mogo.och.common.module.manager.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.common.module.manager.distance.IDistanceListener
|
||||
@@ -76,7 +77,6 @@ import com.mogo.och.unmanned.taxi.constant.TaxiUnmannedConst.Companion.BUSINESST
|
||||
import com.mogo.och.unmanned.taxi.network.TaxiTaskWithOrderServiceManager
|
||||
import com.mogo.och.unmanned.taxi.ui.debug.DebugView
|
||||
import com.mogo.och.unmanned.taxi.utils.RxJavaUtils
|
||||
import com.mogo.och.unmanned.taxi.utils.TaxiAnalyticsManager
|
||||
import com.mogo.och.unmanned.taxi.utils.TaxiTrajectoryManager
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
@@ -306,7 +306,7 @@ object TaxiTaskModel {
|
||||
DebugView.printInfoMsg("[自驾状态变化] afterValue=STATUS_AUTOPILOT_RUNNING,meaning=自动驾驶中")
|
||||
mADASStatusCallback?.onAutopilotRunning(CallerAutoPilotControlManager.isCanStartAutopilot(false))
|
||||
if ((QueryCurrentTaskRespBean.isTaskStartTaskType(mCurrentTaskWithOrder))) {
|
||||
TaxiAnalyticsManager.getInstance().triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
isRestartAutopilot,
|
||||
true,
|
||||
mCurrentTaskWithOrder!!.order!!.orderStartSite!!.siteName,
|
||||
@@ -485,7 +485,7 @@ object TaxiTaskModel {
|
||||
startFailedMessage: String
|
||||
) {
|
||||
DebugView.printErrorMsg("[启自驾] 执行失败,code=$startFailedCode, msg=$startFailedMessage")
|
||||
TaxiAnalyticsManager.getInstance().triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis())
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailureEventByAdas(startFailedCode, startFailedMessage,System.currentTimeMillis())
|
||||
if (mADASStatusCallback != null && !FunctionBuildConfig.isDemoMode) {
|
||||
e(
|
||||
TAG,
|
||||
@@ -1227,7 +1227,14 @@ object TaxiTaskModel {
|
||||
|
||||
fun startAutoPilot() {
|
||||
|
||||
TaxiAnalyticsManager.getInstance().triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.triggerClickStartAutopilotTime(System.currentTimeMillis());
|
||||
|
||||
DebugView.printInfoMsg("[启自驾] startAutoPilot")
|
||||
if (!checkCurrentTaskCondition()) {
|
||||
@@ -1269,7 +1276,7 @@ object TaxiTaskModel {
|
||||
}
|
||||
// 3、距离轨迹15m计算
|
||||
mCurrentTaskWithOrder?.let {
|
||||
var resion = OchAutoPilotManager.canStartAutoPilot(it.lineId)
|
||||
var resion = OchAutoPilotManager.canStartAutoPilotByDistance(it.lineId)
|
||||
if (TrajectoryAndDistanceManager.errorTypeNoneLineId == resion) {
|
||||
val curTaskAndOrder = getCurrentTaskWithOrder()
|
||||
if (curTaskAndOrder!=null) {
|
||||
@@ -1288,7 +1295,7 @@ object TaxiTaskModel {
|
||||
)
|
||||
}
|
||||
}
|
||||
resion = OchAutoPilotManager.canStartAutoPilot(it.lineId)
|
||||
resion = OchAutoPilotManager.canStartAutoPilotByDistance(it.lineId)
|
||||
}
|
||||
if(!StringUtils.isEmpty(resion)){
|
||||
ToastUtils.showShort(resion);
|
||||
@@ -1300,7 +1307,7 @@ object TaxiTaskModel {
|
||||
if (!OchAutoPilotManager.canStartAutoPilotSSM()) {
|
||||
DebugView.printErrorMsg("[启自驾] ${OCHAdasAbilityManager.getInstance().autopilotUnAbilityReason}")
|
||||
val orderNo = mCurrentTaskWithOrder?.order?.orderNo
|
||||
TaxiAnalyticsManager.getInstance().triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.triggerUnableStartAPReasonEvent(
|
||||
mCurrentTaskWithOrder!!.startSite!!.siteName,
|
||||
mCurrentTaskWithOrder!!.endSite!!.siteName,
|
||||
mCurrentTaskWithOrder!!.lineId.toString(), // todo 这里原来传的是订单号, 现在是任务没有订单号,传了路线id
|
||||
@@ -1328,7 +1335,7 @@ object TaxiTaskModel {
|
||||
+ " ,endSiteName=" + mCurrentTaskWithOrder?.endSite?.siteName
|
||||
+ "isRestartAutopilot = " + isRestartAutopilot
|
||||
)
|
||||
TaxiAnalyticsManager.getInstance().triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
isRestartAutopilot,
|
||||
false,
|
||||
mCurrentTaskWithOrder!!.startSite!!.siteName,
|
||||
@@ -1337,7 +1344,7 @@ object TaxiTaskModel {
|
||||
if (mCurrentTaskWithOrder!!.order != null) mCurrentTaskWithOrder!!.order!!.orderNo else "",
|
||||
System.currentTimeMillis()
|
||||
)
|
||||
TaxiAnalyticsManager.getInstance().triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
mControllerStatusCallback?.startOpenAutopilot()
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ package com.mogo.och.unmanned.taxi.utils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics;
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey;
|
||||
|
||||
/**
|
||||
* OCH Taxi埋点工具
|
||||
* <p>
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
public class TaxiAnalyticsManager extends OchAutopilotAnalytics {
|
||||
public class TaxiAnalyticsManager implements IOchEventKey {
|
||||
|
||||
// 埋点key:开启自动驾驶前已识别的异常,会导致无法开启自驾
|
||||
private static final String EVENT_KEY_AP_UNABLE_START_REASON = "event_key_och_taxi_ap_unable_start_reason";
|
||||
|
||||
@@ -8,8 +8,10 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.biz.provider.CommonServiceImpl
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.unmanned.passenger.ui.TaxiPassengerBaseFragment
|
||||
import com.mogo.och.taxi.passenger.ui.statusview.StatusBarView
|
||||
import com.mogo.och.unmanned.passenger.utils.TaxiPassengerAnalyticsManager
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,11 +42,13 @@ class TaxiUnmannedPassengerProvider : CommonServiceImpl() {
|
||||
if(ochTaxiPassengerFragment==null){
|
||||
ochTaxiPassengerFragment = TaxiPassengerBaseFragment()
|
||||
}
|
||||
OchAutopilotAnalytics.ochEventKey = TaxiPassengerAnalyticsManager
|
||||
return ochTaxiPassengerFragment!!
|
||||
}
|
||||
|
||||
override fun resetFragment() {
|
||||
super.resetFragment()
|
||||
OchAutopilotAnalytics.ochEventKey = null
|
||||
ochTaxiPassengerFragment = null
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutoPilotStatus
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.unmanned.passenger.bean.TaxiPassengerBaseRespBean
|
||||
import com.mogo.och.unmanned.passenger.constant.TaxiPassengerConst
|
||||
import com.mogo.och.unmanned.passenger.network.TaxiPassengerServiceManager
|
||||
@@ -42,7 +43,14 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
|
||||
fun startAutopilot():String {
|
||||
|
||||
TaxiPassengerAnalyticsManager.triggerClickStartAutopilotTime(System.currentTimeMillis())
|
||||
/**
|
||||
* 存在Session
|
||||
*/
|
||||
if (!OchAutoPilotManager.canStartAutopilotBySessionId()) {
|
||||
return "请等待结果后在重新启动"
|
||||
}
|
||||
|
||||
OchAutopilotAnalytics.triggerClickStartAutopilotTime(System.currentTimeMillis())
|
||||
|
||||
if (!checkCurrentOCHOrder()) {
|
||||
CallerLogger.e(
|
||||
@@ -82,7 +90,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
}
|
||||
// 4、ssm 给出数据
|
||||
if (!OchAutoPilotManager.canStartAutoPilotSSM()) {
|
||||
TaxiPassengerAnalyticsManager.triggerUnableStartAPReasonEvent(
|
||||
OchAutopilotAnalytics.triggerUnableStartAPReasonEvent(
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderStartSite.siteName,
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName,
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderLine.toString(),
|
||||
@@ -108,7 +116,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
+ " ,endSiteName=" + TaxiPassengerModel.currentOCHOrder!!.orderEndSite.siteName
|
||||
)
|
||||
val lineId = TaxiPassengerModel.currentLineId?:-1
|
||||
TaxiPassengerAnalyticsManager.triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
false,
|
||||
false,
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderStartSite.siteName,
|
||||
@@ -117,7 +125,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderNo,
|
||||
System.currentTimeMillis()
|
||||
)
|
||||
TaxiPassengerAnalyticsManager.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
OchAutopilotAnalytics.triggerUpdateStartAutoPilotSessionId(sessionId)
|
||||
needSpeakByStartAutopilot = true
|
||||
return ""
|
||||
}
|
||||
@@ -200,7 +208,7 @@ object AutopilotManager : IOchAutopilotStatusListener {
|
||||
when (state) {
|
||||
IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING -> {
|
||||
if (TaxiPassengerModel.currentOCHOrder != null && TaxiPassengerModel.curOrderStatus === TaxiOrderStatusEnum.UserArriveAtStart) {
|
||||
TaxiPassengerAnalyticsManager.triggerStartAutopilotEvent(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotEvent(
|
||||
false,
|
||||
true,
|
||||
TaxiPassengerModel.currentOCHOrder!!.orderStartSite.siteName,
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum
|
||||
import com.mogo.och.common.module.biz.order.TaxiOrderStatusEnum.Companion.valueOf
|
||||
import com.mogo.och.common.module.biz.order.OrderModel
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.data.taxi.QueryCarOrderByNoRespBean
|
||||
import com.mogo.och.unmanned.passenger.bean.TaxiPassengerBaseRespBean
|
||||
import com.mogo.och.unmanned.passenger.bean.TaxiPassengerGetTrajectoryByLineIdRespBean
|
||||
@@ -344,7 +345,7 @@ object TaxiPassengerModel {
|
||||
startFailedCode: String,
|
||||
startFailedMessage: String
|
||||
) {
|
||||
TaxiPassengerAnalyticsManager.triggerStartAutopilotFailureEventByAdas(
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailureEventByAdas(
|
||||
startFailedCode,
|
||||
startFailedMessage,
|
||||
System.currentTimeMillis()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.mogo.och.unmanned.passenger.utils
|
||||
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.OchAutopilotAnalytics
|
||||
import com.mogo.och.common.module.manager.autopilot.autopilot.IOchEventKey
|
||||
|
||||
/**
|
||||
* OCH Taxi埋点工具
|
||||
*
|
||||
* Created on 2022/3/24
|
||||
*/
|
||||
object TaxiPassengerAnalyticsManager: OchAutopilotAnalytics() {
|
||||
object TaxiPassengerAnalyticsManager: IOchEventKey {
|
||||
|
||||
override fun getEventKeyStartService(): String {
|
||||
return "event_key_unmanned_taxi_start_service"
|
||||
|
||||
Reference in New Issue
Block a user