| | |
| | | |
| | | @Value("${deviceMsgConfig.gatewayPort}") |
| | | private int gatewayPort; |
| | | @Value("${deviceMsgConfig.enableFakeDeviceThread}") |
| | | private boolean enableFakeDeviceThread; |
| | | @Value("${deviceMsgConfig.enableFake}") |
| | | private boolean enableFake; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | |
| | | } |
| | | |
| | | private void initFakeThread(){ |
| | | ThreadHandler thread = new FakeNyShuttleThread(redisUtil, gatewayPort); |
| | | ThreadHandler thread = new FakeNyShuttleThread(redisUtil, gatewayPort, enableFake, enableFakeDeviceThread); |
| | | new Thread(thread).start(); |
| | | SlaveConnection.put(SlaveType.FakeThread, 1, thread); |
| | | |
| | | ThreadHandler thread2 = new FakeZyForkLiftThread(redisUtil); |
| | | new Thread(thread2).start(); |
| | | SlaveConnection.put(SlaveType.FakeThread, 2, thread2); |
| | | } |
| | | |
| | | |