| | |
| | | this.startUnits() ; |
| | | |
| | | if(ServerProperties.argRtuAddr != null && !ServerProperties.argRtuAddr.trim().equals("")){ |
| | | System.out.println("应用配置RTU地址:" + ServerProperties.rtuAddr) ; |
| | | }else{ |
| | | System.out.println("应用参数RTU地址:" + ServerProperties.argRtuAddr) ; |
| | | System.out.println("参数RTU地址:" + ServerProperties.argRtuAddr) ; |
| | | ServerProperties.rtuAddr = ServerProperties.argRtuAddr ; |
| | | }else{ |
| | | System.out.println("配置RTU地址:" + ServerProperties.rtuAddr) ; |
| | | } |
| | | |
| | | System.out.println("启动一包死:" + (ServerProperties.argOneDie==null?"否":(ServerProperties.argOneDie?"是":"否"))) ; |
| | | System.out.println("启动多包死:" + (ServerProperties.argMultiDie==null?"否":(ServerProperties.argMultiDie?"是":"否"))) ; |
| | | |
| | | |
| | | |
| | | String svName ; |
| | | try{ |
| | |
| | | // /////////////// |
| | | // TCP 模块 |
| | | TcpClUnitConfigVo tcpVo = new TcpClUnitConfigVo(); |
| | | tcpVo.mwServerIp = conf.getSetAttrTxt(doc, "config.tcpCl", "mwServerIp", null, false, null); |
| | | tcpVo.mwServerPort = conf.getSetAttrPlusInt(doc, "config.tcpCl", "mwServerPort", null, 100, 65535, null); |
| | | if(ServerProperties.serverIp != null && !ServerProperties.serverIp.trim().equals("")){ |
| | | tcpVo.mwServerIp = ServerProperties.serverIp ; |
| | | }else{ |
| | | tcpVo.mwServerIp = conf.getSetAttrTxt(doc, "config.tcpCl", "mwServerIp", null, false, null); |
| | | } |
| | | if(ServerProperties.serverPort != null){ |
| | | tcpVo.mwServerPort = ServerProperties.serverPort ; |
| | | }else{ |
| | | tcpVo.mwServerPort = conf.getSetAttrPlusInt(doc, "config.tcpCl", "mwServerPort", null, 100, 65535, null); |
| | | } |
| | | tcpVo.connectTimeout = conf.getSetAttrPlusInt(doc, "config.tcpCl", "connectTimeout", null, 1000, 10000, null); |
| | | this.mwServerUrl = tcpVo.mwServerIp + ":" + tcpVo.mwServerPort ; |
| | | AdapterImp_TcpClUnit tcpAdap = new AdapterImp_TcpClUnit(); |