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