[2.13.2] add mock data of ai identify
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.mogo.eagle.core.function.business.ai
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.cloud.socket.entity.SocketDownData
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.realtime.api.MoGoAiCloudRealTime
|
||||
import com.mogo.realtime.socket.IMogoCloudOnMsgListener
|
||||
|
||||
class AiCloudIdentifyData{
|
||||
|
||||
companion object{
|
||||
private const val TAG = "AiCloudIdentifyData"
|
||||
|
||||
@JvmStatic
|
||||
val aiCloudIdentifyData by lazy(LazyThreadSafetyMode.SYNCHRONIZED){
|
||||
AiCloudIdentifyData()
|
||||
}
|
||||
}
|
||||
|
||||
fun init(mContext:Context){
|
||||
//todo emArrow
|
||||
MoGoAiCloudRealTime.startRealTime(mContext, DebugConfig.getSocketAppId())
|
||||
MoGoAiCloudRealTime.registerOnMsgListener(object :IMogoCloudOnMsgListener {
|
||||
override fun onMsgSend(id: Long) {
|
||||
}
|
||||
|
||||
override fun onMsgReceived(mogoSnapshotSetData: SocketDownData.LauncherSnapshotProto?) {
|
||||
mogoSnapshotSetData?.let {
|
||||
CallerLogger.d(TAG,"mogoSnapshotSetData : $mogoSnapshotSetData")
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,12 +9,14 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
|
||||
import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
|
||||
import com.mogo.eagle.core.function.api.map.hd.IMoGoMapFragmentProvider;
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener;
|
||||
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyData;
|
||||
import com.mogo.eagle.core.function.business.identify.MapIdentifySubscriber;
|
||||
import com.mogo.eagle.core.function.business.MapPointCloudSubscriber;
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.MogoRouteOverlayManager;
|
||||
@@ -191,6 +193,7 @@ public class MapFragment extends MvpFragment<MapView, MapPresenter>
|
||||
MapIdentifySubscriber.Companion.getInstance();
|
||||
MogoRouteOverlayManager.getInstance().init();
|
||||
MapPointCloudSubscriber.Companion.getInstance();
|
||||
AiCloudIdentifyData.Companion.getAiCloudIdentifyData().init(AbsMogoApplication.getApp());
|
||||
}
|
||||
|
||||
private void queryInfStructure() {
|
||||
|
||||
@@ -41,7 +41,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.mogoaicloudrealtime
|
||||
api rootProject.ext.dependencies.mogoaicloudrealtime
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
|
||||
@@ -58,9 +58,6 @@ public class MogoServices implements IMogoIntentListener {
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
mContext.sendBroadcast(intent);
|
||||
|
||||
// if (DebugConfig.isNeedUploadCoordinatesDurationInTime()) {
|
||||
// MoGoAiCloudRealTime.startRealTime(mContext, DebugConfig.getSocketAppId());
|
||||
// }
|
||||
}
|
||||
|
||||
private void registerMogoReceiver(Context context) {
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package mogo.yycp.service;
|
||||
option java_package = "mogo.yycp.api.proto";
|
||||
option java_outer_classname = "SocketDownData";
|
||||
/*
|
||||
message xxx {
|
||||
// 字段规则:required -> 字段只能也必须出现 1 次
|
||||
// 字段规则:optional -> 字段可出现 0 次或1次
|
||||
// 字段规则:repeated -> 字段可出现任意多次(包括 0)
|
||||
// 类型:int32、int64、sint32、sint64、string、32-bit ....
|
||||
// 字段编号:0 ~ 536870911(除去 19000 到 19999 之间的数字)
|
||||
字段规则 类型 名称 = 字段编号;
|
||||
}
|
||||
*/
|
||||
//返回车机主实体
|
||||
message SocketDownDataProto {
|
||||
uint64 seq = 1;
|
||||
uint32 msgType = 2;
|
||||
string sn = 3;
|
||||
LauncherSnapshotProto data = 4;
|
||||
uint64 utcTime = 5;
|
||||
uint64 upUtcTime = 6;
|
||||
string cityCode = 7;
|
||||
}
|
||||
|
||||
//LauncherSnapshot数据响应VO
|
||||
message LauncherSnapshotProto {
|
||||
//总数据集合 RoadDataVo
|
||||
repeated CloudRoadDataProto allList = 1;
|
||||
//前方50米数据集合 RoadDataVo
|
||||
repeated CloudRoadDataProto nearList = 2;
|
||||
//摄像头 RoadDataVo
|
||||
CloudRoadDataProto camera = 3;
|
||||
string msgId = 4;
|
||||
uint64 time = 5;
|
||||
//过期时间
|
||||
uint64 expire = 6;
|
||||
}
|
||||
//RoadDataVo
|
||||
message CloudRoadDataProto {
|
||||
/**物体类型 1-人 2-自行车 3-小轿车 4-摩托车 5-红绿灯 6-bus 8-truck 9-路边摄像头*/
|
||||
uint32 type = 1;
|
||||
/**数据来源 1,"自车数据" 2,"ADAS数据" 3,"路测设备识别数据" */
|
||||
uint32 fromType = 2;
|
||||
/**
|
||||
* 车机上行pgs坐标给lat,lon两个成员变量
|
||||
*
|
||||
* 在下发车机时计算高德经纬度
|
||||
* 1.将gps(lat,lon)给wgslat,wgalon
|
||||
* 2.高德算法算出高德经纬度,给lat,lon
|
||||
*/
|
||||
double lat = 3; //gps->gd
|
||||
double lon = 4; //gps->gd
|
||||
double wgslat = 5; //原gps
|
||||
double wgslon = 6; //原gps
|
||||
//车机sn
|
||||
string sn = 7;
|
||||
//车辆UUID
|
||||
string uuid = 8;
|
||||
/** 车牌号 */
|
||||
string cardId = 9;
|
||||
/**速度*/
|
||||
double speed = 10;
|
||||
/**方向*/
|
||||
double heading = 11;
|
||||
/** 系统时间 */
|
||||
uint64 systemTime = 12;
|
||||
/** 星历时间 */
|
||||
uint64 satelliteTime = 13;
|
||||
/**红绿灯状态 1红 2绿 3黄*/
|
||||
uint32 lightStatus = 14;
|
||||
/**红绿灯剩余时间 读秒*/
|
||||
uint32 lightLeftTime = 15;
|
||||
/**视频流直播地址*/
|
||||
string rtmpUrl = 16;
|
||||
/**距离*/
|
||||
double distance = 17;
|
||||
}
|
||||
Reference in New Issue
Block a user