| | |
| | | |
| | | export const ANIMATE_DURING_TIME = 1000; |
| | | export const ANIMATE_DURING_TIME = 300; |
| | | |
| | | export const MAP_DEFAULT_ROTATION = 270; |
| | | |
| | |
| | | @Component |
| | | public class MapDataWsScheduler { |
| | | |
| | | public static final int WEBSOCKET_BROADCAST_INTERVAL = 1000; |
| | | public static final int WEBSOCKET_BROADCAST_INTERVAL = 300; |
| | | |
| | | private ExecutorService singleThreadExecutor; |
| | | |
| | |
| | | |
| | | |
| | | Integer serial = dynamicNode.getSerial(); |
| | | long time = dynamicNode.getTime(); |
| | | |
| | | List<String> resetCodeList = new ArrayList<>(); |
| | | |
| | |
| | | |
| | | DynamicNode node = dynamicMatrix[i][j]; |
| | | if (node.getVehicle().equals(agvNo)) { |
| | | if (node.getSerial() < serial || node.getTime() != time) { |
| | | if (node.getSerial() < serial) { |
| | | resetCodeList.add(codeMatrix[i][j]); |
| | | } |
| | | } |
| | |
| | | if (Cools.isEmpty(codeList, vehicle)) { |
| | | return; |
| | | } |
| | | long time = System.currentTimeMillis() / 1000; |
| | | // long time = System.currentTimeMillis() / 1000; |
| | | int serial = 1; |
| | | for (String code : codeList) { |
| | | int[] node = getCodeMatrixIdx(lev, code); |
| | | dynamicMatrix[node[0]][node[1]] = new DynamicNode(vehicle, serial, time); |
| | | dynamicMatrix[node[0]][node[1]] = new DynamicNode(vehicle, serial); |
| | | serial++; |
| | | } |
| | | } else { |
| | |
| | | |
| | | private Integer serial = -1; |
| | | |
| | | private long time = 0; |
| | | |
| | | public DynamicNode() {} |
| | | |
| | | public DynamicNode(String vehicle) { |
| | |
| | | this.serial = serial; |
| | | } |
| | | |
| | | public DynamicNode(String vehicle, Integer serial, long time) { |
| | | this.vehicle = vehicle; |
| | | this.serial = serial; |
| | | this.time = time; |
| | | } |
| | | } |