1、2410207改回UDP推送,TCP没起作用,反而有更多的连续无固定解
This commit is contained in:
parent
972f438344
commit
13510559c8
@ -44,16 +44,12 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
|
|||||||
|
|
||||||
if(device1.getOpMode() == GnssDevice.OP_MODE_USE) {
|
if(device1.getOpMode() == GnssDevice.OP_MODE_USE) {
|
||||||
byte[] forwardBytes = message.getSrcData();
|
byte[] forwardBytes = message.getSrcData();
|
||||||
boolean useUDPChannel = true;
|
|
||||||
if(device1.getDeviceId().equals("2410207")) useUDPChannel = false;
|
|
||||||
// 要求快速转发,因此用缓存,不要每次都查数据库
|
// 要求快速转发,因此用缓存,不要每次都查数据库
|
||||||
List<Device> deviceList = deviceService.findByParentId(id);
|
List<Device> deviceList = deviceService.findByParentId(id);
|
||||||
for (Device device : deviceList) {
|
for (Device device : deviceList) {
|
||||||
if (device.getOpMode() != GnssDevice.OP_MODE_USE) continue;
|
if (device.getOpMode() != GnssDevice.OP_MODE_USE) continue;
|
||||||
String deviceId = device.getDeviceId();
|
String deviceId = device.getDeviceId();
|
||||||
DeviceChannel deviceChannel =
|
OnlineChannels.INSTANCE.get(deviceId).ifPresent(deviceChannel -> {
|
||||||
useUDPChannel?OnlineChannels.INSTANCE.getDataChannel(deviceId):OnlineChannels.INSTANCE.getConfigChannel(deviceId);
|
|
||||||
if(deviceChannel!=null) {
|
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("forward d331 rtcm message to device {}", deviceId);
|
logger.debug("forward d331 rtcm message to device {}", deviceId);
|
||||||
}
|
}
|
||||||
@ -63,7 +59,7 @@ public class D331RtcmMessageExecutor implements Executor<D331RtcmMessage, Void>
|
|||||||
ByteBuf buf = Unpooled.buffer();
|
ByteBuf buf = Unpooled.buffer();
|
||||||
buf.writeBytes(forwardBytes);
|
buf.writeBytes(forwardBytes);
|
||||||
deviceChannel.writeAndFlush(buf);
|
deviceChannel.writeAndFlush(buf);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user