[change] 更新数据采集配置 添加参数

This commit is contained in:
xinfengkun
2022-10-18 21:42:53 +08:00
parent 9aa751bfda
commit ded5a700e1
6 changed files with 159 additions and 11 deletions

View File

@@ -1054,14 +1054,20 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
/**
* 数据采集配置查询
*
* @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合
* @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合
* @param topicsNeedToCache
* @return boolean
*/
@Override
public boolean sendRecordDataConfigReq() {
MessagePad.RecordDataConfigReq req = MessagePad.RecordDataConfigReq
public boolean sendRecordDataConfigReq(int reqType, int recordType, List<String> topicsNeedToCache) {
MessagePad.RecordDataConfigReq.Builder builder = MessagePad.RecordDataConfigReq
.newBuilder()
.setReqType(0)
.build();
.setReqType(reqType)
.setRecordType(recordType);
if (topicsNeedToCache != null && !topicsNeedToCache.isEmpty())
builder.addAllTopicsNeedToCache(topicsNeedToCache);
MessagePad.RecordDataConfigReq req = builder.build();
return sendPBMessage(MessageType.TYPE_SEND_RECORD_DATA_CONFIG_REQ.typeCode, req.toByteArray());
}

View File

@@ -515,11 +515,14 @@ public class AdasManager implements IAdasNetCommApi {
/**
* 数据采集配置查询
*
* @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合
* @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合
* @param topicsNeedToCache
* @return boolean
*/
@Override
public boolean sendRecordDataConfigReq() {
return mChannel != null && mChannel.sendRecordDataConfigReq();
public boolean sendRecordDataConfigReq(int reqType, int recordType, List<String> topicsNeedToCache) {
return mChannel != null && mChannel.sendRecordDataConfigReq(reqType, recordType, topicsNeedToCache);
}
/**

View File

@@ -256,11 +256,13 @@ public interface IAdasNetCommApi {
/**
* 数据采集配置查询
* 0: all, 其他保留
*
* @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合
* @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合
* @param topicsNeedToCache
* @return 加入WS发送消息队列是否成功
*/
boolean sendRecordDataConfigReq();
boolean sendRecordDataConfigReq(int reqType, int recordType, List<String> topicsNeedToCache);
/**
* 获取已注册接口