| | |
| | | package com.zy.core.cache; |
| | | |
| | | import com.zy.core.Slave; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.Task; |
| | | |
| | |
| | | /** |
| | | * mq 交换机初始化 |
| | | */ |
| | | public static void init(SlaveType type, Slave slave) { |
| | | public static void init(SlaveType type, DeviceConfig deviceConfig) { |
| | | switch (type) { |
| | | case Shuttle: |
| | | SHUTTLE_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>()); |
| | | SHUTTLE_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>()); |
| | | break; |
| | | case ForkLift: |
| | | FORK_LIFT_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>()); |
| | | FORK_LIFT_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>()); |
| | | break; |
| | | case ForkLiftMaster: |
| | | FORK_LIFT_MASTER_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>()); |
| | | FORK_LIFT_MASTER_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>()); |
| | | break; |
| | | case Lift: |
| | | LIFT_EXCHANGE.put(slave.getId(), new ConcurrentLinkedQueue<>()); |
| | | LIFT_EXCHANGE.put(deviceConfig.getDeviceNo(), new ConcurrentLinkedQueue<>()); |
| | | break; |
| | | default: |
| | | break; |