| | |
| | | return removeNodeFromCach ; |
| | | } |
| | | |
| | | TcpSession tcpSe = TcpSessionCach.getTcpSession(this.result.rtuAddr) ; |
| | | Boolean flag = TcpSessionCach.isConnect(this.result.rtuAddr) ; |
| | | TcpSession tcpSe = TcpSessionCache.getTcpSession(this.result.rtuAddr) ; |
| | | Boolean flag = TcpSessionCache.isConnect(this.result.rtuAddr) ; |
| | | if(tcpSe == null || flag == null || !flag.booleanValue()){ |
| | | //未曾上线或不在线 |
| | | if(!this.result.isCachForOffLine){ |
| | |
| | | } |
| | | |
| | | Long lastSendStamp = tcpSe.lastDownComTime ; |
| | | if(lastSendStamp == null || (now - lastSendStamp >= ServerProperties.commandSendInterval)){ |
| | | //未收到命令结果,未达到最大发送次数,RTU在线,超过命令间下发间隔,以上满足发送命令条件,执行发送命令 |
| | | if(this.result.isQuickSend || lastSendStamp == null || (now - lastSendStamp >= ServerProperties.commandSendInterval)){ |
| | | //未收到命令结果,未达到最大发送次数,RTU在线,速发命令或超过命令下发间隔,以上满足发送命令条件,执行发送命令 |
| | | tcpSe.ioSession.write(this.result.downBuffer) ; |
| | | tcpSe.lastDownComTime = now ; |
| | | if(!this.result.hasResponse){ |