fix: 尝试修复断联问题
This commit is contained in:
parent
9e110d1218
commit
d2c85d6d3b
@ -127,16 +127,10 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
|
||||
byte[] srcdata = message.getSrcData();
|
||||
String rtcm = ByteUtil.bytesToHexString(srcdata);
|
||||
sendToNtrip(id, rtcm);
|
||||
rtkClusterService.sendRtcm(id, rtcm);
|
||||
|
||||
try {
|
||||
rtkClusterService.sendRtcm(id, rtcm);
|
||||
} catch (Exception e) {
|
||||
logger.debug("send to rtkCluster failed for {}: {}", id, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ThreadManager.getFixedThreadPool().submit(() -> {
|
||||
// 原始码流输出到日志文件 -- INFO 级别
|
||||
// 只有测站开了日志记录,或者消息来自基站,才将原码记录到日志文件
|
||||
|
||||
@ -5,6 +5,7 @@ import com.imdroid.secapi.dto.RtkrcvProfile;
|
||||
import com.imdroid.secapi.dto.RtkrcvProfileMapper;
|
||||
import com.imdroid.secapi.dto.RtkrcvSession;
|
||||
import com.imdroid.secapi.dto.RtkrcvSessionMapper;
|
||||
import com.imdroid.sideslope.bd.RtcmGgaUtil;
|
||||
import com.imdroid.sideslope.ntrip.RtkrcvConfigService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -151,9 +152,17 @@ public class RtkClusterService implements ApplicationRunner {
|
||||
|
||||
public void sendRtcm(String deviceId, String hexRtcm) {
|
||||
DeviceEndpoint ep = endpoints.get(deviceId);
|
||||
if (ep == null) return;
|
||||
byte[] data = ByteUtil.hexStringTobyte(hexRtcm);
|
||||
ep.enqueueRtcm(data);
|
||||
if (ep == null || hexRtcm == null || hexRtcm.isEmpty()) return;
|
||||
try {
|
||||
java.util.List<String> frames = RtcmGgaUtil.getRtcms(hexRtcm);
|
||||
if (frames != null && !frames.isEmpty()) {
|
||||
for (String f : frames) {
|
||||
if (f != null && !f.isEmpty()) {
|
||||
ep.enqueueRtcm(ByteUtil.hexStringTobyte(f));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ignore) {}
|
||||
}
|
||||
|
||||
public void sendRtcmBytes(String deviceId, byte[] data) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user