| | |
| | | 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; |
| | |
| | | |
| | | |
| | | static { |
| | | depotGrainCmdMap.put("KEY_1", "FC0101010314030100BDDB"); |
| | | depotGrainCmdMap.put("KEY_2", "FC0102040318030200BDDB"); |
| | | depotGrainCmdMap.put("KEY_3", "FC0203010318040100BDDB"); |
| | | depotGrainCmdMap.put("KEY_4", "FC0304010318040100BDDB"); |
| | | depotGrainCmdMap.put("KEY_5", "FC0305040318040200BDDB"); |
| | | depotGrainCmdMap.put("KEY_6", "FC0406010210030100BDDB"); |
| | | depotGrainCmdMap.put("KEY_7", "FC0407030314030200BDDB"); |
| | | depotGrainCmdMap.put("KEY_8", "FC0408060314030300BDDB"); |
| | | depotGrainCmdMap.put("KEY_9", "FC050901042A040100BDDB"); |
| | | depotGrainCmdMap.put("KEY_10", "FC050A010324040100BDDB"); |
| | | depotGrainCmdMap.put("KEY_11", "FC060B04042A040200BDDB"); |
| | | depotGrainCmdMap.put("KEY_1", "FC01010103140301EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_2", "FC01020403180302EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_3", "FC02030103180401EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_4", "FC03040103180401EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_5", "FC03050403180402EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_6", "FC04060102100301EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_7", "FC04070303140302EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_8", "FC04080603140303EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_9", "FC050901042A0401EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_10", "FC060A0103240401EBBDDB"); |
| | | depotGrainCmdMap.put("KEY_11", "FC060B04042A0402EBBDDB"); |
| | | } |
| | | |
| | | /** |
| | | * FC 64 01 01 00 09 01 1A 10 BD DB |
| | | * FC 01 01 01 03 14 03 01 EB BD DB |
| | | * |
| | | * 1仓: FC 01 01 01 03 14 03 01 00 BD DB |
| | | * 2仓: FC 01 02 04 03 18 03 02 00 BD DB |
| | | * 3仓: FC 02 03 01 03 18 04 01 00 BD DB |
| | |
| | | |
| | | 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(); |
| | | } |
| | | |