对特定topic进行录制
This commit is contained in:
@@ -47,6 +47,7 @@ import com.zhjt.service.chain.TracingConstants;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
@@ -364,6 +365,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
CupidLogUtils.i("TimeConsuming", who + " 从接收到解析耗时=" + time + "毫秒");
|
||||
}
|
||||
}
|
||||
|
||||
//TODO 计算耗时 临时测试
|
||||
public static void calculateTimeConsumingBusiness(String who, long receiveTime) {
|
||||
if (CupidLogUtils.isEnableLog()) {
|
||||
@@ -371,6 +373,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
CupidLogUtils.i("TimeConsuming", who + " 业务处理耗时=" + time + "毫秒");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分发和解析
|
||||
*
|
||||
@@ -837,6 +840,37 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return sendRecordData(id, 0, type, false, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择具体topics进行录制
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param bduration
|
||||
* @param topics
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics) {
|
||||
boolean sustain = false;
|
||||
if (duration <= 0) {
|
||||
duration = 0;
|
||||
sustain = true;
|
||||
}
|
||||
|
||||
MessagePad.RecordData.Builder builder = MessagePad.RecordData
|
||||
.newBuilder()
|
||||
.setId(id)
|
||||
.setDuration(duration)
|
||||
.setType(type)
|
||||
.setIsRecord(true)
|
||||
.setSustain(sustain)
|
||||
.addAllTopics(topics);
|
||||
if (bduration > -1) {
|
||||
builder.setBduration(bduration);
|
||||
}
|
||||
MessagePad.RecordData req = builder.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_RECORD_DATA.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据采集请求 主动录制Bag包
|
||||
@@ -1199,6 +1233,7 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
|
||||
/**
|
||||
* 绕障开关和速度控制
|
||||
*
|
||||
* @param type
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.zhidao.support.adas.high.common.MessageType;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
@@ -352,6 +353,11 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.startRecordPackage(id, duration, type, bduration);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics) {
|
||||
return mChannel != null && mChannel.startRecordPackage(id, duration, type, bduration, topics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.Define;
|
||||
import com.zhidao.support.adas.high.common.MessageType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
@@ -132,6 +133,17 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean startRecordPackage(int id, int duration, int type, int bduration);
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param bduration
|
||||
* @return 加入WS发送消息队列是否成功
|
||||
*/
|
||||
boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics);
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user