| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(rtuAddr != null){ |
| | | if(protocolName == null){ |
| | | protocolName = TcpSessionCache.getTcpProtocolName(rtuAddr) ; |
| | | boolean toDeal = true ; |
| | | if(ServerProperties.onlyDealRtusTest){ |
| | | boolean find = false ; |
| | | for(String testRtu : ServerProperties.onlyDealRtus){ |
| | | if(testRtu.equals(rtuAddr)){ |
| | | find = true ; |
| | | break ; |
| | | } |
| | | } |
| | | if(!find){ |
| | | //不在处理范围内 |
| | | toDeal = false ; |
| | | } |
| | | } |
| | | |
| | | //设置收到数据时刻 |
| | | TcpSessionCache.cacheUpDataTime(rtuAddr); |
| | | |
| | | if(protocolName != null){ |
| | | //对上行数据进行处理 |
| | | this.dealUpData(session, rtuAddr, protocolName, isOnLine, upBuf, upHex) ; |
| | | if(toDeal){ |
| | | if(protocolName == null){ |
| | | protocolName = TcpSessionCache.getTcpProtocolName(rtuAddr) ; |
| | | } |
| | | |
| | | //设置收到数据时刻 |
| | | TcpSessionCache.cacheUpDataTime(rtuAddr); |
| | | |
| | | if(protocolName != null){ |
| | | //对上行数据进行处理 |
| | | this.dealUpData(session, rtuAddr, protocolName, isOnLine, upBuf, upHex) ; |
| | | } |
| | | } |
| | | } |
| | | } |