[chang]移除adas lib中工控机升级接口 给地图升级sdk版本
This commit is contained in:
@@ -110,7 +110,6 @@ public class DataDistribution {
|
||||
public final List<String> listWarn = new ArrayList<>();
|
||||
public final List<String> listArrivalNotification = new ArrayList<>();
|
||||
public final List<String> listErrorData = new ArrayList<>();
|
||||
public final List<String> listUpdate = new ArrayList<>();
|
||||
public final List<String> listPointCloud = new ArrayList<>();
|
||||
|
||||
public String cutDown(String str) {
|
||||
|
||||
@@ -89,12 +89,20 @@ public class LogSave {
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
queue.clear();
|
||||
if (future != null && !future.isCancelled()) {
|
||||
future.cancel(true);
|
||||
if (future != null) {
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
queue.clear();
|
||||
if (!future.isCancelled()) {
|
||||
future.cancel(true);
|
||||
}
|
||||
future = null;
|
||||
closeBufferedWriter();
|
||||
}
|
||||
};
|
||||
ThreadPoolManager.getsInstance().execute(runnable);
|
||||
}
|
||||
future = null;
|
||||
closeBufferedWriter();
|
||||
}
|
||||
|
||||
private void closeBufferedWriter() {
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.zhidao.adas.client.base.BaseFragment;
|
||||
import com.zhidao.adas.client.utils.Constants;
|
||||
import com.zhidao.adas.client.utils.MyLinearLayoutManager;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeInfo;
|
||||
|
||||
/**
|
||||
* @author song kenan
|
||||
@@ -78,13 +77,13 @@ public class InfoFragment extends BaseFragment {
|
||||
btn1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm());
|
||||
// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm());
|
||||
}
|
||||
});
|
||||
btn2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel());
|
||||
// AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -128,15 +127,6 @@ public class InfoFragment extends BaseFragment {
|
||||
case Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP:
|
||||
adapter.setData(DataDistribution.getInstance().listGlobalPathResp);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_IPC_UPGRADE_STATUS:
|
||||
layout_update.setVisibility(View.VISIBLE);
|
||||
// text2.setText("IPC升级 \nUpgradeStatus:" + IPCUpgradeStateInfo.UpgradeStatus.getStatus(info.getUpgradeStatus()) +
|
||||
// "\nDownloadStatus:" + IPCUpgradeStateInfo.DownloadStatus.getStatus(info.getDownloadStatus()) +
|
||||
// "\nUpgradeMode:" + IPCUpgradeStateInfo.UpgradeMode.getStatus(info.getUpgradeMode()) +
|
||||
// "\nProgress:" + info.getProgress() +
|
||||
// "\nImages:" + info.getImages());
|
||||
adapter.setData(DataDistribution.getInstance().listUpdate);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_RECORD_RESULT:
|
||||
adapter.setData(DataDistribution.getInstance().listRecordPanel);
|
||||
break;
|
||||
|
||||
@@ -72,25 +72,21 @@ import com.zhidao.support.adas.high.AdasOptions;
|
||||
import com.zhidao.support.adas.high.OnAdasConnectStatusListener;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.PointCloudDecoder;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.SocketException;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import io.netty.channel.Channel;
|
||||
@@ -144,7 +140,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private InfoFragment trajectoryFragment;
|
||||
private InfoFragment autopilotWayArriveFragment;
|
||||
private InfoFragment autopilotRouteFragment;
|
||||
private InfoFragment upgradeFragment;
|
||||
private InfoFragment badcseFragment;
|
||||
private InfoFragment errorFragment;
|
||||
private InfoFragment reportMessageFragment;
|
||||
@@ -531,7 +526,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_WARN);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_IPC_UPGRADE_STATUS);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_ERROR);
|
||||
|
||||
|
||||
@@ -664,15 +658,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_IPC_UPGRADE_STATUS:
|
||||
showToastCenter("“" + data + "”功能暂时未开发");
|
||||
if (upgradeFragment == null)
|
||||
upgradeFragment = new InfoFragment(data);
|
||||
if (!upgradeFragment.isVisible()) {
|
||||
transaction.replace(R.id.fl_info, upgradeFragment);
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_RECORD_RESULT:
|
||||
if (badcseFragment == null)
|
||||
badcseFragment = new InfoFragment(data);
|
||||
@@ -706,6 +691,7 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES:
|
||||
showToastCenter("此接口目前弃用");
|
||||
// hintTrackedObjects(true);
|
||||
if (perceptionObstaclesFragment == null)
|
||||
perceptionObstaclesFragment = new InfoFragment(data);
|
||||
@@ -939,11 +925,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgradeStateInfo(final IPCUpgradeStateInfo info) {
|
||||
// LogSave.getInstance().saveLog("接收", info.toString());
|
||||
}
|
||||
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
|
||||
@@ -160,7 +160,6 @@ public class Constants {
|
||||
String RECEIVE_GLOBAL_PATH_RESP = "自动驾驶路径";
|
||||
String RECEIVE_WARN = "预警数据";
|
||||
String RECEIVE_ARRIVAL_NOTIFICATION = "到站提醒";
|
||||
String RECEIVE_IPC_UPGRADE_STATUS = "升级状态";
|
||||
String RECEIVE_ERROR = "错误数据";
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ import com.mogo.telematic.server.netty.NettyServerListener
|
||||
import com.mogo.telematic.server.netty.NettyTcpServer
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.AdasOptions
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeInfo
|
||||
import com.zhidao.support.adas.high.chain.AdasChain.CHAIN_LINK_LOG_CONNECT_STATUS
|
||||
import com.zhidao.support.adas.high.common.Constants
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS
|
||||
@@ -353,14 +352,12 @@ class MoGoAutopilotProvider :
|
||||
* 工控机升级确认
|
||||
*/
|
||||
override fun setIPCUpgradeAffirm() {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.affirm())
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机升级取消
|
||||
*/
|
||||
override fun setIPCUpgradeCancel() {
|
||||
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,6 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateLi
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.zhidao.support.adas.high.AdasManager
|
||||
import com.zhidao.support.adas.high.OnAdasListener
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
@@ -338,9 +337,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onUpgradeStateInfo(info: IPCUpgradeStateInfo) {
|
||||
|
||||
}
|
||||
|
||||
override fun onError(status: ProtocolStatus, bytes: ByteArray) {
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ MOGO_V2X_SDK_VERSION=1.3.56
|
||||
# ADAS LIB Maven配置(用于地图部门测试使用,鹰眼项目中使用本地依赖) #
|
||||
ADAS_LIB_GROUP=com.zhidao.support.adas
|
||||
ADAS_LIB_POM_ARTIFACT_ID=high
|
||||
ADAS_LIB_CHILD_VERSION=.2
|
||||
ADAS_LIB_CHILD_VERSION=.3
|
||||
|
||||
ADAS_DATA_LIB_GROUP=com.zhjt.mogo.adas.data
|
||||
ADAS_DATA_LIB_POM_ARTIFACT_ID=adas-data
|
||||
|
||||
@@ -286,15 +286,7 @@
|
||||
*/
|
||||
AdasManager.getInstance().delIPCFixationIP(Context context);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 发送升级指令 TODO 将会被删除
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Deprecated
|
||||
AdasManager.getInstance().sendBaseInfo(BaseInfo info);
|
||||
~~~
|
||||
|
||||
|
||||
## OnAdasListener
|
||||
### 工控机数据回调
|
||||
@@ -427,15 +419,6 @@
|
||||
*/
|
||||
void onArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification arrivalNotification);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 升级状态
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Deprecated
|
||||
void onUpgradeStateInfo(IPCUpgradeStateInfo info);
|
||||
~~~
|
||||
~~~java
|
||||
/**
|
||||
* 向IPC发送命令返回结果
|
||||
|
||||
@@ -71,7 +71,7 @@ dependencies {
|
||||
//okhttp3的依赖
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.12.3'
|
||||
// parser
|
||||
implementation rootProject.ext.dependencies.gson
|
||||
// implementation rootProject.ext.dependencies.gson
|
||||
implementation project(':libraries:mogo-adas-data')
|
||||
// logger
|
||||
//implementation 'com.orhanobut:logger:2.2.0'
|
||||
|
||||
@@ -18,8 +18,6 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.google.protobuf.TextFormat;
|
||||
import com.zhidao.support.adas.high.bean.BaseInfo;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
@@ -48,7 +46,6 @@ import java.util.HashSet;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import okio.ByteString;
|
||||
@@ -88,10 +85,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
*/
|
||||
public static final boolean ADAS_CHANNEL_IS_USE_DISPATCH_HANDLER = true;
|
||||
|
||||
/**
|
||||
* 序列化rect
|
||||
*/
|
||||
private final Gson gson = new Gson();
|
||||
/**
|
||||
* 消息工厂
|
||||
*/
|
||||
@@ -225,7 +218,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
*
|
||||
* @param msg 消息
|
||||
*/
|
||||
public boolean sendWsMessage(String msg) {
|
||||
private boolean sendWsMessage(String msg) {
|
||||
return mSocket != null && mSocket.sendDataWebSocket(msg);
|
||||
}
|
||||
|
||||
@@ -246,25 +239,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理webSocket
|
||||
*
|
||||
* @param text text数据
|
||||
*/
|
||||
private void handlerWSMsg(String text) {
|
||||
try {
|
||||
JSONObject jsonObjectWs = new JSONObject(text);
|
||||
String action = jsonObjectWs.optString("action");
|
||||
if (TextUtils.isEmpty(action)) {
|
||||
CupidLogUtils.w("--->action is null");
|
||||
return;
|
||||
}
|
||||
myMessageFactory.createMessage(action).handlerMsg(gson, mAdasListener, text);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析工控机发送过来PB的数据
|
||||
*
|
||||
@@ -604,19 +578,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
CupidLogUtils.setEnableLog(isEnableLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 向工控机发送数据
|
||||
*
|
||||
* @param info 基础信息
|
||||
*/
|
||||
@Override
|
||||
public void sendBaseInfo(BaseInfo info) {
|
||||
if (info == null) {
|
||||
return;
|
||||
}
|
||||
String msg = gson.toJson(info);
|
||||
sendWsMessage(msg);
|
||||
}
|
||||
|
||||
/**************************************************************************************************************************/
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.zhidao.support.adas.high.bean.BaseInfo;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.AppPreferenceHelper;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
@@ -120,16 +119,6 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return carConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送信息
|
||||
*
|
||||
* @param msg 消息
|
||||
*/
|
||||
private void sendMessage(String msg) {
|
||||
if (mChannel != null) {
|
||||
mChannel.sendWsMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接工控机
|
||||
@@ -477,17 +466,4 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
public long getTimeoutDetectionTime() {
|
||||
return ReceiveTimeoutManager.getInstance().getTimeout();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送升级指令 TODO 将会被删除
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void sendBaseInfo(BaseInfo info) {
|
||||
if (mChannel != null) {
|
||||
mChannel.sendBaseInfo(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.zhidao.support.adas.high;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.zhidao.support.adas.high.bean.BaseInfo;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
|
||||
@@ -184,14 +183,6 @@ public interface IAdasNetCommApi {
|
||||
// TODO 需求暂停 待讨论
|
||||
// boolean getRoutes();
|
||||
|
||||
/**
|
||||
* 发送升级指令 TODO 将会被删除
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Deprecated
|
||||
void sendBaseInfo(BaseInfo info);
|
||||
|
||||
/**
|
||||
* 解析工控机发送过来的数据
|
||||
* 多设备时使用
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high;
|
||||
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
|
||||
import chassis.VehicleStateOuterClass;
|
||||
@@ -158,14 +157,6 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onArrivalNotification(MessagePad.Header header, MessagePad.ArrivalNotification arrivalNotification);
|
||||
|
||||
/**
|
||||
* 升级状态
|
||||
*
|
||||
* @param info
|
||||
*/
|
||||
@Deprecated
|
||||
void onUpgradeStateInfo(IPCUpgradeStateInfo info);
|
||||
|
||||
/**
|
||||
* 数据错误
|
||||
*
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zhidao.support.adas.high.bean;
|
||||
|
||||
@Deprecated
|
||||
public abstract class BaseInfo<T> {
|
||||
protected String action;
|
||||
protected T values;
|
||||
|
||||
|
||||
public BaseInfo(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public T getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
public void setValues(T values) {
|
||||
this.values = values;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zhidao.support.adas.high.bean;
|
||||
|
||||
/**
|
||||
* 工控机升级
|
||||
*/
|
||||
@Deprecated
|
||||
public class IPCUpgradeInfo extends BaseInfo<IPCUpgradeInfo.Values> {
|
||||
public IPCUpgradeInfo() {
|
||||
super("ipc_upgrade");
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户不同意升级
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IPCUpgradeInfo cancel() {
|
||||
IPCUpgradeInfo info = new IPCUpgradeInfo();
|
||||
info.values = new IPCUpgradeInfo.Values();
|
||||
info.values.state = 0;
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户同意升级
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IPCUpgradeInfo affirm() {
|
||||
IPCUpgradeInfo info = new IPCUpgradeInfo();
|
||||
info.values = new IPCUpgradeInfo.Values();
|
||||
info.values.state = 1;
|
||||
return info;
|
||||
}
|
||||
|
||||
public static class Values {
|
||||
/**
|
||||
* 0 不同意升级
|
||||
* 1 同意升级
|
||||
*/
|
||||
private int state;
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,283 +0,0 @@
|
||||
package com.zhidao.support.adas.high.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 工控机升级
|
||||
*/
|
||||
@Deprecated
|
||||
public class IPCUpgradeStateInfo extends BaseInfo<IPCUpgradeStateInfo.Values> {
|
||||
/**
|
||||
* 升级模式
|
||||
*/
|
||||
public enum UpgradeMode {
|
||||
/**
|
||||
* 0:静默升级
|
||||
* 3:提示升级
|
||||
*/
|
||||
DATA_NULL(-1, "数据为NULL"),
|
||||
QUIET(0, "静默升级"),
|
||||
HINT(3, "提示升级");
|
||||
public final int code;
|
||||
public final String describe;
|
||||
|
||||
private UpgradeMode(int code, String describe) {
|
||||
this.code = code;
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
public static UpgradeMode getStatus(int code) {
|
||||
switch (code) {
|
||||
default:
|
||||
case -1:
|
||||
return DATA_NULL;
|
||||
case 0:
|
||||
return QUIET;
|
||||
case 3:
|
||||
return HINT;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
"code=" + code +
|
||||
", describe='" + describe + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载状态
|
||||
*/
|
||||
public enum DownloadStatus {
|
||||
/**
|
||||
* 30:开始下载
|
||||
* 31:下载完成
|
||||
* 32:下载失败
|
||||
*/
|
||||
DATA_NULL(-1, "数据为NULL"),
|
||||
START(30, "开始下载"),
|
||||
FINISH(31, "下载完成"),
|
||||
FAILED(32, "下载失败");
|
||||
public final int code;
|
||||
public final String describe;
|
||||
|
||||
private DownloadStatus(int code, String describe) {
|
||||
this.code = code;
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
public static DownloadStatus getStatus(int code) {
|
||||
switch (code) {
|
||||
default:
|
||||
case -1:
|
||||
return DATA_NULL;
|
||||
case 30:
|
||||
return START;
|
||||
case 31:
|
||||
return FINISH;
|
||||
case 32:
|
||||
return FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
"code=" + code +
|
||||
", describe='" + describe + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载状态
|
||||
*/
|
||||
public enum UpgradeStatus {
|
||||
/**
|
||||
* 60:是否升级
|
||||
* 61:升级成功
|
||||
* 62:升级失败
|
||||
* 63:用户确认
|
||||
* 64:用户取消
|
||||
*/
|
||||
DATA_NULL(-1, "数据为NULL"),
|
||||
AFFIRM(60, "是否升级"),
|
||||
SUCCEED(61, "升级成功"),
|
||||
FAILED(62, "升级失败"),
|
||||
USER_AFFIRM(63, "用户确认"),
|
||||
USER_CANCEL(64, "用户取消");
|
||||
public final int code;
|
||||
public final String describe;
|
||||
|
||||
private UpgradeStatus(int code, String describe) {
|
||||
this.code = code;
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
public static UpgradeStatus getStatus(int code) {
|
||||
switch (code) {
|
||||
default:
|
||||
case -1:
|
||||
return DATA_NULL;
|
||||
case 60:
|
||||
return AFFIRM;
|
||||
case 61:
|
||||
return SUCCEED;
|
||||
case 62:
|
||||
return FAILED;
|
||||
case 63:
|
||||
return USER_AFFIRM;
|
||||
case 64:
|
||||
return USER_CANCEL;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
"code=" + code +
|
||||
", describe='" + describe + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
public IPCUpgradeStateInfo(String action) {
|
||||
super(action);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取升级包下载进度
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Values.Progress getProgress() {
|
||||
if (this.values == null) return null;//数据或解析异常
|
||||
return this.values.progress;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下载状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getDownloadStatus() {
|
||||
if (this.values == null) return -1;//数据或解析异常
|
||||
return this.values.downloadStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取升级状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getUpgradeStatus() {
|
||||
if (this.values == null) return -1;//数据或解析异常
|
||||
return this.values.upgradeStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取升级模式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getUpgradeMode() {
|
||||
if (this.values == null) return -1;//数据或解析异常
|
||||
return this.values.upgradeMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取版本号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getImages() {
|
||||
if (this.values == null) return null;//数据或解析异常
|
||||
return this.values.images;
|
||||
}
|
||||
|
||||
public static class Values {
|
||||
/**
|
||||
* int 类型, 升级模式 静默升级不需要前端通知,工控机会自动升级
|
||||
*/
|
||||
@SerializedName("upgrade_mode")
|
||||
private int upgradeMode = -1;
|
||||
private Progress progress;
|
||||
/**
|
||||
* int 类型, 下载状态, 如果下载完成,下载进度会为空
|
||||
*/
|
||||
@SerializedName("download_status")
|
||||
private int downloadStatus = -1;
|
||||
/**
|
||||
* int 类型, 升级状态
|
||||
*/
|
||||
@SerializedName("upgrade_status")
|
||||
private int upgradeStatus = -1;
|
||||
/**
|
||||
* string 类型,版本号
|
||||
*/
|
||||
private String images;
|
||||
|
||||
public static class Progress {
|
||||
/**
|
||||
* total : 307405010
|
||||
* current : 1071793
|
||||
*/
|
||||
/**
|
||||
* int 类型 ,包总大小,字节
|
||||
*/
|
||||
private int total;
|
||||
/**
|
||||
* int 类型 ,包已经下载大小,字节
|
||||
*/
|
||||
private int current;
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public int getCurrent() {
|
||||
return current;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
"total=" + total +
|
||||
", current=" + current +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* upgrade_mode:
|
||||
* 0-静默升级
|
||||
* 1-提示升级
|
||||
* download_status:
|
||||
* 30:开始下载
|
||||
* 31:下载完成
|
||||
* 32:下载失败
|
||||
* upgrade_status:
|
||||
* 60:是否升级
|
||||
* 61:升级成功
|
||||
* 62:升级失败
|
||||
* 63:用户确认
|
||||
* 64:用户取消
|
||||
* *{
|
||||
* * "action": "ipc_upgrade_status",
|
||||
* * "values": {
|
||||
* * "progress": {
|
||||
* * "total": 307405010, //int 类型 ,包总大小,字节
|
||||
* * "current": 1071793 //int 类型 ,包已经下载大小,字节
|
||||
* * },
|
||||
* * "download_status": 31, //int 类型, 下载状态, 如果下载完成,下载进度会为空
|
||||
* * "upgrade_status": 61, //int 类型, 升级状态
|
||||
* * "upgrade_mode": 1, //int 类型, 升级模式
|
||||
* * "images": "mogohub.tencentcloudcr.com/autocar/df:RoboTaxi_MAP-taxi_2.1.3.1_20211214_huzhengming"* } //string 类型,版本号
|
||||
* *
|
||||
* * }
|
||||
*/
|
||||
@@ -39,13 +39,7 @@ public enum MessageType {
|
||||
@Deprecated
|
||||
TYPE_RECEIVE_WARN(MessagePad.MessageType.MsgTypeWarn, "预警数据"),
|
||||
TYPE_RECEIVE_ARRIVAL_NOTIFICATION(MessagePad.MessageType.MsgTypeArrivalNotification, "到站提醒"),
|
||||
TYPE_SEND_SYSTEM_CMD_REQ(MessagePad.MessageType.MsgTypeSystemCmdReq, "系统命令请求, 比如系统重启,启用新镜像"),
|
||||
|
||||
/**
|
||||
* 工控机升级状态
|
||||
*/
|
||||
@Deprecated
|
||||
TYPE_RECEIVE_IPC_UPGRADE_STATUS(null, "IPC升级状态");
|
||||
TYPE_SEND_SYSTEM_CMD_REQ(MessagePad.MessageType.MsgTypeSystemCmdReq, "系统命令请求, 比如系统重启,启用新镜像");
|
||||
|
||||
/**
|
||||
* 消息action code
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class ArrivalNotificationMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.ArrivalNotification arrivalNotification = MessagePad.ArrivalNotification.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class AutopilotStateMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.AutopilotState autopilotState = MessagePad.AutopilotState.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class BasicInfoReqMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.BasicInfoReq autopilotState = MessagePad.BasicInfoReq.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.AdasManager;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
@@ -14,10 +13,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class CarConfigRespMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.CarConfigResp carConfigResp = MessagePad.CarConfigResp.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class GlobalPathRespMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.GlobalPathResp globalPathResp = MessagePad.GlobalPathResp.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -13,10 +12,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class GnssInfoMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.GnssInfo trajectory = MessagePad.GnssInfo.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -16,7 +15,7 @@ public interface IMsg {
|
||||
*
|
||||
* @param msg
|
||||
*/
|
||||
void handlerMsg(Gson gson, OnAdasListener adasListener, String msg);
|
||||
// void handlerMsg(Gson gson, OnAdasListener adasListener, String msg);
|
||||
|
||||
/**
|
||||
* 分发处理
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface IMyMessageFactory {
|
||||
* @param messageType 消息类型
|
||||
* @return
|
||||
*/
|
||||
public IMsg createMessage(String messageType);
|
||||
// public IMsg createMessage(String messageType);
|
||||
|
||||
/**
|
||||
* @param messageCode 消息类型
|
||||
|
||||
@@ -30,26 +30,6 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
private IMsg arrivalNotificationMessage;//到站提醒
|
||||
|
||||
|
||||
private IMsg nuImplMessage;//空实现
|
||||
private IMsg autopilotUpgradeStatusMessage;//工控机升级状态
|
||||
|
||||
|
||||
@Override
|
||||
public IMsg createMessage(String messageType) {
|
||||
if ("ipc_upgrade_status".equals(messageType)) {
|
||||
//ws 工控机升级状态
|
||||
if (autopilotUpgradeStatusMessage == null) {
|
||||
autopilotUpgradeStatusMessage = new WsAutopilotUpgradeStatusMessage();
|
||||
}
|
||||
return autopilotUpgradeStatusMessage;
|
||||
} else {
|
||||
if (nuImplMessage == null) {
|
||||
nuImplMessage = new NuImplMessage();
|
||||
}
|
||||
return nuImplMessage;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMsg createMessage(MessagePad.MessageType messageType) {
|
||||
if (messageType == MessageType.TYPE_RECEIVE_TRAJECTORY.typeCode) {
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
* @author nie yunlong
|
||||
* @des 空实现防止空指针
|
||||
* @date 2020/3/12
|
||||
*/
|
||||
public class NuImplMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import perception.ObjectOuterClass;
|
||||
*/
|
||||
public class PerceptionObstaclesMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
ObjectOuterClass.TrackedObjects trackedObjects = ObjectOuterClass.TrackedObjects.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import perception.TrafficLightOuterClass;
|
||||
*/
|
||||
public class PerceptionTrafficLightMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
TrafficLightOuterClass.TrafficLights trafficLights = TrafficLightOuterClass.TrafficLights.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +12,6 @@ import rule_segement.PointCloud;
|
||||
*/
|
||||
public class PointCloudMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
PointCloud.LidarPointCloud pointCloud = PointCloud.LidarPointCloud.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import prediction.Prediction;
|
||||
*/
|
||||
public class PredictionObstacleTrajectoryMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
Prediction.mPredictionObjects objects = Prediction.mPredictionObjects.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import record_cache.RecordPanelOuterClass;
|
||||
*/
|
||||
public class RecordResultMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
RecordPanelOuterClass.RecordPanel recordPanel = RecordPanelOuterClass.RecordPanel.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import mogo_msg.MogoReportMsg;
|
||||
*/
|
||||
public class ReportMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MogoReportMsg.MogoReportMessage mogoReportMessage = MogoReportMsg.MogoReportMessage.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -14,11 +13,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class TrackedObjectsMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.TrackedObjects trackedObjects = MessagePad.TrackedObjects.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
*/
|
||||
public class TrajectoryMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.Trajectory trajectory = MessagePad.Trajectory.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -12,10 +11,6 @@ import chassis.VehicleStateOuterClass;
|
||||
*/
|
||||
public class VehicleStateMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
VehicleStateOuterClass.VehicleState vehicleState = VehicleStateOuterClass.VehicleState.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
@@ -13,10 +12,6 @@ import mogo.telematics.pad.MessagePad;
|
||||
@Deprecated
|
||||
public class WarnMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MessagePad.Warn warn = MessagePad.Warn.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.bean.IPCUpgradeStateInfo;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
/**
|
||||
* @des 工控机升级状态 之后版本会被替换成PB格式
|
||||
* @date 2020/3/12
|
||||
*/
|
||||
@Deprecated
|
||||
public class WsAutopilotUpgradeStatusMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(Gson gson, OnAdasListener adasListener, String msg) {
|
||||
IPCUpgradeStateInfo autopilotStatus = gson.fromJson(msg, IPCUpgradeStateInfo.class);
|
||||
if (adasListener != null) {
|
||||
adasListener.onUpgradeStateInfo(autopilotStatus);
|
||||
}
|
||||
// CupidLogUtils.i("工控机升级", "msg=" + msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user