changed msgType of websocket

This commit is contained in:
unknown
2020-10-26 16:14:34 +08:00
parent e3f303c2ca
commit 319cadb930
3 changed files with 10 additions and 7 deletions

View File

@@ -7,7 +7,11 @@ public interface IMogoOnWebSocketMessageListener< T > {
WebSocketMsgType getType();
void onMsgReceived(T obj);
default void onMsgReceived(T obj){
void onError(String errorMsg);
}
default void onError(String errorMsg){
}
}

View File

@@ -2,9 +2,8 @@ package com.mogo.service.connection;
public enum WebSocketMsgType {
MSG_TYPE_SELF(0,"自车数据"),
MSG_TYPE_ADAS(1,"ADAS数据"),
MSG_TYPE_SERVER(2,"服务端下发车辆信息");
MSG_TYPE_UPLINK_CAR_DATA(0,"自车与ADAS数据"),
MSG_TYPE_DOWNLINK_CAR_DATA(1,"服务端下发车辆信息");
private int msgType;
private String msg;