PCS设备开关机逻辑修改
This commit is contained in:
@ -1,45 +0,0 @@
|
||||
package com.xzzn.common.enums;
|
||||
|
||||
public enum PcsControlCommand {
|
||||
TOTAL_START(0x0004, "总运行"),
|
||||
TOTAL_STOP(0x0010, "总停机"),
|
||||
TOTAL_RESET(0x0080, "总复位"),
|
||||
// CLUSTER1_START(0x1004, "电池簇1运行"),
|
||||
// CLUSTER1_STOP(0x1010, "电池簇1停机"),
|
||||
// CLUSTER1_RESET(0x1080, "电池簇1复位"),
|
||||
// CLUSTER2_START(0x2004, "电池簇2运行"),
|
||||
// CLUSTER2_STOP(0x2010, "电池簇2停机"),
|
||||
// CLUSTER2_RESET(0x2080, "电池簇2复位"),
|
||||
// CLUSTER3_START(0x3004, "电池簇3运行"),
|
||||
// CLUSTER3_STOP(0x3010, "电池簇3停机"),
|
||||
// CLUSTER3_RESET(0x3080, "电池簇3复位"),
|
||||
// CLUSTER4_START(0x4004, "电池簇4运行"),
|
||||
// CLUSTER4_STOP(0x4010, "电池簇4停机"),
|
||||
// CLUSTER4_RESET(0x4080, "电池簇4复位"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
private final String description;
|
||||
|
||||
PcsControlCommand(int code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public static PcsControlCommand fromDeviceStatus(String deviceStatus) {
|
||||
if (DeviceRunningStatus.RUNNING.getCode().equals(deviceStatus)) {
|
||||
return PcsControlCommand.TOTAL_START;
|
||||
} else if (DeviceRunningStatus.SHUTDOWN.getCode().equals(deviceStatus) ) {
|
||||
return PcsControlCommand.TOTAL_STOP;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user