From dd694b8a3d05e2d785413182e1c28b25a5b3f431 Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期三, 20 十二月 2023 17:24:08 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/Manager.java | 36 +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+), 9 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/Manager.java b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/Manager.java index cf45570..2bbe053 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/Manager.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mwTest-server/src/main/java/com/dy/testServer/forRmi/Manager.java @@ -8,9 +8,11 @@ import com.dy.testServer.ServerProperties; public class Manager { - - public static boolean enablemwTestStart = false ; - + + public static boolean enablemwTestStartTcpConnect = false ; + + public static boolean enablemwTestStartRtuReport = false ; + public static int clientId = 1 ; public static long maxClient = 0 ; @@ -79,10 +81,12 @@ }else if(rqVo.code.equals(Code.cd3)){ resVo.obj = doDealGetStart(rqVo) ; }else if(rqVo.code.equals(Code.cd4)){ - doDealReportCount(rqVo) ; + resVo.obj = doDealGetReport(rqVo) ; }else if(rqVo.code.equals(Code.cd5)){ - doDealReportOver(rqVo) ; + doDealReportCount(rqVo) ; }else if(rqVo.code.equals(Code.cd6)){ + doDealReportOver(rqVo) ; + }else if(rqVo.code.equals(Code.cd7)){ doDealAllOver(rqVo) ; } return resVo ; @@ -127,9 +131,9 @@ } return conVo ; } - private static ResStartVo doDealGetStart(RmiRequestVo rqVo){ - ResStartVo rvo = new ResStartVo() ; - rvo.start = enablemwTestStart ; + private static ResStartTcpConnectVo doDealGetStart(RmiRequestVo rqVo){ + ResStartTcpConnectVo rvo = new ResStartTcpConnectVo() ; + rvo.start = enablemwTestStartTcpConnect ; int token = Integer.parseInt(rqVo.token) ; MwTestClientStatus sta = token2ClientMap.get("" + token); if(sta == null){ @@ -141,7 +145,21 @@ } return rvo ; } - + private static ResStartRtuReportVo doDealGetReport(RmiRequestVo rqVo){ + ResStartRtuReportVo rvo = new ResStartRtuReportVo() ; + rvo.report = enablemwTestStartRtuReport ; + int token = Integer.parseInt(rqVo.token) ; + MwTestClientStatus sta = token2ClientMap.get("" + token); + if(sta == null){ + sta = new MwTestClientStatus() ; + sta.reportVo = rvo ; + token2ClientMap.put("" + token, sta); + }else{ + sta.reportVo = rvo ; + } + return rvo ; + } + private static void doDealReportCount(RmiRequestVo rqVo){ int token = Integer.parseInt(rqVo.token) ; -- Gitblit v1.8.0