merge
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.zhidao.support.adas.high;
|
||||
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_ALIAS_CODE_UDP_CONNECT_ADDRESS;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_ADAS;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.zhidao.support.adas.high.common.ActionTypeReceive.ACTION_WS_AUTOPILOT_CONTROL;
|
||||
import static com.zhidao.support.adas.high.udp.CupidUdpConstract.VIDEO_RENDER_IMAGE_UDP;
|
||||
|
||||
@@ -184,7 +186,8 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(linkCode = 1,
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_UDP_CONNECT_ADDRESS,
|
||||
paramIndexes = {0},
|
||||
|
||||
@@ -4,6 +4,8 @@ import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_ALIAS_CODE_WEB_
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_JSON;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_ALIAS_CODE_WEB_SOCKET_OPEN;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_ADAS;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_LOG_WEB_SOCKET_DATA;
|
||||
import static com.zhidao.support.adas.high.common.Constants.WS_IP_HOST_HEAD;
|
||||
import static com.zhidao.support.adas.high.common.Constants.WS_PORT;
|
||||
|
||||
@@ -84,11 +86,6 @@ public class FpgaSocket implements IWebSocket {
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(linkCode = 1,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = "PAD_YINGYAN_ADAS",
|
||||
paramIndexes = {0},
|
||||
clientPkFileName = "sn")
|
||||
@Override
|
||||
public void connectWebSocket(String address) {
|
||||
String wsHost = WS_IP_HOST_HEAD + address + WS_PORT;
|
||||
@@ -263,6 +260,7 @@ public class FpgaSocket implements IWebSocket {
|
||||
public class EchoWebSocketListener extends WebSocketListener {
|
||||
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_WEB_SOCKET_OPEN,
|
||||
paramIndexes = {1},
|
||||
@@ -276,6 +274,7 @@ public class FpgaSocket implements IWebSocket {
|
||||
}
|
||||
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_JSON,
|
||||
paramIndexes = {1},
|
||||
@@ -295,9 +294,10 @@ public class FpgaSocket implements IWebSocket {
|
||||
}
|
||||
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_WEB_SOCKET_DATA,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_WEB_SOCKET_MESSAGE_BYTE,
|
||||
paramIndexes = {1},
|
||||
paramIndexes = {-1},
|
||||
clientPkFileName = "sn")
|
||||
@Override
|
||||
public void onMessage(WebSocket webSocket, ByteString bytes) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.zhidao.support.adas.high.udp;
|
||||
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_ALIAS_CODE_UDP_INIT;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_ADAS;
|
||||
import static com.mogo.eagle.core.data.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
|
||||
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.udp.factory.AbstractUdpImpl;
|
||||
@@ -22,26 +23,26 @@ public class CupidUdpConstract {
|
||||
/**
|
||||
* udp 接收数据线程
|
||||
*/
|
||||
private Thread udpReceiverDataThread;
|
||||
private Thread udpReceiverDataThread;
|
||||
/**
|
||||
* 默认的udp端口
|
||||
*/
|
||||
private int defaultVideoUdpPort = 6665;
|
||||
private int defaultVideoUdpPort = 6665;
|
||||
|
||||
/**
|
||||
* 默认的udp端口
|
||||
*/
|
||||
private int defaultRenderImageUdpPort = 6661;
|
||||
|
||||
private AbstractUdpImpl udpImpl;
|
||||
private AbstractUdpImpl udpImpl;
|
||||
/**
|
||||
* 默认是0 创建h264解析流
|
||||
*/
|
||||
public static final int VIDEO_STREAM_UDP = 0;
|
||||
public static final int VIDEO_STREAM_UDP = 0;
|
||||
/**
|
||||
* 上层绘制 待开发
|
||||
*/
|
||||
public static final int VIDEO_RENDER_IMAGE_UDP = 1;
|
||||
public static final int VIDEO_RENDER_IMAGE_UDP = 1;
|
||||
|
||||
public CupidUdpConstract(int udpType) {
|
||||
init(udpType);
|
||||
@@ -50,11 +51,7 @@ public class CupidUdpConstract {
|
||||
/**
|
||||
* 初始化UDPserver 接收数据
|
||||
*/
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_UDP_INIT,
|
||||
paramIndexes = {0},
|
||||
clientPkFileName = "sn")
|
||||
|
||||
private void init(int udpType) {
|
||||
if (udpType == VIDEO_STREAM_UDP) {
|
||||
udpImpl = CupidUdpFactory.createVideoStreamUdp();
|
||||
@@ -74,6 +71,12 @@ public class CupidUdpConstract {
|
||||
/**
|
||||
* 开启线程 在surface准备好之后再进行接收数据
|
||||
*/
|
||||
@ChainLog(linkCode = CHAIN_LINK_ADAS,
|
||||
linkChainLog = CHAIN_LINK_LOG_CONNECT_STATUS,
|
||||
endpoint = TracingConstants.Endpoint.PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_UDP_INIT,
|
||||
paramIndexes = {0},
|
||||
clientPkFileName = "sn")
|
||||
public void startReceiverDataThread() {
|
||||
if (udpReceiverDataThread != null) {
|
||||
udpReceiverDataThread.interrupt();
|
||||
|
||||
Reference in New Issue
Block a user