Commit 1b33f698 authored by xukaiqiang's avatar xukaiqiang

Update IEC104Client.java

parent b5d3ebfb
package com.yeejoin.amos.iec104.tcp.client;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.log4j.Logger;
import org.springframework.util.ObjectUtils;
import com.yeejoin.amos.iec104.exception.YeeException;
import com.yeejoin.amos.iec104.tcp.IEC104Decoder;
import com.yeejoin.amos.iec104.tcp.IEC104Encoder;
import com.yeejoin.amos.iec104.tcp.utils.ChangeUtils;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.ChannelPromise;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.timeout.IdleStateHandler;
import org.apache.log4j.Logger;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
public class IEC104Client {
private final String host;
......@@ -54,7 +48,6 @@ public class IEC104Client {
if (isClose) {
return;
}
future.addListener(this);
if (future.isSuccess() && future.channel().isActive()) {
isConnected = true;
if (service_connect != null) {
......@@ -218,7 +211,8 @@ public class IEC104Client {
/**
* 发送I帧报文
* @param asduBytes
*
* @param
* @return
*/
// public boolean sendIMessage(String asduBytes) {
......@@ -292,7 +286,6 @@ public class IEC104Client {
// public boolean isSendTest() {
// return isSendTest;
// }
public String getCommonAddress() {
return commonAddress;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment