Commit 9d85ffd5d4f4a35eb1e2405dca25b7fe258e58c7

Authored by xp.Huang
1 parent 84b66e28

perf: TCP/UDP设备激活状态的报告

... ... @@ -329,6 +329,7 @@ public class TcpUdpDataHandler implements SessionMsgListener {
329 329 if (gatewaySessionHandler != null && deviceCode != deviceAddressCode) {
330 330 gatewaySessionHandler.onDeviceTelemetry(
331 331 deviceAddress, null, hexString, ProtocolAnalysisEnum.MODBUS_RTU);
  332 + transportService.reportActivity(deviceSessionCtx.getSessionInfo());
332 333 } else {
333 334 if (deviceCode == deviceAddressCode) {
334 335 processCustomDirectDeviceMsg(
... ... @@ -385,6 +386,7 @@ public class TcpUdpDataHandler implements SessionMsgListener {
385 386 tcpMessage);
386 387 try {
387 388 Map<String, Object> datas = tcpMessage.getDatas();
  389 + transportService.reportActivity(deviceSessionCtx.getSessionInfo());
388 390 if (hasDatas(datas)) {
389 391 datas.forEach(
390 392 (devName, param) -> {
... ... @@ -403,7 +405,6 @@ public class TcpUdpDataHandler implements SessionMsgListener {
403 405 }
404 406 });
405 407 } else {
406   - transportService.reportActivity(deviceSessionCtx.getSessionInfo());
407 408 pushDeviceMsg(ctx, tcpMessage.getAckMsg());
408 409 }
409 410 } catch (Exception e) {
... ...