| | |
| | | import com.zy.common.SpringUtils; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.News; |
| | | import com.zy.core.ThreadHandler; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.properties.DeviceConfig; |
| | | import com.zy.core.thread.FakeThread; |
| | | import com.zy.core.thread.impl.NyShuttleThread; |
| | | import com.zy.core.utils.FakeDeviceUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Slf4j |
| | | @SuppressWarnings("all") |
| | | public class FakeNyShuttleThread implements ThreadHandler { |
| | | public class FakeNyShuttleThread implements FakeThread { |
| | | |
| | | private RedisUtil redisUtil; |
| | | private JSONObject fakeStatusDemo = JSONObject.parseObject("{\"mode\":1,\"extend\":{\"countQuantity\":400,\"suspendState\":0,\"minCellVoltage\":3279,\"chargeCycleTimes\":0,\"maxCellVoltage\":3281,\"surplusQuantity\":204,\"voltage\":5248},\"hasLift\":false,\"hasPallet\":false,\"batteryVoltage\":5248,\"runDirection\":\"2\",\"currentCode\":\"{\\\"x\\\":19,\\\"y\\\":11,\\\"z\\\":2}\",\"errorCode\":\"0\",\"hasCharge\":false,\"batteryPower\":\"51\",\"speed\":0,\"deviceStatus\":1}"); |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public ConcurrentHashMap<String, Thread> getFakeThreadMap() { |
| | | return this.fakeThreadMap; |
| | | } |
| | | |
| | | @Override |
| | | public ConcurrentHashMap<String, JSONObject> getFakeStatusMap() { |
| | | return this.fakeStatusMap; |
| | | } |
| | | |
| | | @Override |
| | | public ConcurrentHashMap<String, JSONObject> getFakeCommandMap() { |
| | | return this.fakeCommandMap; |
| | | } |
| | | } |