| | |
| | | import com.fzzy.gateway.data.BaseResp; |
| | | import com.fzzy.gateway.entity.GatewayDevice; |
| | | import com.fzzy.protocol.ProtocolUtils; |
| | | import com.fzzy.protocol.youxian0.client.ClientEngine; |
| | | import com.fzzy.protocol.wujia.client.ClientEngine; |
| | | import com.ld.io.api.InvokeResult; |
| | | import io.netty.channel.Channel; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | String hexStr = buildGrainCmd(device); |
| | | |
| | | Channel channel = null; |
| | | Channel channel = ClientEngine.getChannel(); |
| | | if (null == channel) { |
| | | ClientEngine clientEngine = new ClientEngine(device.getIp(), device.getPort()); |
| | | clientEngine.start(); |
| | | Thread.sleep(300); |
| | | Thread.sleep(1000); |
| | | channel = clientEngine.getChannel(); |
| | | } |
| | | |