Browse Source

增加阀门开关的指令生成

master
王梦远 3 days ago
parent
commit
9c87ea6512
  1. 56
      src/main/java/com/iflytop/handacid/app/core/command/DeviceCommandGenerator.java

56
src/main/java/com/iflytop/handacid/app/core/command/DeviceCommandGenerator.java

@ -11,6 +11,62 @@ import com.iflytop.handacid.common.enums.MotorDirection;
public class DeviceCommandGenerator { public class DeviceCommandGenerator {
//=========================================== ================================================================= //=========================================== =================================================================
/**
* 阀1 打开
*/
public static DeviceCommand valve1Open() {
return controlCmd(Device.VALVE_1, Action.OPEN, null);
}
/**
* 阀2 打开
*/
public static DeviceCommand valve2Open() {
return controlCmd(Device.VALVE_2, Action.OPEN, null);
}
/**
* 阀3 打开
*/
public static DeviceCommand valve3Open() {
return controlCmd(Device.VALVE_3, Action.OPEN, null);
}
/**
* 阀4 打开
*/
public static DeviceCommand valve4Open() {
return controlCmd(Device.VALVE_4, Action.OPEN, null);
}
/**
* 阀1 关闭
*/
public static DeviceCommand valve1Close() {
return controlCmd(Device.VALVE_1, Action.CLOSE, null);
}
/**
* 阀2 关闭
*/
public static DeviceCommand valve2Close() {
return controlCmd(Device.VALVE_2, Action.CLOSE, null);
}
/**
* 阀3 关闭
*/
public static DeviceCommand valve3Close() {
return controlCmd(Device.VALVE_3, Action.CLOSE, null);
}
/**
* 阀4 关闭
*/
public static DeviceCommand valve4Close() {
return controlCmd(Device.VALVE_4, Action.CLOSE, null);
}
//=========================================== ================================================================= //=========================================== =================================================================
/** /**

Loading…
Cancel
Save