| | |
| | | * 小车电量检测 ===>> 发起充电 |
| | | */ |
| | | public synchronized void loopSteCharge() { |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | SteChargeType steChargeType = SteChargeType.get(wrkCharge.getLocNo()); |
| | | |
| | | for (SteSlave ste : slaveProperties.getSte()) { |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, ste.getId()); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | |
| | | |
| | | public enum SteChargeType { |
| | | |
| | | FIRST(1, "0100101", "0300101"), |
| | | SECOND(2, "1400701", "1200701"), |
| | | THIRD(3, "2100401", "1900401"), |
| | | FIRST(1, "0100101"), |
| | | SECOND(2, "0100201"), |
| | | THIRD(3, "0100301"), |
| | | ; |
| | | |
| | | SteChargeType(int ssbm, String locNo, String idleLoc) { |
| | | SteChargeType(int ssbm, String locNo) { |
| | | this.ssbm = ssbm; |
| | | this.locNo = locNo; |
| | | this.idleLoc = idleLoc; |
| | | } |
| | | |
| | | public int ssbm; |
| | | |
| | | public String locNo; |
| | | |
| | | public String idleLoc; |
| | | |
| | | public static SteChargeType get(String locNo) { |
| | | if (Cools.isEmpty(locNo)) { |
| | |
| | | } |
| | | SteChargeType[] values = SteChargeType.values(); |
| | | for (SteChargeType value : values) { |
| | | if (value.idleLoc.equals(locNo)) { |
| | | if (value.locNo.equals(locNo)) { |
| | | return value; |
| | | } |
| | | } |