| | |
| | | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.core.model.protocol.SteProtocol; |
| | | |
| | | public enum SteTaskModeType { |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // ----------------------------------------------- |
| | | |
| | | public static SteTaskModeType findOriginByLoc(SteProtocol steProtocol) { |
| | | switch (steProtocol.getRow()) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return SteTaskModeType.GO_ORIGIN; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return SteTaskModeType.BACK_ORIGIN; |
| | | default: |
| | | throw new CoolException("解析穿梭车原点定位失败"); |
| | | } |
| | | } |
| | | |
| | | public static SteTaskModeType findInByLoc(SteProtocol steProtocol) { |
| | | switch (steProtocol.getRow()) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return SteTaskModeType.IN_RIGHT; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return SteTaskModeType.IN_LEFT; |
| | | default: |
| | | throw new CoolException("解析穿梭车原点定位失败"); |
| | | } |
| | | } |
| | | |
| | | public static SteTaskModeType findOutByLoc(SteProtocol steProtocol) { |
| | | switch (steProtocol.getRow()) { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 11: |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | case 18: |
| | | return SteTaskModeType.OUT_RIGHT; |
| | | case 4: |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | case 12: |
| | | case 13: |
| | | case 14: |
| | | case 19: |
| | | case 20: |
| | | case 21: |
| | | return SteTaskModeType.OUT_LEFT; |
| | | default: |
| | | throw new CoolException("解析穿梭车原点定位失败"); |
| | | } |
| | | } |
| | | |
| | | } |