Merge branch 'dev_arch_opt_3.0' into dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0
This commit is contained in:
@@ -4,6 +4,7 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -20,6 +21,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
@@ -434,6 +436,7 @@ public class BusFragment extends BaseBusTabFragment<BusFragment, BusPresenter>
|
||||
}
|
||||
|
||||
//清除鹰眼右下角小地图轨迹
|
||||
CallerLogger.INSTANCE.d(SceneConstant.M_MAP, "clearBusStationsMarkers --------->");
|
||||
smallMapView.clearPolyline();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.och.bus.model;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||
|
||||
@@ -2,6 +2,18 @@ import java.text.SimpleDateFormat
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
// 定义当前gradle文件的全局变量
|
||||
ext {
|
||||
//主版本号
|
||||
MAJOR_VERSION = 1
|
||||
//次版本号
|
||||
MINOR_VERSION = 0
|
||||
createFile()
|
||||
buildTimes = getBuildTime()
|
||||
isRelease = checkRelease()
|
||||
gitBranchName = getWorkingBranchName()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||
defaultConfig {
|
||||
@@ -9,8 +21,8 @@ android {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion 25
|
||||
multiDexEnabled true
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode increasedVersionCode()
|
||||
versionName increasedVersionName()
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
flavorDimensions "multi_device"
|
||||
|
||||
@@ -42,14 +54,46 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
//配置自定义打包名称
|
||||
applicationVariants.all { variant ->
|
||||
def buildTypeName = variant.buildType.name
|
||||
//println("buildTypeName-------->" + buildTypeName)
|
||||
variant.outputs.all {
|
||||
StringBuffer buffer = new StringBuffer()
|
||||
buffer.append(getProject().name)
|
||||
buffer.append("_")
|
||||
buffer.append(defaultConfig.versionName)
|
||||
buffer.append(".")
|
||||
buffer.append(buildTimes)
|
||||
buffer.append("_")
|
||||
buffer.append(gitBranchName)
|
||||
buffer.append("_")
|
||||
//获取渠道编号
|
||||
String flavor = variant.flavorName
|
||||
if (flavor != null && flavor != "") {
|
||||
buffer.append(flavor)
|
||||
buffer.append("_")
|
||||
}
|
||||
//获取打包时间
|
||||
def fileName = "${buffer.toString()}${buildTypeName}.apk"
|
||||
//测试文件名称
|
||||
buildConfigField 'String', 'APK_NAME', "\"${fileName}\""
|
||||
//println("fileName-------->" + fileName)
|
||||
//这里修改apk文件名
|
||||
outputFileName = fileName
|
||||
}
|
||||
}
|
||||
|
||||
//插入构建时间
|
||||
buildTypes.each {
|
||||
//设置时间格式
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd.HHmmss", Locale.getDefault())
|
||||
//获取当前时间
|
||||
Date curDate = new Date(System.currentTimeMillis())
|
||||
String buildTime = formatter.format(curDate)
|
||||
it.buildConfigField 'String', 'BUILD_TIME', "\"${buildTime}\""
|
||||
it.buildConfigField 'String', 'BUILD_TIME', "\"${buildTimes}\""
|
||||
it.buildConfigField 'String', 'GIT_BRANCH_NAME', "\"${gitBranchName}\""
|
||||
it.buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
it.buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
it.buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M1', 'null'
|
||||
it.buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M2', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
it.buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}'
|
||||
it.buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN', 'null'
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -64,12 +108,7 @@ android {
|
||||
driver {
|
||||
dimension "multi_device"
|
||||
buildConfigField 'boolean', 'IS_CLIENT', 'false'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_TAXI', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_BUS', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M1', 'null'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_M2', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_SWEEPER', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}'
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR_VAN', 'null'
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -103,3 +142,103 @@ dependencies {
|
||||
// implementation 'com.mogo.cloud:telematic:1.3.59'//注释掉司机端 乘客端
|
||||
implementation 'com.jcraft:jsch:0.1.55'
|
||||
}
|
||||
|
||||
// 删除老的APK
|
||||
def checkRelease() {
|
||||
def runTasks = gradle.startParameter.taskNames
|
||||
for (String task : runTasks) {
|
||||
// 我这里认为执行“assembleRelease”和非“debug”的任务就是执行“release”的任务
|
||||
if (task.contains("assembleRelease") || task.contains("Release")) {
|
||||
deleteOldAPK("release")
|
||||
return true
|
||||
} else if (task.contains("Debug")) {
|
||||
deleteOldAPK("debug")
|
||||
return false
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
//在Moudle 根目录中创建gradle.properties文件存储VersionCode
|
||||
def createFile() {
|
||||
def propFile = file('./gradle.properties')
|
||||
Properties props = new Properties()
|
||||
if (!propFile.exists()) {
|
||||
propFile.createNewFile()
|
||||
props.load(new FileInputStream(propFile))
|
||||
props['VERSION_CODE'] = '1'
|
||||
props.store(propFile.newWriter(), null)
|
||||
} else {
|
||||
props.load(new FileInputStream(propFile))
|
||||
def code = props['VERSION_CODE']
|
||||
if (code == null || code == "0") {
|
||||
props['VERSION_CODE'] = '1'
|
||||
props.store(propFile.newWriter(), null)
|
||||
}
|
||||
}
|
||||
}
|
||||
//读取VersionCode
|
||||
def readVersionCode() {
|
||||
def propFile = file('./gradle.properties')
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(propFile))
|
||||
// 读取gradle.properties文件中定义的VERSION_CODE属性
|
||||
def code = props['VERSION_CODE'].toInteger()
|
||||
//def code = props.getProperty('VERSION_CODE').toInteger()
|
||||
return code
|
||||
}
|
||||
//当打包的是Release版本时自动更新VersionCode
|
||||
def increasedVersionCode() {
|
||||
def code = readVersionCode()
|
||||
//println("isRelease====" + isRelease)
|
||||
if (isRelease) {
|
||||
code++
|
||||
def propFile = file('./gradle.properties')
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(propFile))
|
||||
props['VERSION_CODE'] = code.toString()
|
||||
// 将最新的versionCode写入gradle.properties文件中
|
||||
props.store(propFile.newWriter(), null)
|
||||
}
|
||||
return code
|
||||
}
|
||||
|
||||
//删除无用apk
|
||||
def deleteOldAPK(String buildTypeName) {
|
||||
|
||||
// 使用map创建一个树
|
||||
def tree = fileTree(dir: './build/outputs/apk', include: "${buildTypeName}/*.apk")
|
||||
//println("文件个数:" + tree.size())
|
||||
// 遍历文件树
|
||||
tree.each { File file ->
|
||||
//println("删除文件名称:" + file)
|
||||
file.delete()
|
||||
}
|
||||
}
|
||||
|
||||
def increasedVersionName() {
|
||||
def versionName = "${MAJOR_VERSION}.${MINOR_VERSION}.${readVersionCode()}"
|
||||
return versionName
|
||||
}
|
||||
|
||||
def getBuildTime() {
|
||||
//设置时间格式
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd.HHmmss", Locale.getDefault())
|
||||
//获取当前时间
|
||||
Date curDate = new Date(System.currentTimeMillis())
|
||||
return formatter.format(curDate)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return 获取当前分支名称
|
||||
*/
|
||||
def getWorkingBranchName() {
|
||||
def workingBranchName = ""
|
||||
def proc = "git rev-parse --abbrev-ref HEAD".execute()
|
||||
proc.in.eachLine { line -> workingBranchName = line }
|
||||
proc.err.eachLine { line -> println line }
|
||||
proc.waitFor()
|
||||
workingBranchName = "${workingBranchName}"
|
||||
println "Working branch name: " + workingBranchName
|
||||
return workingBranchName
|
||||
}
|
||||
2
app_ipc_monitoring/gradle.properties
Normal file
2
app_ipc_monitoring/gradle.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
#Wed Mar 01 12:23:40 CST 2023
|
||||
VERSION_CODE=1
|
||||
@@ -0,0 +1,326 @@
|
||||
package com.zhidao.adas.client;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.mogo.support.obu.MogoObuManager;
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.mogo.support.obu.constants.MogoObuConstants;
|
||||
import com.mogo.support.obu.constants.MogoObuTopicId;
|
||||
import com.mogo.support.obu.model.MogoObuHvBasicsData;
|
||||
import com.mogo.support.obu.model.MogoObuMapMathData;
|
||||
import com.mogo.support.obu.model.MogoObuRsiWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuRsmWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuSpatWarningData;
|
||||
import com.mogo.support.obu.model.advance.AccFourAxes;
|
||||
import com.mogo.support.obu.model.advance.DateTime;
|
||||
import com.mogo.support.obu.model.advance.NodeId;
|
||||
import com.mogo.support.obu.model.advance.Participant;
|
||||
import com.mogo.support.obu.model.advance.PositionLLV;
|
||||
import com.mogo.support.obu.model.advance.RsiWarning;
|
||||
import com.mogo.support.obu.model.advance.SpatLight;
|
||||
import com.mogo.support.obu.model.advance.V2xWarning;
|
||||
import com.mogo.support.obu.model.advance.VehBasics;
|
||||
import com.mogo.support.obu.model.advance.VehControl;
|
||||
import com.mogo.support.obu.model.advance.VehSize;
|
||||
import com.mogo.support.obu.model.advance.VerticalLLV;
|
||||
import com.mogo.support.obu.model.advance.WarningData;
|
||||
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
||||
import com.zhidao.support.obu.ObuManager;
|
||||
import com.zhidao.support.obu.OnObuListener;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* OBU SDK Java对象转PB对象测试
|
||||
*/
|
||||
public class ObuTest {
|
||||
|
||||
|
||||
public static void start() {
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ObuManager.getInstance().registerObuListener(listener);
|
||||
Class clazz = MogoObuManager.class;
|
||||
MogoObuManager mogoObuManager = MogoObuManager.getInstance();
|
||||
Method[] methods = clazz.getDeclaredMethods();
|
||||
for (Method m : methods) {
|
||||
String name = m.getName();
|
||||
if ("onObuCallback".equals(name)) {
|
||||
m.setAccessible(true);
|
||||
try {
|
||||
m.invoke(mogoObuManager, MogoObuTopicId.HV_BASIC.id, buildMogoObuHvBasicsData());
|
||||
m.invoke(mogoObuManager, MogoObuTopicId.RV_WARNING.id, buildMogoObuRvWarningData());
|
||||
m.invoke(mogoObuManager, MogoObuTopicId.SPAT_WARNING.id, buildMogoObuSpatWarningData());
|
||||
m.invoke(mogoObuManager, MogoObuTopicId.RSI_WARNING.id, buildMogoObuRsiWarningData());
|
||||
m.invoke(mogoObuManager, MogoObuTopicId.RSM_WARNING.id, buildMogoObuRsmWarningData());
|
||||
m.invoke(mogoObuManager, MogoObuTopicId.MAP_MATCH.id, buildMogoObuMapMathData());
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
ThreadPoolManager.getsInstance().execute(runnable);
|
||||
}
|
||||
|
||||
private static int have(int unitMask, int mask) {
|
||||
unitMask += mask;
|
||||
return unitMask;
|
||||
}
|
||||
|
||||
private static MogoObuHvBasicsData buildMogoObuHvBasicsData() {
|
||||
int vehBasicsUnitMask = 0;
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.ID);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.SEC_MARK);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.LATITUDE);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.LONGITUDE);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.ELEVATION);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.SPEED);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.HEADING);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.ACC_FOUR_AXES);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.VEH_SIZE);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.VEH_CLASS);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.VEH_CONTROL_MSG);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.TARGET_POSITION);
|
||||
VehBasics vehBasics = new VehBasics(vehBasicsUnitMask);
|
||||
vehBasics.setId("aaa");
|
||||
vehBasics.setLatitude(10000000);
|
||||
vehBasics.setLongitude(20000000);
|
||||
vehBasics.setElevation(2000);
|
||||
vehBasics.setSpeed(3000);
|
||||
vehBasics.setHeading(4000);
|
||||
vehBasics.setAccFourAxes(new AccFourAxes(200, 201, 202, 203));
|
||||
vehBasics.setVehSize(new VehSize(300, 301, 302));
|
||||
vehBasics.setVehClass(303);
|
||||
|
||||
int vehControlUnitMask = 0;
|
||||
vehControlUnitMask = have(vehControlUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_CONTROL.BRAKE_PEDAL_STATUS);
|
||||
vehControlUnitMask = have(vehControlUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_CONTROL.TRANSMISSION_STATUS);
|
||||
vehControlUnitMask = have(vehControlUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_CONTROL.EXTERIOR_LIGHTS);
|
||||
VehControl vehControl = new VehControl(vehControlUnitMask);
|
||||
vehControl.setBrakePedalStatus(401);
|
||||
vehControl.setTransmissionStatus(402);
|
||||
vehControl.setExteriorLights(403);
|
||||
vehBasics.setVehControlMsg(vehControl);
|
||||
vehBasics.setTargetPosition(8);
|
||||
MogoObuHvBasicsData data = new MogoObuHvBasicsData(1, vehBasics);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static MogoObuRvWarningData buildMogoObuRvWarningData() {
|
||||
int vehBasicsUnitMask = 0;
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.ID);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.SEC_MARK);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.LATITUDE);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.LONGITUDE);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.ELEVATION);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.SPEED);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.HEADING);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.ACC_FOUR_AXES);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.VEH_SIZE);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.VEH_CLASS);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.VEH_CONTROL_MSG);
|
||||
vehBasicsUnitMask = have(vehBasicsUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_BASICS.TARGET_POSITION);
|
||||
VehBasics vehBasics = new VehBasics(vehBasicsUnitMask);
|
||||
vehBasics.setId("aaa");
|
||||
vehBasics.setLatitude(20000000);
|
||||
vehBasics.setLongitude(30000000);
|
||||
vehBasics.setElevation(4000);
|
||||
vehBasics.setSpeed(5000);
|
||||
vehBasics.setHeading(6000);
|
||||
vehBasics.setAccFourAxes(new AccFourAxes(700, 801, 902, 1003));
|
||||
vehBasics.setVehSize(new VehSize(1100, 1201, 1302));
|
||||
vehBasics.setVehClass(1403);
|
||||
|
||||
int vehControlUnitMask = 0;
|
||||
vehControlUnitMask = have(vehControlUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_CONTROL.BRAKE_PEDAL_STATUS);
|
||||
vehControlUnitMask = have(vehControlUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_CONTROL.TRANSMISSION_STATUS);
|
||||
vehControlUnitMask = have(vehControlUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_VEH_CONTROL.EXTERIOR_LIGHTS);
|
||||
VehControl vehControl = new VehControl(vehControlUnitMask);
|
||||
vehControl.setBrakePedalStatus(1501);
|
||||
vehControl.setTransmissionStatus(1602);
|
||||
vehControl.setExteriorLights(1703);
|
||||
vehBasics.setVehControlMsg(vehControl);
|
||||
vehBasics.setTargetPosition(18);
|
||||
|
||||
int v2xWarningUnitMask = 0;
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.WARNING_NUM);
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.WARNING_DATA);
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.WARNING_TIME);
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.DISTANCE);
|
||||
V2xWarning v2xWarning = new V2xWarning(v2xWarningUnitMask);
|
||||
|
||||
DateTime dateTime = new DateTime(19, 20, 21, 22, 23, 24, 25);
|
||||
List<WarningData> warningDatas = new ArrayList<>();
|
||||
int warningDataMask = 0;
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.STATUS);
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.WARNING_TYPE);
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.WARNING_LEVEL);
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.WARNING_PRIORITY);
|
||||
WarningData warningData1 = new WarningData(warningDataMask, 3);
|
||||
warningData1.setWarningType(26);
|
||||
warningData1.setWarningLevel(27);
|
||||
warningData1.setWarningPriority(28);
|
||||
warningDatas.add(warningData1);
|
||||
WarningData warningData2 = new WarningData(warningDataMask, 4);
|
||||
warningData2.setWarningType(29);
|
||||
warningData2.setWarningLevel(30);
|
||||
warningData2.setWarningPriority(31);
|
||||
warningDatas.add(warningData2);
|
||||
v2xWarning.setWarningNum(2);
|
||||
v2xWarning.setWarningData(warningDatas);
|
||||
v2xWarning.setWarningTime(dateTime);
|
||||
v2xWarning.setDistance(32);
|
||||
MogoObuRvWarningData data = new MogoObuRvWarningData(2, vehBasics, v2xWarning);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
private static MogoObuSpatWarningData buildMogoObuSpatWarningData() {
|
||||
List<SpatLight> lights = new ArrayList<>();
|
||||
lights.add(new SpatLight(35, 36, 37, 38, 39, 40));
|
||||
lights.add(new SpatLight(41, 42, 43, 44, 45, 46));
|
||||
lights.add(new SpatLight(47, 48, 49, 50, 51, 52));
|
||||
MogoObuSpatWarningData data = new MogoObuSpatWarningData(33, 34, 3, lights);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static MogoObuRsiWarningData buildMogoObuRsiWarningData() {
|
||||
List<RsiWarning> list = new ArrayList<>();
|
||||
int rsiWarningUnitMask = 0;
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.SCENE_TYPE);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.POSITION);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.SIGN_SERIAL_NUM);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.EVENT_SERIAL_NUM);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.SPEED_MAX_LIMIT);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.SPEED_MIN_LIMIT);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.EVENT_RADIUS);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.WARNING_LEVEL);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.TARGET_POSITION);
|
||||
rsiWarningUnitMask = have(rsiWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_RSI_WARNING.DISTANCE);
|
||||
RsiWarning rsiWarning1 = new RsiWarning(rsiWarningUnitMask);
|
||||
rsiWarning1.setSceneType(53);
|
||||
rsiWarning1.setPosition(new PositionLLV(7, 54, 55, new VerticalLLV(7, 56)));
|
||||
rsiWarning1.setSignSerialNum(57);
|
||||
rsiWarning1.setEventSerialNum(58);
|
||||
rsiWarning1.setSpeedMinLimit(59);
|
||||
rsiWarning1.setSpeedMaxLimit(60);
|
||||
rsiWarning1.setEventRadius(61);
|
||||
rsiWarning1.setWarningLevel(62);
|
||||
rsiWarning1.setTargetPosition(63);
|
||||
rsiWarning1.setDistance(64);
|
||||
list.add(rsiWarning1);
|
||||
|
||||
RsiWarning rsiWarning2 = new RsiWarning(rsiWarningUnitMask);
|
||||
rsiWarning2.setSceneType(65);
|
||||
rsiWarning2.setPosition(new PositionLLV(7, 66, 67, new VerticalLLV(7, 68)));
|
||||
rsiWarning2.setSignSerialNum(69);
|
||||
rsiWarning2.setEventSerialNum(70);
|
||||
rsiWarning2.setSpeedMinLimit(71);
|
||||
rsiWarning2.setSpeedMaxLimit(72);
|
||||
rsiWarning2.setEventRadius(73);
|
||||
rsiWarning2.setWarningLevel(74);
|
||||
rsiWarning2.setTargetPosition(75);
|
||||
rsiWarning2.setDistance(76);
|
||||
list.add(rsiWarning2);
|
||||
MogoObuRsiWarningData data = new MogoObuRsiWarningData(53, 2, list);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static MogoObuRsmWarningData buildMogoObuRsmWarningData() {
|
||||
Participant participant = new Participant(78, 79, 80, 81, 82, 83, 84, 85, 86, new AccFourAxes(87, 88, 89, 90), new VehSize(91, 92, 93), 94, 95);
|
||||
int v2xWarningUnitMask = 0;
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.WARNING_NUM);
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.WARNING_DATA);
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.WARNING_TIME);
|
||||
v2xWarningUnitMask = have(v2xWarningUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING.DISTANCE);
|
||||
V2xWarning v2xWarning = new V2xWarning(v2xWarningUnitMask);
|
||||
|
||||
DateTime dateTime = new DateTime(96, 97, 98, 99, 100, 101, 102);
|
||||
List<WarningData> warningDatas = new ArrayList<>();
|
||||
int warningDataMask = 0;
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.STATUS);
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.WARNING_TYPE);
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.WARNING_LEVEL);
|
||||
warningDataMask = have(warningDataMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_V2X_WARNING_DATA.WARNING_PRIORITY);
|
||||
WarningData warningData1 = new WarningData(warningDataMask, 3);
|
||||
warningData1.setWarningType(103);
|
||||
warningData1.setWarningLevel(104);
|
||||
warningData1.setWarningPriority(105);
|
||||
warningDatas.add(warningData1);
|
||||
WarningData warningData2 = new WarningData(warningDataMask, 4);
|
||||
warningData2.setWarningType(106);
|
||||
warningData2.setWarningLevel(107);
|
||||
warningData2.setWarningPriority(108);
|
||||
warningDatas.add(warningData2);
|
||||
v2xWarning.setWarningNum(2);
|
||||
v2xWarning.setWarningData(warningDatas);
|
||||
v2xWarning.setWarningTime(dateTime);
|
||||
v2xWarning.setDistance(109);
|
||||
MogoObuRsmWarningData data = new MogoObuRsmWarningData(77, participant, v2xWarning);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static MogoObuMapMathData buildMogoObuMapMathData() {
|
||||
int mogoObuMapMathDataUnitMask = 0;
|
||||
mogoObuMapMathDataUnitMask = have(mogoObuMapMathDataUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_MAP_MATH.CURRENT_NODE_ID);
|
||||
mogoObuMapMathDataUnitMask = have(mogoObuMapMathDataUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_MAP_MATH.UPSTREAM_NODE_ID);
|
||||
mogoObuMapMathDataUnitMask = have(mogoObuMapMathDataUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_MAP_MATH.MATCHING_LANE_ID);
|
||||
mogoObuMapMathDataUnitMask = have(mogoObuMapMathDataUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_MAP_MATH.SPEED_MAX_LIMIT);
|
||||
mogoObuMapMathDataUnitMask = have(mogoObuMapMathDataUnitMask, MogoObuConstants.UNIT_MASK.MOGO_OBU_MAP_MATH.SPEED_MIN_LIMIT);
|
||||
MogoObuMapMathData data = new MogoObuMapMathData(mogoObuMapMathDataUnitMask, 110);
|
||||
data.setCurrentNodeId(new NodeId(111,112));
|
||||
data.setUpstreamNodeId(new NodeId(113,114));
|
||||
data.setMatchingLaneId(115);
|
||||
data.setSpeedMaxLimit(116);
|
||||
data.setSpeedMinLimit(117);
|
||||
return data;
|
||||
}
|
||||
|
||||
private static OnObuListener listener = new OnObuListener() {
|
||||
@Override
|
||||
public void onConnectStatus(int connectStatus) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGnssInfo(MessagePad.GnssInfo gnssInfo) {
|
||||
Log.i("ddddd", "onGnssInfo=\n" + TextFormat.printer().escapingNonAscii(false).printToString(gnssInfo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuRvWarning(ObuScene.RvWarningData rvWarningData) {
|
||||
Log.i("ddddd", "onObuRvWarning=\n" + TextFormat.printer().escapingNonAscii(false).printToString(rvWarningData));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuSpatWarning(ObuScene.SpatWarningData spatWarningData) {
|
||||
Log.i("ddddd", "onObuSpatWarning=\n" + TextFormat.printer().escapingNonAscii(false).printToString(spatWarningData));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuRsiWarning(ObuScene.RsiWarningData rsiWarningData) {
|
||||
Log.i("ddddd", "onObuRsiWarning=\n" + TextFormat.printer().escapingNonAscii(false).printToString(rsiWarningData));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuRsmWarning(ObuScene.RsmWarningData rsmWarningData) {
|
||||
Log.i("ddddd", "onObuRsmWarning=\n" + TextFormat.printer().escapingNonAscii(false).printToString(rsmWarningData));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuMapMath(ObuScene.MapMatchData mapMatchData) {
|
||||
Log.i("ddddd", "onObuMapMath=\n" + TextFormat.printer().escapingNonAscii(false).printToString(mapMatchData));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -260,7 +260,10 @@ public class VersionFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
list.add(new Config("ADAS LIB版本:", AdasManager.getInstance().getAdasVersion()));
|
||||
list.add(new Config("APP版本:", BuildConfig.VERSION_NAME));
|
||||
list.add(new Config("APP构建时间:", BuildConfig.BUILD_TIME));
|
||||
list.add(new Config("GIT分支:", BuildConfig.GIT_BRANCH_NAME));
|
||||
list.add(new Config("APK名称:", BuildConfig.APK_NAME));
|
||||
adapter.setData(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import retrofit2.http.POST
|
||||
interface ILineUploadApi {
|
||||
|
||||
@Headers("Content-type:application/json;charset=UTF-8" )
|
||||
@POST( "" )
|
||||
@POST( "/yycp-data-center-service/carTrack/receiveCarTrack/" )
|
||||
fun uploadLineId(@Body lineId: LineUploadData): Observable<BaseData>
|
||||
|
||||
}
|
||||
@@ -53,20 +53,18 @@ import com.mogo.eagle.core.function.call.obu.CallerObuMapMathListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsiListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsmListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningSpatListenerManager
|
||||
import com.mogo.eagle.core.function.call.obucombine.CallerObuDcCombineListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
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.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
import function_state_management.FunctionStates
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo.v2x.ObuWarningEvent
|
||||
import mogo_msg.MogoReportMsg
|
||||
import perception.TrafficLightOuterClass
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
@@ -89,12 +87,12 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//车前引导线
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_TRAJECTORY,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAJECTORY,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onTrajectory(header: MessagePad.Header, trajectory: MessagePad.Trajectory?) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
@@ -106,16 +104,16 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//感知物体
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA_TRACKED,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_RECT_DATA,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onTrackedObjects(
|
||||
header: MessagePad.Header,
|
||||
trackedObjects: MessagePad.TrackedObjects
|
||||
header: MessagePad.Header,
|
||||
trackedObjects: MessagePad.TrackedObjects
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotIdentifyDataUpdate(trackedObjects.objsList as List<TrackedObject>?)
|
||||
@@ -124,12 +122,12 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//自车定位信息
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_GNSSINFO,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_GNSSINFO,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_STATE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo) {
|
||||
CallerChassisGnssListenerManager.invokeChassisGnssListener(gnssInfo)
|
||||
@@ -140,9 +138,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
//CallerMapUIServiceManager.getMapUIController()?.syncLocation2Map(gnssInfo)
|
||||
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLatLon(
|
||||
gnssInfo.satelliteTime,
|
||||
gnssInfo.longitude,
|
||||
gnssInfo.latitude
|
||||
gnssInfo.satelliteTime,
|
||||
gnssInfo.longitude,
|
||||
gnssInfo.latitude
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -158,14 +156,17 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param vehicleState 数据
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onVehicleState(header: MessagePad.Header, vehicleState: VehicleStateOuterClass.VehicleState?) {
|
||||
override fun onVehicleState(
|
||||
header: MessagePad.Header,
|
||||
vehicleState: VehicleStateOuterClass.VehicleState?
|
||||
) {
|
||||
if (vehicleState != null) {
|
||||
//转向灯数据
|
||||
CallerChassisLamplightListenerManager.invokeAutopilotLightSwitchData(vehicleState.light)
|
||||
@@ -191,9 +192,12 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
vehicleState.sweeperFutianCleanSystemState?.also { sweeperState ->
|
||||
val bytes: ByteArray = sweeperState.toByteArray()
|
||||
val cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates? = ChassisStatesOuterClass.SweeperFuTianTaskSystemStates.parseFrom(bytes)
|
||||
val cleanSystemState: ChassisStatesOuterClass.SweeperFuTianTaskSystemStates? =
|
||||
ChassisStatesOuterClass.SweeperFuTianTaskSystemStates.parseFrom(bytes)
|
||||
cleanSystemState?.let {
|
||||
CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanSystemState(it)
|
||||
CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanSystemState(
|
||||
it
|
||||
)
|
||||
}
|
||||
}
|
||||
//金旅M1
|
||||
@@ -214,14 +218,17 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param vehicleState 数据
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_VEHICLE,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_VEHICLE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onChassisStates(header: MessagePad.Header, chassisStates: ChassisStatesOuterClass.ChassisStates?) {
|
||||
override fun onChassisStates(
|
||||
header: MessagePad.Header,
|
||||
chassisStates: ChassisStatesOuterClass.ChassisStates?
|
||||
) {
|
||||
if (chassisStates != null) {
|
||||
chassisStates.bcmSystemStates?.let { bcmSystemStates ->
|
||||
bcmSystemStates.turnLightState?.let {
|
||||
@@ -260,7 +267,9 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
chassisStates.taskSystemStates?.let { taskSystemStates ->
|
||||
taskSystemStates.sweeperFutianTaskSystemStates?.let {
|
||||
//清扫车(福田)清扫控制系统状态
|
||||
CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanSystemState(it)
|
||||
CallerSweeperFutianCleanSystemListenerManager.invokeSweeperFutianCleanSystemState(
|
||||
it
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -270,16 +279,16 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//自动驾驶状态
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_STATUS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onAutopilotState(
|
||||
header: MessagePad.Header,
|
||||
autopilotState: MessagePad.AutopilotState?
|
||||
header: MessagePad.Header,
|
||||
autopilotState: MessagePad.AutopilotState?
|
||||
) {
|
||||
if (autopilotState != null) {
|
||||
//工控机模拟时间
|
||||
@@ -303,7 +312,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
AdasManager.getInstance().carConfig?.let {
|
||||
autopilotStatusInfo.dockVersion = it.dockVersion
|
||||
}
|
||||
CallerLogger.d("Upgrade", "origin = ${autopilotStatusInfo.connectStatus} -----now = ${AppConfigInfo.isConnectAutopilot} ")
|
||||
CallerLogger.d(
|
||||
"Upgrade",
|
||||
"origin = ${autopilotStatusInfo.connectStatus} -----now = ${AppConfigInfo.isConnectAutopilot} "
|
||||
)
|
||||
AppConfigInfo.isConnectAutopilot = autopilotStatusInfo.connectStatus
|
||||
AppConfigInfo.connectStatusDescribe = autopilotStatusInfo.connectStatusDescribe
|
||||
invokeAutoPilotStatus()
|
||||
@@ -313,16 +325,16 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//监控
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onReportMessage(
|
||||
header: MessagePad.Header,
|
||||
mogoReportMessage: MogoReportMsg.MogoReportMessage?
|
||||
header: MessagePad.Header,
|
||||
mogoReportMessage: MogoReportMsg.MogoReportMessage?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotGuardian(mogoReportMessage)
|
||||
@@ -331,28 +343,28 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//感知红绿灯
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_TRAFFIC_LIGHT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAFFIC_LIGHT,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_TRAFFIC_LIGHT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_TRAFFIC_LIGHT,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onPerceptionTrafficLight(
|
||||
header: MessagePad.Header?,
|
||||
trafficLights: TrafficLightOuterClass.TrafficLights?
|
||||
header: MessagePad.Header?,
|
||||
trafficLights: TrafficLightOuterClass.TrafficLights?
|
||||
) {
|
||||
if (trafficLights != null) {
|
||||
CallerAutopilotIdentifyListenerManager.invokeAutopilotPerceptionTrafficLight(
|
||||
trafficLights
|
||||
trafficLights
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
//他车轨迹预测
|
||||
override fun onPredictionObstacleTrajectory(
|
||||
header: MessagePad.Header?,
|
||||
predictionObjects: Prediction.mPredictionObjects?
|
||||
header: MessagePad.Header?,
|
||||
predictionObjects: Prediction.mPredictionObjects?
|
||||
) {
|
||||
//他车轨迹预测
|
||||
}
|
||||
@@ -364,16 +376,16 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//planning障碍物
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_OBJECTS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_OBJECTS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_OBJECTS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_OBJECTS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onPlanningObjects(
|
||||
header: MessagePad.Header?,
|
||||
planningObjects: MessagePad.PlanningObjects
|
||||
header: MessagePad.Header?,
|
||||
planningObjects: MessagePad.PlanningObjects
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotIdentifyPlanningObj(planningObjects.objsList as List<MessagePad.PlanningObject>)
|
||||
@@ -382,24 +394,24 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
// 自动驾驶设备基础信息请求
|
||||
override fun onBasicInfoReq(
|
||||
header: MessagePad.Header,
|
||||
basicInfoReq: MessagePad.BasicInfoReq?
|
||||
header: MessagePad.Header,
|
||||
basicInfoReq: MessagePad.BasicInfoReq?
|
||||
) {
|
||||
invokeAutopilotSNRequest()
|
||||
}
|
||||
|
||||
//工控机基础配置信息
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_CONFIG,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_CONFIG,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onCarConfigResp(
|
||||
header: MessagePad.Header,
|
||||
carConfigResp: MessagePad.CarConfigResp?
|
||||
header: MessagePad.Header,
|
||||
carConfigResp: MessagePad.CarConfigResp?
|
||||
) {
|
||||
if (carConfigResp != null) {
|
||||
AppConfigInfo.dockerVersion = carConfigResp.dockVersion
|
||||
@@ -413,34 +425,32 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//全局路径规划
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ROUTE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ROUTE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onGlobalPathResp(
|
||||
header: MessagePad.Header,
|
||||
globalPathResp: MessagePad.GlobalPathResp?
|
||||
header: MessagePad.Header,
|
||||
globalPathResp: MessagePad.GlobalPathResp?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeAutopilotRotting(globalPathResp)
|
||||
}
|
||||
invokeAutopilotRotting(globalPathResp)
|
||||
}
|
||||
|
||||
//数据采集,badCase
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onRecordResult(
|
||||
header: MessagePad.Header,
|
||||
recordPanel: RecordPanelOuterClass.RecordPanel?
|
||||
header: MessagePad.Header,
|
||||
recordPanel: RecordPanelOuterClass.RecordPanel?
|
||||
) {
|
||||
if (recordPanel != null) {
|
||||
invokeAutopilotRecordResult(recordPanel)
|
||||
@@ -462,34 +472,32 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
|
||||
//到站回调
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onArrivalNotification(
|
||||
header: MessagePad.Header,
|
||||
arrivalNotification: MessagePad.ArrivalNotification?
|
||||
header: MessagePad.Header,
|
||||
arrivalNotification: MessagePad.ArrivalNotification?
|
||||
) {
|
||||
if (HdMapBuildConfig.isMapLoaded) {
|
||||
invokeArriveAtStation(arrivalNotification)
|
||||
}
|
||||
invokeArriveAtStation(arrivalNotification)
|
||||
}
|
||||
|
||||
//状态查询应答
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_STATUS_QUERY_RESP,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_AUTOPILOT,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_STATUS_QUERY_RESP,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onStatusQueryResp(
|
||||
header: MessagePad.Header?,
|
||||
statusInfo: SystemStatusInfo.StatusInfo?
|
||||
header: MessagePad.Header?,
|
||||
statusInfo: SystemStatusInfo.StatusInfo?
|
||||
) {
|
||||
invokeAutopilotStatusRespByQuery(statusInfo)
|
||||
}
|
||||
@@ -498,8 +506,8 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* 数据采集配置应答
|
||||
*/
|
||||
override fun onRecordDataConfigResp(
|
||||
header: MessagePad.Header?,
|
||||
config: MessagePad.RecordDataConfig?
|
||||
header: MessagePad.Header?,
|
||||
config: MessagePad.RecordDataConfig?
|
||||
) {
|
||||
if (config != null) {
|
||||
invokeAutopilotRecordConfig(config)
|
||||
@@ -510,16 +518,16 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* planning决策状态, 透传
|
||||
*/
|
||||
@ChainLog(
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_ACTIONS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_ACTIONS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_ACTIONS,
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_PLANNING_ACTIONS,
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onPlanningActionMsg(
|
||||
header: MessagePad.Header?,
|
||||
planningActionMsg: MessagePad.PlanningActionMsg?
|
||||
header: MessagePad.Header?,
|
||||
planningActionMsg: MessagePad.PlanningActionMsg?
|
||||
) {
|
||||
planningActionMsg?.let {
|
||||
invokePNCActions(it)
|
||||
@@ -532,16 +540,23 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param header 头
|
||||
* @param spatWarningData 数据
|
||||
*/
|
||||
override fun onObuSpatWarning(header: MessagePad.Header?, spatWarningData: ObuScene.SpatWarningData?) {
|
||||
override fun onObuSpatWarning(
|
||||
header: MessagePad.Header?,
|
||||
spatWarningData: ObuScene.SpatWarningData?
|
||||
) {
|
||||
CallerObuWarningSpatListenerManager.invokeObuSpatWarning(spatWarningData!!)
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU RSI预警信息
|
||||
*
|
||||
* @param header 头
|
||||
* @param rsiWarningData 数据
|
||||
*/
|
||||
override fun onObuRsiWarning(header: MessagePad.Header?, rsiWarningData: ObuScene.RsiWarningData?) {
|
||||
override fun onObuRsiWarning(
|
||||
header: MessagePad.Header?,
|
||||
rsiWarningData: ObuScene.RsiWarningData?
|
||||
) {
|
||||
CallerObuWarningRsiListenerManager.invokeObuRsiWarning(rsiWarningData!!)
|
||||
}
|
||||
|
||||
@@ -551,9 +566,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param header 头
|
||||
* @param rsmWarningData 数据
|
||||
*/
|
||||
override fun onObuRsmWarning(header: MessagePad.Header?, rsmWarningData: ObuScene.RsmWarningData?) {
|
||||
override fun onObuRsmWarning(
|
||||
header: MessagePad.Header?,
|
||||
rsmWarningData: ObuScene.RsmWarningData?
|
||||
) {
|
||||
CallerObuWarningRsmListenerManager.invokeObuRsmWarning(rsmWarningData!!)
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU 地图匹配结果
|
||||
*
|
||||
@@ -570,7 +589,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param header 头
|
||||
* @param functionStates 头
|
||||
*/
|
||||
override fun onFunctionStates(header: MessagePad.Header?, functionStates: FunctionStates.FSMFunctionStates?) {
|
||||
override fun onFunctionStates(
|
||||
header: MessagePad.Header?,
|
||||
functionStates: FunctionStates.FSMFunctionStates?
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -580,7 +602,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param header 头
|
||||
* @param roboSweeperTaskIndex 数据
|
||||
*/
|
||||
override fun onSweeperTaskIndexData(header: MessagePad.Header?, roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex?) {
|
||||
override fun onSweeperTaskIndexData(
|
||||
header: MessagePad.Header?,
|
||||
roboSweeperTaskIndex: RoboSweeperTaskIndexOuterClass.RoboSweeperTaskIndex?
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
@@ -590,7 +615,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param header 头
|
||||
* @param bagManager 数据
|
||||
*/
|
||||
override fun onBagManagerCmd(header: MessagePad.Header?, bagManager: BagManagerOuterClass.BagManager?) {
|
||||
override fun onBagManagerCmd(
|
||||
header: MessagePad.Header?,
|
||||
bagManager: BagManagerOuterClass.BagManager?
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,10 +13,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuSaveMessageListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.*
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
|
||||
@@ -57,7 +54,6 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
|
||||
private var mObuStatusInfo = CallerObuConnectListenerManager.getObuStatusInfo()
|
||||
private var mContext: Context? = null
|
||||
var mVersionName: String? = null
|
||||
|
||||
fun connectObu(context: Context, obuIpAddress: String, padIpAddress: String) {
|
||||
ObuManager.getInstance().registerObuListener(mogoObuListener)
|
||||
@@ -113,7 +109,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
override fun onCurrentVersion(version: MogoObuSystemBConfigData) {
|
||||
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onCurrentVersion version = ${version.version}")
|
||||
if (!version.version.isNullOrEmpty()) {
|
||||
mVersionName = version.version
|
||||
CallerObuInfoListenerManager.invokeObuVersionName(version.version)
|
||||
CallerDevaToolsManager.queryObuUpgrade(version.version)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.mogo.commons.constants.HostConst;
|
||||
import com.mogo.eagle.core.data.bindingcar.UpgradeAppInfo;
|
||||
import com.mogo.eagle.core.data.obu.MogoObuConst;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -78,12 +79,15 @@ public class ObuUpgradeAppNetWorkManager {
|
||||
}
|
||||
} else {
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "getObuUpgradeInfo onNext info == null");
|
||||
CallerObuApiManager.INSTANCE.deleteObuFile();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
CallerLogger.INSTANCE.e(M_BINDING + TAG, "getObuUpgradeInfo e = " + e);
|
||||
//请求出错,需要删除相关文件
|
||||
CallerObuApiManager.INSTANCE.deleteObuFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,14 +4,17 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BIN
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.constants.HostConst;
|
||||
import com.mogo.eagle.core.data.bindingcar.UpgradeAppInfo;
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.breakpoint.Config;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils;
|
||||
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -72,15 +75,18 @@ public class UpgradeAppNetWorkManager {
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "UpgradeAppInfo url = " + info.result.getAppUrl() + "----code = " + info.result.getVersionCode() + "--versionCode =" + versionCode + "--info.result = " + info.result);
|
||||
if (info.result.getVersionCode() > versionCode) {
|
||||
CallerHmiManager.INSTANCE.showUpgradeDialog(info.result.getAppUrl().substring(info.result.getAppUrl().lastIndexOf("/")+1), info.result.getAppUrl(), info.result.getInstallTitle(), info.result.getInstallContent(), info.result.getInstallType());
|
||||
} else {
|
||||
deleteApkFile();
|
||||
}
|
||||
} else {
|
||||
CallerLogger.INSTANCE.d(M_BINDING + TAG, "UpgradeAppInfo onNext info == null");
|
||||
deleteApkFile();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
deleteApkFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,4 +96,16 @@ public class UpgradeAppNetWorkManager {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除APK 相关的文件
|
||||
*/
|
||||
private void deleteApkFile(){
|
||||
UiThreadHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
FileUtils.delete(Config.downLoadPath);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.mogo.eagle.core.function.api.autopilot.*
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuConnectListener
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuInfoListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
@@ -54,6 +55,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuInfoListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
|
||||
import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
@@ -107,7 +109,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
IMoGoChassisGearStateListener,
|
||||
IMoGoChassisBrakeStateListener,
|
||||
IMoGoChassisThrottleStateListener,
|
||||
IMoGoSweeperFutianCleanSystemListener {
|
||||
IMoGoSweeperFutianCleanSystemListener,
|
||||
IMoGoObuInfoListener {
|
||||
|
||||
private val TAG = "DebugSettingView"
|
||||
|
||||
@@ -139,6 +142,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
//OBU连接状态
|
||||
private var obuConnectStatus: Boolean = false
|
||||
private var mObuVersionName: String = ""
|
||||
private var mObuDeviceId: String = ""
|
||||
|
||||
//渠道包标签
|
||||
private var onlineSelected: Boolean = true
|
||||
@@ -217,6 +222,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//查询工控机基础配置信息
|
||||
CallerAutoPilotControlManager.getCarConfig()
|
||||
}
|
||||
|
||||
CallerObuInfoListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
@@ -244,7 +251,8 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||
// 移除 底盘灯光数据 监听
|
||||
CallerChassisLamplightListenerManager.removeListener(TAG)
|
||||
|
||||
// 移除 obu获取信息 监听
|
||||
CallerObuInfoListenerManager.removeListener(TAG)
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
|
||||
FuncBizConfig.FOUNDATION,
|
||||
@@ -410,13 +418,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
//展示OBU控制中心
|
||||
obuControllerLayout.visibility = View.VISIBLE
|
||||
tbVehicleStateController.isChecked = true
|
||||
|
||||
} else {
|
||||
buttonView.setCompoundDrawables(null, null, iconRight, null)
|
||||
//隐藏OBU控制中心
|
||||
obuControllerLayout.visibility = View.GONE
|
||||
tbVehicleStateController.isChecked = false
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1620,7 +1626,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tvRouteInfoSizeCopy.text =
|
||||
"全局路径规划点个数:${mRouteInfoSize}"
|
||||
|
||||
|
||||
// 用完之后重制为0,防止节点回掉突然没数据,导致页面显示还是之前的数据情况
|
||||
mIdentifyDataSize = 0
|
||||
mUnknownIdentifyDataSize = 0
|
||||
@@ -1635,13 +1640,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
|
||||
//obu TODO 后面会添加很多os那边需要显示的内容
|
||||
obuVersionNameTv.text = Html.fromHtml(
|
||||
"OBU版本号:${
|
||||
if (AppConfigInfo.isConnectObu) {
|
||||
"<font color='blue'> 1.0"
|
||||
} else {
|
||||
"<font color='red'>异常"
|
||||
}
|
||||
}"
|
||||
"OBU版本号:$mObuVersionName"
|
||||
)
|
||||
|
||||
obuConnectStatusTv.text = Html.fromHtml(
|
||||
@@ -1654,7 +1653,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}"
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2053,4 +2051,11 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
setLogCheckedChangeListener()
|
||||
}
|
||||
|
||||
override fun onGetObuVersionName(obuVersionName: String) {
|
||||
mObuVersionName = obuVersionName
|
||||
}
|
||||
|
||||
override fun onObuDeviceId(obuDeviceId: String) {
|
||||
mObuDeviceId = obuDeviceId
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package com.mogo.eagle.core.function.business.identify;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.util.ArraySet;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
@@ -50,7 +52,7 @@ public class TrackManager {
|
||||
* 记录每次实际绘制的交通元素UUID
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
private final ConcurrentHashMap<String, Long> trafficDataUuid = new ConcurrentHashMap<>();
|
||||
private final ArraySet<String> trafficDataUuid = new ArraySet<>();
|
||||
|
||||
/**
|
||||
* 过滤后的数据集合
|
||||
@@ -71,9 +73,10 @@ public class TrackManager {
|
||||
* 过滤后的数据集合
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized HashMap<String, MessagePad.TrackedObject> filterTrafficData(List<MessagePad.TrackedObject> trafficData) {
|
||||
public HashMap<String, MessagePad.TrackedObject> filterTrafficData(List<MessagePad.TrackedObject> trafficData) {
|
||||
//清空上次返回数据,做到缓存复用
|
||||
mFilterTrafficData.clear();
|
||||
long cost = System.currentTimeMillis();
|
||||
//进入过滤机制的感知物体,首先从缓存队列中进行查找 uuid
|
||||
for (MessagePad.TrackedObject data : trafficData) {
|
||||
if (TrackerSourceColorHelper.INSTANCE.filterData(data)) {
|
||||
@@ -121,35 +124,34 @@ public class TrackManager {
|
||||
mFilterTrafficData.put(uuid, trackObj.getCache());
|
||||
cellIdCaches.forcePut(uuid, trackObj.getCellIdPos());
|
||||
mMarkersCaches.put(uuid, trackObj);
|
||||
trafficDataUuid.put(uuid, System.currentTimeMillis());
|
||||
trafficDataUuid.add(uuid);
|
||||
Log.i("costTime","" + (System.currentTimeMillis() - cost));
|
||||
}
|
||||
return mFilterTrafficData;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
public void clearCache(List<MessagePad.TrackedObject> resultList) {
|
||||
//过滤现有元素
|
||||
for (MessagePad.TrackedObject data : resultList) {
|
||||
String uuid = "" + data.getUuid();
|
||||
if (TrackerSourceColorHelper.INSTANCE.filterData(data)) {
|
||||
continue;
|
||||
}
|
||||
if (trafficDataUuid.size() > 0) {
|
||||
if (trafficDataUuid.size() > 0 && trafficDataUuid.contains(uuid)) {
|
||||
if (TrackerSourceColorHelper.INSTANCE.filterData(data)) {
|
||||
continue;
|
||||
}
|
||||
trafficDataUuid.remove(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
//清除缓存,删除marker
|
||||
Iterator<Map.Entry<String, Long>> it = trafficDataUuid.entrySet().iterator();
|
||||
Iterator<String> it = trafficDataUuid.iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, Long> next = it.next();
|
||||
String key = next.getKey();
|
||||
String key = it.next();
|
||||
it.remove();
|
||||
removeKey(key);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void removeKey(String key) {
|
||||
public void removeKey(String key) {
|
||||
cellIdCaches.remove(key);
|
||||
mMarkersCaches.remove(key);
|
||||
WarningHelper.INSTANCE.remove(key);
|
||||
@@ -157,15 +159,12 @@ public class TrackManager {
|
||||
.removeMarker(key);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public void clearAll() {
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp()).clearAllMarker();
|
||||
cellIdCaches.clear();
|
||||
trafficDataUuid.clear();
|
||||
WarningHelper.INSTANCE.clear();
|
||||
mMarkersCaches.forEach((uuid, trackObj) -> {
|
||||
trackObj.clear();
|
||||
});
|
||||
mMarkersCaches.forEach((uuid, trackObj) -> trackObj.clear());
|
||||
mMarkersCaches.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
|
||||
@@ -103,6 +104,9 @@ public class MogoRouteOverlayManager implements
|
||||
if (arrivalNotification == null) {
|
||||
return;
|
||||
}
|
||||
if(!HdMapBuildConfig.isMapLoaded){
|
||||
return;
|
||||
}
|
||||
if (!isArriveAtStation.get()) {
|
||||
isArriveAtStation.set(true);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.widget.RelativeLayout
|
||||
@@ -131,12 +132,16 @@ class SmallMapView @JvmOverloads constructor(
|
||||
.color(Color.argb(255, 31, 127, 255))
|
||||
.width(12f)
|
||||
)
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView drawPolyline size is = ${mCoordinatesLatLng.size} ")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun clearPolyline() {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView clearPolyline mPolyline -----> ")
|
||||
if (mPolyline != null) {
|
||||
mPolyline!!.remove()
|
||||
}
|
||||
@@ -294,6 +299,8 @@ class SmallMapView @JvmOverloads constructor(
|
||||
"calculateDistance=$calculateDistance"
|
||||
)
|
||||
if (calculateDistance <= 5) {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "onChassisLocationGCJ02 -----> calculateDistance <= 5 ")
|
||||
clearPolyline()
|
||||
mCoordinatesLatLng.clear()
|
||||
}
|
||||
@@ -312,6 +319,8 @@ class SmallMapView @JvmOverloads constructor(
|
||||
val tempStatus = autoPilotStatusInfo.pilotmode
|
||||
if (tempStatus != 1) {
|
||||
UiThreadHandler.post {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "onAutopilotStatusResponse tempStatus = $tempStatus ---clearPolyline() ")
|
||||
clearPolyline()
|
||||
}
|
||||
} else if (tempStatus == 1 && autoPilotStatus == 0) {
|
||||
@@ -321,6 +330,8 @@ class SmallMapView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView globalPathResp = $globalPathResp")
|
||||
if (globalPathResp == null || globalPathResp.wayPointsList.size == 0) {
|
||||
return
|
||||
}
|
||||
@@ -328,6 +339,8 @@ class SmallMapView @JvmOverloads constructor(
|
||||
for (routeModel in globalPathResp.wayPointsList) {
|
||||
latLngList.add(MogoLatLng(routeModel.latitude, routeModel.longitude))
|
||||
}
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView latLngList.size = ${latLngList.size}")
|
||||
if (latLngList.size > 0) {
|
||||
UiThreadHandler.post {
|
||||
convert(latLngList)
|
||||
@@ -335,6 +348,8 @@ class SmallMapView @JvmOverloads constructor(
|
||||
}
|
||||
} else {
|
||||
UiThreadHandler.post {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_MAP + TAG, "SmallMapView latLngList.size = ${latLngList.size} clearPolyline ---->")
|
||||
clearPolyline()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,14 +352,18 @@ class OverMapView @JvmOverloads constructor(
|
||||
.icon(BitmapDescriptorFactory.fromResource(if (compassDrawable != -1) compassDrawable else R.drawable.amap_custom_corner))
|
||||
.anchor(0.5f, 0.5f)
|
||||
)
|
||||
mStartMarker = mAMap!!.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(if (startPointDrawable != -1) startPointDrawable else R.drawable.module_small_map_view_dir_start))
|
||||
)
|
||||
mEndMarker = mAMap!!.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(if (endPointDrawable != -1) endPointDrawable else R.drawable.module_small_map_view_dir_end))
|
||||
)
|
||||
if (startPointDrawable != -1) {
|
||||
mStartMarker = mAMap!!.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(startPointDrawable))
|
||||
)
|
||||
}
|
||||
if (endPointDrawable != -1) {
|
||||
mEndMarker = mAMap!!.addMarker(
|
||||
MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(endPointDrawable))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun handlePlanningData(locationList: List<MessagePad.Location>?) {
|
||||
@@ -605,20 +609,16 @@ class OverMapView @JvmOverloads constructor(
|
||||
* 绘制起始点、终点
|
||||
*/
|
||||
private fun drawStartAndEndMarker(coordinates: List<LatLng>) {
|
||||
if (mStartMarker != null) {
|
||||
mStartMarker!!.isVisible = false
|
||||
}
|
||||
if (mEndMarker != null) {
|
||||
mEndMarker!!.isVisible = false
|
||||
}
|
||||
mStartMarker?.isVisible = false
|
||||
mEndMarker?.isVisible = false
|
||||
if (coordinates.size > 2) {
|
||||
// 设置开始结束Marker位置
|
||||
val startLatLng = coordinates[0]
|
||||
val endLatLng = coordinates[coordinates.size - 1]
|
||||
mStartMarker!!.position = startLatLng
|
||||
mEndMarker!!.position = endLatLng
|
||||
mStartMarker!!.isVisible = true
|
||||
mEndMarker!!.isVisible = true
|
||||
mStartMarker?.position = startLatLng
|
||||
mEndMarker?.position = endLatLng
|
||||
mStartMarker?.isVisible = true
|
||||
mEndMarker?.isVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@ import android.content.Context
|
||||
import com.mogo.aicloud.services.locationinfo.MogoLocationInfoServices
|
||||
import com.mogo.aicloud.services.socket.IMogoLifecycleListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.cloud.httpdns.MogoHttpDnsConfig
|
||||
import com.mogo.cloud.httpdns.bean.HttpDnsSimpleLocation
|
||||
import com.mogo.cloud.httpdns.listener.IHttpDnsCurrentLocation
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.cloud.passport.location.ICurrentLocation
|
||||
import com.mogo.cloud.passport.location.SimpleLocation
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
@@ -85,10 +84,10 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
private fun preparePassportEnvironment() {
|
||||
// 设置网络环境:HTTP_DNS_ENV_QA、HTTP_DNS_ENV_RELEASE、HTTP_DNS_ENV_DEV
|
||||
when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV -> clientConfig.netMode = MogoHttpDnsConfig.HTTP_DNS_ENV_DEV
|
||||
DebugConfig.NET_MODE_QA -> clientConfig.netMode = MogoHttpDnsConfig.HTTP_DNS_ENV_QA
|
||||
DebugConfig.NET_MODE_DEMO -> clientConfig.netMode = MogoHttpDnsConfig.HTTP_DNS_ENV_DEMO
|
||||
else -> clientConfig.netMode = MogoHttpDnsConfig.HTTP_DNS_ENV_RELEASE
|
||||
DebugConfig.NET_MODE_DEV -> clientConfig.netMode = MoGoAiCloudClientConfig.HTTP_DNS_ENV_DEV
|
||||
DebugConfig.NET_MODE_QA -> clientConfig.netMode = MoGoAiCloudClientConfig.HTTP_DNS_ENV_QA
|
||||
DebugConfig.NET_MODE_DEMO -> clientConfig.netMode = MoGoAiCloudClientConfig.HTTP_DNS_ENV_DEMO
|
||||
else -> clientConfig.netMode = MoGoAiCloudClientConfig.HTTP_DNS_ENV_RELEASE
|
||||
}
|
||||
// 设置是否是第三APP登录
|
||||
clientConfig.isThirdLogin =
|
||||
@@ -128,13 +127,13 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
//设置长链接的secretKey 通过SHA1和包名找中台服务生成,后续包名分渠道,需要做对应操作
|
||||
clientConfig.secretKey = "YMj2VFDFxJ3Q4gNoZceJ"
|
||||
|
||||
clientConfig.iHttpDnsCurrentLocation = object : IHttpDnsCurrentLocation {
|
||||
override fun getCurrentLocation(): HttpDnsSimpleLocation {
|
||||
clientConfig.iHttpCurrentLocation = object : ICurrentLocation {
|
||||
override fun getCurrentLocation(): SimpleLocation {
|
||||
val envConfig = CallerDevaToolsManager.getEnvConfig()
|
||||
if (envConfig != null) {
|
||||
// 更新
|
||||
httpDnsSimpleLocation =
|
||||
HttpDnsSimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon)
|
||||
SimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon)
|
||||
return httpDnsSimpleLocation
|
||||
}
|
||||
val mogoLocation: MogoLocation? = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
@@ -144,14 +143,14 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
mogoLocation.cityCode.isNullOrEmpty() &&
|
||||
!CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode.isNullOrEmpty()
|
||||
) {
|
||||
HttpDnsSimpleLocation(
|
||||
SimpleLocation(
|
||||
CallerMapUIServiceManager.getGDLocationServer(context!!)?.lastCityCode
|
||||
?: "010",
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
)
|
||||
} else {
|
||||
HttpDnsSimpleLocation(
|
||||
SimpleLocation(
|
||||
mogoLocation.cityCode,
|
||||
mogoLocation.latitude,
|
||||
mogoLocation.longitude
|
||||
@@ -330,7 +329,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
MogoAiCloudSocketManager.getInstance(context).reConnect()
|
||||
}
|
||||
|
||||
private fun getDefaultSimpleLocation(): HttpDnsSimpleLocation {
|
||||
private fun getDefaultSimpleLocation(): SimpleLocation {
|
||||
val ciyCode =
|
||||
SharedPrefsMgr.getInstance(
|
||||
AbsMogoApplication.getApp()
|
||||
@@ -347,11 +346,11 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
)
|
||||
.getString(SharedPrefsConstants.LOCATION_LONGITUDE)
|
||||
return try {
|
||||
HttpDnsSimpleLocation(
|
||||
SimpleLocation(
|
||||
ciyCode, latitude.toDouble(), longitude.toDouble()
|
||||
)
|
||||
} catch (e: NumberFormatException) {
|
||||
HttpDnsSimpleLocation("010", 1.0, 1.0)
|
||||
SimpleLocation("010", 1.0, 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.eagle.core.function.api.obu
|
||||
|
||||
|
||||
/**
|
||||
* OBU 显示信息
|
||||
* @author lixiaopeng
|
||||
* @date 2023/2/28
|
||||
*/
|
||||
interface IMoGoObuInfoListener {
|
||||
|
||||
/**
|
||||
* @param obuVersionName OBU硬件版本
|
||||
*/
|
||||
fun onGetObuVersionName(obuVersionName: String)
|
||||
|
||||
/**
|
||||
* obuDeviceId
|
||||
*/
|
||||
fun onObuDeviceId(obuDeviceId: String)
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mogo.eagle.core.function.call.obu
|
||||
|
||||
import com.mogo.eagle.core.function.api.obu.IMoGoObuInfoListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 一些obu的信息,用于排查obu硬件问题
|
||||
*
|
||||
*/
|
||||
object CallerObuInfoListenerManager : CallerBase<IMoGoObuInfoListener>() {
|
||||
|
||||
fun invokeObuVersionName(obuVersionName: String) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onGetObuVersionName(obuVersionName)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeObuDeviceId(obuDeviceId: String) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onObuDeviceId(obuDeviceId)
|
||||
}
|
||||
}
|
||||
|
||||
// fun invokeQueryContainersResponse(dockerList: List<String>) {
|
||||
// M_LISTENERS.forEach {
|
||||
// val listener = it.value
|
||||
// //TODO
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -13,9 +13,15 @@ public class Config {
|
||||
public final static String downLoadPath = Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||
+ "/downloads/";
|
||||
|
||||
/**
|
||||
* OBU下载路径
|
||||
*/
|
||||
public final static String downLoadObuPath = Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||
+ "/obu/";
|
||||
|
||||
/**
|
||||
* OBU解压路径
|
||||
*/
|
||||
public final static String downLoadUnzipObuPath = Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||
+ "/obuunzip/";
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.aicloud.services.httpdns;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/11/18
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
@Keep
|
||||
public class HttpDnsConst {
|
||||
|
||||
@Keep
|
||||
public static final String PATH = "/httpdns/api";
|
||||
|
||||
public static final int HTTP_DNS_ADDRESS_TYPE_HTTP = 0;
|
||||
public static final int HTTP_DNS_ADDRESS_TYPE_WS = 1;
|
||||
public static final int HTTP_DNS_ADDRESS_TYPE_IM = 2;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.mogo.aicloud.services.httpdns;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/11/19
|
||||
*
|
||||
* dns 解析回调
|
||||
*/
|
||||
@Keep
|
||||
public interface IHttpDnsCallback {
|
||||
|
||||
@Keep
|
||||
void onParsed( @Nullable String ip );
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.mogo.aicloud.services.httpdns;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.cloud.httpdns.listener.OnAddressChangedListener;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/11/18
|
||||
* <p>
|
||||
* http 请求做http dns转换
|
||||
*/
|
||||
@Keep
|
||||
public interface IMogoHttpDns extends IProvider {
|
||||
|
||||
/**
|
||||
* 获取缓存中的dns ip地址
|
||||
*
|
||||
* @param host domain
|
||||
* @param type 类型
|
||||
* @return
|
||||
*/
|
||||
@Keep
|
||||
String getCachedHttpDnsIps(String host, int type);
|
||||
|
||||
/**
|
||||
* dns解析
|
||||
*
|
||||
* @param host
|
||||
* @param type
|
||||
* @param useCache
|
||||
* @param callback
|
||||
*/
|
||||
@Keep
|
||||
void getHttpDnsIp(String host, int type, boolean useCache, IHttpDnsCallback callback);
|
||||
|
||||
/**
|
||||
* 同步进行dns解析,无需回调
|
||||
*
|
||||
* @param host
|
||||
* @param type
|
||||
* @param useCache
|
||||
* @return ip:port
|
||||
*/
|
||||
String syncGetHttpDns(String host, int type, boolean useCache);
|
||||
|
||||
/**
|
||||
* 注册HttpDns地址变化监听
|
||||
* @param listener {@link OnAddressChangedListener}
|
||||
*/
|
||||
void addressChangedListener(OnAddressChangedListener listener);
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.mogo.aicloud.services.httpdns;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.cloud.httpdns.MogoHttpDnsClient;
|
||||
import com.mogo.cloud.httpdns.listener.OnAddressChangedListener;
|
||||
|
||||
@Keep
|
||||
@Route(path = HttpDnsConst.PATH)
|
||||
public class MogoHttpDns implements IMogoHttpDns {
|
||||
private static final String TAG = "MogoHttpDns";
|
||||
|
||||
@Override
|
||||
public String getCachedHttpDnsIps(String host, int type) {
|
||||
return MogoHttpDnsClient.INSTANCE.getHttpDnsCachedAddress(type, host);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String syncGetHttpDns(String host, int type, boolean useCache) {
|
||||
return MogoHttpDnsClient.INSTANCE.syncGetHttpDns(host, type, useCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addressChangedListener(OnAddressChangedListener listener) {
|
||||
MogoHttpDnsClient.INSTANCE.addressChangedListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getHttpDnsIp(String host, int type, boolean useCache, IHttpDnsCallback callback) {
|
||||
if (useCache) {
|
||||
String address = MogoHttpDnsClient.INSTANCE.getHttpDnsCachedAddress(type, host);
|
||||
if (address != null) {
|
||||
callback.onParsed(address);
|
||||
} else {
|
||||
callback.onParsed(MogoHttpDnsClient.INSTANCE.getHttpDnsAddress(type, host));
|
||||
}
|
||||
} else {
|
||||
callback.onParsed(MogoHttpDnsClient.INSTANCE.getHttpDnsAddress(type, host));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(final Context context) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.mogo.aicloud.services.httpdns;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020/11/19
|
||||
*
|
||||
* 描述
|
||||
*/
|
||||
@Keep
|
||||
class MogoHttpDnsHandler {
|
||||
|
||||
private MogoHttpDnsHandler(){
|
||||
|
||||
}
|
||||
|
||||
@Keep
|
||||
private static volatile IMogoHttpDns sHttpDns;
|
||||
|
||||
@Keep
|
||||
public static IMogoHttpDns getHttpDnsApi() {
|
||||
if ( sHttpDns == null ) {
|
||||
synchronized ( MogoHttpDnsHandler.class ) {
|
||||
if ( sHttpDns == null ) {
|
||||
sHttpDns = ARouter.getInstance().navigation( IMogoHttpDns.class );
|
||||
}
|
||||
}
|
||||
}
|
||||
return sHttpDns;
|
||||
}
|
||||
}
|
||||
@@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4
|
||||
LOGLIB_VERSION=1.5.11
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.4.9
|
||||
MOGO_NETWORK_VERSION=1.4.5.6
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.4.9
|
||||
MOGO_PASSPORT_VERSION=1.4.5.6
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.4.4.9
|
||||
MOGO_SOCKET_VERSION=1.4.5.6
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.4.9
|
||||
MOGO_REALTIME_VERSION=1.4.5.6
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.4.4.9
|
||||
MOGO_TANLU_VERSION=1.4.5.6
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.4.9
|
||||
MOGO_LIVE_VERSION=1.4.5.6
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.4.9
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.5.6
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.4.9
|
||||
MOGO_LOCATION_VERSION=1.4.5.6
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.4.9
|
||||
MOGO_TELEMATIC_VERSION=1.4.5.6
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.10.0.9
|
||||
|
||||
Reference in New Issue
Block a user