diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartRecycleCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartRecycleCommandHandler.java deleted file mode 100644 index d40f168..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartRecycleCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理冷阱开启循环指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cold_trap_start_recycle") -public class ColdTrapStartRecycleCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartRefrigerationCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartRefrigerationCommandHandler.java deleted file mode 100644 index ab76de8..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartRefrigerationCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理启动冷阱制冷指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cold_trap_start_refrigeration") -public class ColdTrapStartRefrigerationCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopHeatingCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopHeatingCommandHandler.java deleted file mode 100644 index 778cb84..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopHeatingCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理冷阱停止加热指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cold_trap_stop_heating") -public class ColdTrapStopHeatingCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopRecycleCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopRecycleCommandHandler.java deleted file mode 100644 index da603ee..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopRecycleCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止冷阱循环指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cold_trap_stop_recycle") -public class ColdTrapStopRecycleCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopRefrigerationCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopRefrigerationCommandHandler.java deleted file mode 100644 index 17d4958..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStopRefrigerationCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止冷阱制冷指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cold_trap_stop_refrigeration") -public class ColdTrapStopRefrigerationCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorLiftDownCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorLiftDownCommandHandler.java deleted file mode 100644 index 8b021bd..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorLiftDownCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理拍子电机下降指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cover_elevator_lift_down") -public class CoverElevatorLiftDownCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorLiftUpCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorLiftUpCommandHandler.java deleted file mode 100644 index a3d6fc4..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorLiftUpCommandHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - - -/** - * 处理拍子电机抬升指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_cover_elevator_lift_up") -public class CoverElevatorLiftUpCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorResetCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorResetCommandHandler.java deleted file mode 100644 index 0a50744..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorResetCommandHandler.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; - -/** - * 处理拍子抬升电机复位指令 - */ -@CommandMapping("debug_cover_elevator_reset") -public class CoverElevatorResetCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorStopCommandHandler.java deleted file mode 100644 index 64bc55a..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/CoverElevatorStopCommandHandler.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; - -/** - * 处理拍子抬升电机停止指令 - */ -@CommandMapping("debug_cover_elevator_stop") -public class CoverElevatorStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/DoorCloseCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/DoorCloseCommandHandler.java deleted file mode 100644 index bc7fe5e..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/DoorCloseCommandHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理关门指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_door_close") -public class DoorCloseCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/DoorOpenCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/DoorOpenCommandHandler.java deleted file mode 100644 index d70319e..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/DoorOpenCommandHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理开门指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_door_open") -public class DoorOpenCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/DoorStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/DoorStopCommandHandler.java deleted file mode 100644 index 56fdf8e..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/DoorStopCommandHandler.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止门运动指令处理器 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_door_stop") -public class DoorStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStartCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStartCommandHandler.java deleted file mode 100644 index 5f55f37..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStartCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理启动加热器指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_heater_start") -public class HeaterStartCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStartHeatMaintainingCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStartHeatMaintainingCommandHandler.java deleted file mode 100644 index 523ed25..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStartHeatMaintainingCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理启动加热器恒温指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_heater_start_heat_maintaining") -public class HeaterStartHeatMaintainingCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStopCommandHandler.java deleted file mode 100644 index 8c0bce5..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStopCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止加热器指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_heater_stop") -public class HeaterStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStopMaintainingCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStopMaintainingCommandHandler.java deleted file mode 100644 index d8eb9cd..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HeaterStopMaintainingCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止恒温加热指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_heater_stop_heat_maintaining") -public class HeaterStopMaintainingCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawCloseCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawCloseCommandHandler.java deleted file mode 100644 index 0959ad3..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawCloseCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理夹爪闭合指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_holding_jaw_close") -public class HoldingJawCloseCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawOpenCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawOpenCommandHandler.java deleted file mode 100644 index ea7b28e..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawOpenCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理打开夹爪指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_holding_jaw_open") -public class HoldingJawOpenCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawPauseCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawPauseCommandHandler.java deleted file mode 100644 index 7ec830d..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/HoldingJawPauseCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理暂停夹爪指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_holding_jaw_pause") -public class HoldingJawPauseCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmResetCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmResetCommandHandler.java deleted file mode 100644 index e8475f8..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmResetCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 复位加液臂指令处理器 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_arm_reset") -public class LiquidArmResetCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmRotateCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmRotateCommandHandler.java deleted file mode 100644 index c3bb30f..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmRotateCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理加液臂旋转指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_arm_rotation") -public class LiquidArmRotateCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmStopCommandHandler.java deleted file mode 100644 index 8892153..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidArmStopCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理加液臂停止指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_arm_stop") -public class LiquidArmStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpPreEvacuateCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpPreEvacuateCommandHandler.java deleted file mode 100644 index b907480..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpPreEvacuateCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理排空加液头指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_pump_pre_evacuation") -public class LiquidPumpPreEvacuateCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpPrefillCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpPrefillCommandHandler.java deleted file mode 100644 index bc2e29c..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpPrefillCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理加液头预充指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_pump_pre_filling") -public class LiquidPumpPrefillCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpStartCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpStartCommandHandler.java deleted file mode 100644 index 03aeb22..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpStartCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理加液泵启动指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_pump_start") -public class LiquidPumpStartCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpStopCommandHandler.java deleted file mode 100644 index 0ab86fd..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/LiquidPumpStopCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理加液泵停止指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_liquid_pump_stop") -public class LiquidPumpStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorLiftDownCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorLiftDownCommandHandler.java deleted file mode 100644 index 579d93a..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorLiftDownCommandHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - - -/** - * 处理降下托盘指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_pallet_elevator_lift_down") -public class PalletElevatorLiftDownCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorLiftUpCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorLiftUpCommandHandler.java deleted file mode 100644 index 58301c6..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorLiftUpCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理托盘电机上升指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_pallet_elevator_lift_up") -public class PalletElevatorLiftUpCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorStopCommandHandler.java deleted file mode 100644 index b9e159d..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/PalletElevatorStopCommandHandler.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - - -/** - * 处理停止托盘抬升器指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_pallet_elevator_stop") -public class PalletElevatorStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ShakerStartCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ShakerStartCommandHandler.java deleted file mode 100644 index 9f874fa..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ShakerStartCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理启动摇匀器指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_shaker_start") -public class ShakerStartCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ShakerStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/ShakerStopCommandHandler.java deleted file mode 100644 index c96360d..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ShakerStopCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止摇匀器指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_shaker_stop") -public class ShakerStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmMoveCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmMoveCommandHandler.java deleted file mode 100644 index 5577165..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmMoveCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理移动转移机械臂指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_transportation_arm_move") -public class TransportationArmMoveCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmResetCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmResetCommandHandler.java deleted file mode 100644 index 5ae4d51..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmResetCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理复位转移机械臂指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_transportation_arm_reset") -public class TransportationArmResetCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmStopCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmStopCommandHandler.java deleted file mode 100644 index 60a6569..0000000 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/TransportationArmStopCommandHandler.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.iflytop.gd.app.cmd.debug; - -import com.iflytop.gd.app.core.BaseCommandHandler; -import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.annotation.CommandMapping; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -/** - * 处理停止转移机械臂移动指令 - */ -@Slf4j -@Component -@RequiredArgsConstructor -@CommandMapping("debug_transportation_arm_stop") -public class TransportationArmStopCommandHandler extends BaseCommandHandler { - @Override - public void handle(CmdDTO cmdDTO) { - - } -} diff --git a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartHeatingCommandHandler.java b/src/main/java/com/iflytop/gd/app/cmd/debug/debugDoorMove.java similarity index 77% rename from src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartHeatingCommandHandler.java rename to src/main/java/com/iflytop/gd/app/cmd/debug/debugDoorMove.java index 22af28d..a3341b3 100644 --- a/src/main/java/com/iflytop/gd/app/cmd/debug/ColdTrapStartHeatingCommandHandler.java +++ b/src/main/java/com/iflytop/gd/app/cmd/debug/debugDoorMove.java @@ -12,20 +12,19 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; /** - * 处理冷阱开启加热 + * 门电机 移动指定距离 */ @Slf4j @Component @RequiredArgsConstructor -@CommandMapping("debug_cold_trap_start_heating") -public class ColdTrapStartHeatingCommandHandler extends BaseCommandHandler { +@CommandMapping("debug_door_move") +public class debugDoorMove extends BaseCommandHandler { private final DeviceCommandService deviceCommandService; - @Override public void handle(CmdDTO cmdDTO) throws Exception { - DeviceCommand deviceCommand = DeviceCommandGenerator.coldTrapOpenHeart(); + Double position = cmdDTO.getDoubleParam("position"); + DeviceCommand deviceCommand = DeviceCommandGenerator.doorMove(position); CommandFuture deviceCommandFuture = deviceCommandService.sendCommand(cmdDTO.getCommandId(), cmdDTO.getCommand(), deviceCommand); commandWait(deviceCommandFuture); - } } diff --git a/src/main/java/com/iflytop/gd/app/controller/CmdController.java b/src/main/java/com/iflytop/gd/app/controller/CmdController.java index e462bec..4e18db2 100644 --- a/src/main/java/com/iflytop/gd/app/controller/CmdController.java +++ b/src/main/java/com/iflytop/gd/app/controller/CmdController.java @@ -1,9 +1,8 @@ package com.iflytop.gd.app.controller; -import com.iflytop.gd.common.cmd.CommandHandler; import com.iflytop.gd.app.core.CommandHandlerRegistry; import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.exception.UnSupportCommandException; +import com.iflytop.gd.common.cmd.CommandHandler; import com.iflytop.gd.common.result.Result; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; @@ -25,19 +24,11 @@ public class CmdController { @Operation(summary = "前端统一调用一个接口") @PostMapping - public Result controlMethod(@Valid @RequestBody CmdDTO cmdDTO) { + public Result controlMethod(@Valid @RequestBody CmdDTO cmdDTO) throws Exception { String commandName = cmdDTO.getCommand(); - try { - CommandHandler commandHandler = registry.getCommandHandler(commandName); - log.info("业务指令开始执行"); - commandHandler.handle(cmdDTO); - } catch (UnSupportCommandException exception) { - log.error("未找到对应的业务指令"); - return Result.failed(exception.getMessage()); - } catch (Exception e) { - log.error("执行业务指令发生异常: {}", cmdDTO, e); - return Result.failed(e.getMessage()); - } + CommandHandler commandHandler = registry.getCommandHandler(commandName); + log.info("业务指令开始执行"); + commandHandler.handle(cmdDTO); return Result.success(); } diff --git a/src/main/java/com/iflytop/gd/app/controller/CmdDebugController.java b/src/main/java/com/iflytop/gd/app/controller/CmdDebugController.java index ddbd568..d8b3357 100644 --- a/src/main/java/com/iflytop/gd/app/controller/CmdDebugController.java +++ b/src/main/java/com/iflytop/gd/app/controller/CmdDebugController.java @@ -1,10 +1,9 @@ package com.iflytop.gd.app.controller; +import com.iflytop.gd.app.core.CommandHandlerRegistry; import com.iflytop.gd.app.model.dto.CmdDTO; -import com.iflytop.gd.common.exception.UnSupportCommandException; -import com.iflytop.gd.common.result.Result; import com.iflytop.gd.common.cmd.CommandHandler; -import com.iflytop.gd.app.core.CommandHandlerRegistry; +import com.iflytop.gd.common.result.Result; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; @@ -15,8 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import java.util.concurrent.CompletableFuture; - @Tag(name = "前端调试指令") @RestController @RequestMapping("/api/debug/cmd") @@ -27,22 +24,11 @@ public class CmdDebugController { @Operation(summary = "前端调试指令") @PostMapping - public Result controlMethod(@Valid @RequestBody CmdDTO cmdDTO) { + public Result controlMethod(@Valid @RequestBody CmdDTO cmdDTO) throws Exception { String commandName = cmdDTO.getCommand(); - try { - log.info("收到调试指令{}", commandName); - CommandHandler commandHandler = registry.getCommandHandler(commandName); - log.info("找到指令处理器{}", commandHandler.getClass().getName()); - commandHandler.handle(cmdDTO); - log.info("指令处理器提交异步执行"); - } catch (UnSupportCommandException exception) { - log.error("未找到对应的调试指令{}", commandName); - String errorMsg = "未找到对应的调试指令, commandName=" + commandName; - return Result.failed(errorMsg); - } catch (Exception e) { - log.error("执行调试指令发生异常: {}", cmdDTO, e); - return Result.failed(e.getMessage()); - } + CommandHandler commandHandler = registry.getCommandHandler(commandName); + log.info("调试指令开始执行"); + commandHandler.handle(cmdDTO); return Result.success(); } diff --git a/src/main/java/com/iflytop/gd/app/core/CommandHandlerRegistry.java b/src/main/java/com/iflytop/gd/app/core/CommandHandlerRegistry.java index 35fa891..449862a 100644 --- a/src/main/java/com/iflytop/gd/app/core/CommandHandlerRegistry.java +++ b/src/main/java/com/iflytop/gd/app/core/CommandHandlerRegistry.java @@ -1,8 +1,10 @@ package com.iflytop.gd.app.core; -import com.iflytop.gd.common.exception.UnSupportCommandException; import com.iflytop.gd.common.annotation.CommandMapping; import com.iflytop.gd.common.cmd.CommandHandler; +import com.iflytop.gd.common.exception.AppException; +import com.iflytop.gd.common.exception.UnSupportCommandException; +import com.iflytop.gd.common.result.ResultCode; import io.micrometer.common.lang.NonNull; import jakarta.annotation.PostConstruct; import jakarta.validation.constraints.NotNull; @@ -42,13 +44,14 @@ public class CommandHandlerRegistry implements ApplicationContextAware { /** * 通过模块名称和命令名称获取命令处理器 + * * @param commandName 命令名称 * @return 命令处理器 * @throws UnSupportCommandException */ public CommandHandler getCommandHandler(@NotNull String commandName) throws UnSupportCommandException { if (!handlerMap.containsKey(commandName)) { - throw new UnSupportCommandException("commandName=" + commandName); + throw new AppException(ResultCode.COMMAND_NOT_FOUND); } return handlerMap.get(commandName); } diff --git a/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandGenerator.java b/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandGenerator.java index 20bd96d..b19742a 100644 --- a/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandGenerator.java +++ b/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandGenerator.java @@ -9,447 +9,514 @@ import com.iflytop.gd.common.enums.cmd.*; public class DeviceCommandGenerator { /** - * 门 打开 + * 门 移动 + * + * @param position 位置 单位mm */ - public static DeviceCommand doorOpen() { - return controlMotorCmd(CmdDevice.door, CmdAction.open, null, "打开设备门"); + public static DeviceCommand doorMove(Double position) { + DeviceCommandParams params = new DeviceCommandParams(); + params.setPosition(position); + return controlMotorCmd(CmdDevice.door_motor, CmdAction.move, params, "门 移动"); } /** - * 门 关闭 + * 门 停止动作 */ - public static DeviceCommand doorClose() { - return controlMotorCmd(CmdDevice.door, CmdAction.close, null, "关闭设备门"); + public static DeviceCommand doorStop() { + return controlMotorCmd(CmdDevice.door_motor, CmdAction.stop, null, "门 停止"); } /** - * 门 停止动作 + * 门 回原点 */ - public static DeviceCommand doorStop() { - return controlMotorCmd(CmdDevice.door, CmdAction.stop, null, "停止门动作"); + public static DeviceCommand doorOrigin() { + return controlMotorCmd(CmdDevice.door_motor, CmdAction.origin, null, "门 回原点"); } /** - * 摇匀电机 设置参数 + * 门 设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand shakeMotorSet(Double current, Double speed) { + public static DeviceCommand doorSet(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); params.setSpeed(speed); - return setInfoCmd(CmdDevice.shake_motor, CmdAction.set, params, "摇匀电机设置参数"); + return setInfoCmd(CmdDevice.door_motor, CmdAction.set, null, "门 设置参数"); } /** * 摇匀电机 开始摇匀 */ public static DeviceCommand shakeMotorStart() { - return controlMotorCmd(CmdDevice.shake_motor, CmdAction.start, null, "开始摇匀"); + return controlMotorCmd(CmdDevice.shake_motor, CmdAction.start, null, "摇匀 开始"); } /** * 摇匀电机 结束摇匀 */ public static DeviceCommand shakeMotorStop() { - return controlMotorCmd(CmdDevice.shake_motor, CmdAction.stop, null, "结束摇匀"); + return controlMotorCmd(CmdDevice.shake_motor, CmdAction.stop, null, "摇匀 结束"); } /** - * 托盘电机 设置参数 + * 摇匀电机 设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 r/s */ - public static DeviceCommand trayMotorSet(Double current, Double speed) { + public static DeviceCommand shakeMotorSet(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); params.setSpeed(speed); - return setInfoCmd(CmdDevice.tray_motor, CmdAction.set, params, "托盘电机设置参数"); - } - - /** - * 托盘电机 回原点 - */ - public static DeviceCommand trayMotorOrigin() { - return controlMotorCmd(CmdDevice.tray_motor, CmdAction.origin, null, "托盘电机回原点"); + return setInfoCmd(CmdDevice.shake_motor, CmdAction.set, params, "摇匀 设置参数"); } /** - * 托盘电机 移动 + * 拍子升降电机 移动 + * + * @param position 位置 单位mm */ public static DeviceCommand trayMotorMove(Double position) { DeviceCommandParams params = new DeviceCommandParams(); params.setPosition(position); - return controlMotorCmd(CmdDevice.tray_motor, CmdAction.move, params, "托盘电机移动"); + return controlMotorCmd(CmdDevice.tray_motor, CmdAction.move, params, "拍子升降电机 移动"); } /** - * 托盘电机 停止移动 + * 拍子升降电机 停止移动 */ public static DeviceCommand trayMotorStop() { - return controlMotorCmd(CmdDevice.tray_motor, CmdAction.stop, null, "托盘电机停止移动"); + return controlMotorCmd(CmdDevice.tray_motor, CmdAction.stop, null, "拍子升降电机 停止移动"); } + /** + * 拍子升降电机 回原点 + */ + public static DeviceCommand trayMotorOrigin() { + return controlMotorCmd(CmdDevice.tray_motor, CmdAction.origin, null, "拍子升降电机 回原点"); + } /** - * 双轴械臂 设置参数 + * 拍子升降电机 设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand dualRobotSet(CmdAxis axis, Double speed) { + public static DeviceCommand trayMotorSet(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setAxis(axis); + params.setCurrent(current); params.setSpeed(speed); - return setInfoCmd(CmdDevice.dual_robot, CmdAction.set, params, "双轴械臂设置参数"); + return setInfoCmd(CmdDevice.tray_motor, CmdAction.set, params, "拍子升降电机 设置参数"); } + /** - * 双轴械臂 回原点 + * 双轴械臂 移动关节1 + * + * @param position 位置 单位° + * @param speed 速度 单位 °/s */ - public static DeviceCommand dualRobotOrigin(CmdAxis axis) { + public static DeviceCommand dualRobotJoint1Move(Double position, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setAxis(axis); - return controlCmd(CmdDevice.dual_robot, CmdAction.origin, params, "双轴械臂回原点"); + params.setAxis(CmdAxis.joint1); + params.setPosition(position); + params.setSpeed(speed); + return controlCmd(CmdDevice.dual_robot, CmdAction.move_joint, params, "双轴械臂 移动关节1"); } /** - * 双轴械臂 移动关节 + * 双轴械臂 移动关节2 + * + * @param position 位置 单位° + * @param speed 速度 单位 °/s */ - public static DeviceCommand dualRobotMoveJoint(CmdAxis axis, CmdDirection direction, Double angle, Double speed) { + public static DeviceCommand dualRobotJoint2Move(Double position, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setAxis(axis); - params.setDirection(direction); - params.setAngle(angle); + params.setAxis(CmdAxis.joint2); + params.setPosition(position); params.setSpeed(speed); - return controlCmd(CmdDevice.dual_robot, CmdAction.move_x_joint, params, "双轴械臂移动关节"); + return controlCmd(CmdDevice.dual_robot, CmdAction.move_joint, params, "双轴械臂 移动关节2"); } /** - * 双轴械臂 x移动位置 + * 双轴械臂 移动至指定点 + * + * @param speed 速度 单位 °/s + * @param x 位置x + * @param y 位置y */ - public static DeviceCommand dualRobotXMovePos(CmdDirection direction, Double position, Double speed) { + public static DeviceCommand dualRobotMovePoint(Double speed, Double x, Double y) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return controlCmd(CmdDevice.dual_robot, CmdAction.move_x_joint, params, "双轴械臂移动x"); + params.setX(x); + params.setY(y); + return controlCmd(CmdDevice.dual_robot, CmdAction.move_point, params, "双轴械臂 移动至指定点"); } /** - * 双轴械臂 y移动位置 + * 双轴械臂 轴1停止移动 */ - public static DeviceCommand dualRobotYMovePos(CmdDirection direction, Double position, Double speed) { + public static DeviceCommand dualRobotJoint1Stop() { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setPosition(position); - params.setSpeed(speed); - return controlCmd(CmdDevice.dual_robot, CmdAction.move_y_joint, params, "双轴械臂移动y"); + params.setAxis(CmdAxis.joint1); + return controlCmd(CmdDevice.dual_robot, CmdAction.stop, params, "双轴械臂 轴1停止移动"); + } + + /** + * 双轴械臂 轴2停止移动 + */ + public static DeviceCommand dualRobotJoint2Stop() { + DeviceCommandParams params = new DeviceCommandParams(); + params.setAxis(CmdAxis.joint2); + return controlCmd(CmdDevice.dual_robot, CmdAction.stop, params, "双轴械臂 轴2停止移动"); + } + + + /** + * 双轴械臂 轴1回原点 + */ + public static DeviceCommand dualRobotJoint1Origin() { + DeviceCommandParams params = new DeviceCommandParams(); + params.setAxis(CmdAxis.joint1); + return controlCmd(CmdDevice.dual_robot, CmdAction.origin, params, "双轴械臂 轴1回原点"); } + /** + * 双轴械臂 轴2回原点 + */ + public static DeviceCommand dualRobotJoint2Origin() { + DeviceCommandParams params = new DeviceCommandParams(); + params.setAxis(CmdAxis.joint2); + return controlCmd(CmdDevice.dual_robot, CmdAction.origin, params, "双轴械臂 轴2回原点"); + } + + + /** + * 双轴械臂 轴1设置参数 + * + * @param speed 速度 单位 °/s + */ + public static DeviceCommand dualRobotJoint1Set(Double speed) { + DeviceCommandParams params = new DeviceCommandParams(); + params.setAxis(CmdAxis.joint1); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.dual_robot, CmdAction.set, params, "双轴械臂 轴1设置参数"); + } /** - * 双轴械臂 停止移动 + * 双轴械臂 轴2设置参数 + * + * @param speed 速度 单位 °/s */ - public static DeviceCommand dualRobotStop(CmdAxis axis) { + public static DeviceCommand dualRobotJoint2Set(Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setAxis(axis); - return controlCmd(CmdDevice.dual_robot, CmdAction.stop, params, "双轴械臂停止移动"); + params.setAxis(CmdAxis.joint1); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.dual_robot, CmdAction.set, params, "双轴械臂 轴2设置参数"); } /** * 龙门架 x轴设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand hBotXSet(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand gantryXSet(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.hbot_x, CmdAction.set, params, "龙门架x轴设置参数"); + return setInfoCmd(CmdDevice.gantry_x, CmdAction.set, params, "龙门架 x轴设置参数"); } /** * 龙门架 y轴设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand hBotYSet(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand gantryYSet(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.hbot_y, CmdAction.set, params, "龙门架y轴设置参数"); + return setInfoCmd(CmdDevice.gantry_y, CmdAction.set, params, "龙门架 y轴设置参数"); } /** * 龙门架 z轴设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand hBotZSet(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand gantryZSet(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.hbot_z, CmdAction.set, params, "龙门架z轴设置参数"); + return setInfoCmd(CmdDevice.gantry_z, CmdAction.set, params, "龙门架 z轴设置参数"); } /** * 龙门架 x轴回原点 */ - public static DeviceCommand hBotXOrigin() { - return controlMotorCmd(CmdDevice.hbot_x, CmdAction.origin, null, "龙门架x轴回原点"); + public static DeviceCommand gantryXOrigin() { + return controlMotorCmd(CmdDevice.gantry_x, CmdAction.origin, null, "龙门架 x轴回原点"); } /** * 龙门架 y轴回原点 */ - public static DeviceCommand hBotYOrigin() { - return controlMotorCmd(CmdDevice.hbot_y, CmdAction.origin, null, "龙门架y轴回原点"); + public static DeviceCommand gantryYOrigin() { + return controlMotorCmd(CmdDevice.gantry_y, CmdAction.origin, null, "龙门架 y轴回原点"); } /** * 龙门架 z轴回原点 */ - public static DeviceCommand hBotZOrigin() { - return controlMotorCmd(CmdDevice.hbot_z, CmdAction.origin, null, "龙门架z轴回原点"); + public static DeviceCommand gantryZOrigin() { + return controlMotorCmd(CmdDevice.gantry_z, CmdAction.origin, null, "龙门架 z轴回原点"); } /** * 龙门架 x轴移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand hBotXMove(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand gantryXMove(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.hbot_z, CmdAction.move, params, "龙门架x轴移动"); + return controlMotorCmd(CmdDevice.gantry_z, CmdAction.move, params, "龙门架 x轴移动"); } /** * 龙门架 y轴移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand hBotYMove(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand gantryYMove(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.hbot_y, CmdAction.move, params, "龙门架y轴移动"); + return controlMotorCmd(CmdDevice.gantry_y, CmdAction.move, params, "龙门架 y轴移动"); } /** * 龙门架 z轴移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand hBotZMove(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand gantryZMove(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.hbot_z, CmdAction.move, params, "龙门架z轴移动"); + return controlMotorCmd(CmdDevice.gantry_z, CmdAction.move, params, "龙门架 z轴移动"); } /** * 龙门架 x轴停止 */ - public static DeviceCommand hBotXStop() { - return controlMotorCmd(CmdDevice.hbot_x, CmdAction.stop, null, "龙门架x轴停止"); + public static DeviceCommand gantryXStop() { + return controlMotorCmd(CmdDevice.gantry_x, CmdAction.stop, null, "龙门架 x轴停止"); } /** * 龙门架 y轴停止 */ - public static DeviceCommand hBotYStop() { - return controlMotorCmd(CmdDevice.hbot_y, CmdAction.stop, null, "龙门架y轴停止"); + public static DeviceCommand gantryYStop() { + return controlMotorCmd(CmdDevice.gantry_y, CmdAction.stop, null, "龙门架 y轴停止"); } /** * 龙门架 z轴停止 */ - public static DeviceCommand hBotZStop() { - return controlMotorCmd(CmdDevice.hbot_z, CmdAction.stop, null, "龙门架z轴停止"); + public static DeviceCommand gantryZStop() { + return controlMotorCmd(CmdDevice.gantry_z, CmdAction.stop, null, "龙门架 z轴停止"); } /** * 加热区顶升电机 加热位1设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand heaterMotor1Set(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor1Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.heater_motor_1, CmdAction.set, params, "加热区顶升电机加热位1设置参数"); + return setInfoCmd(CmdDevice.heater_motor_1, CmdAction.set, params, "加热区顶升电机 加热位1设置参数"); } /** * 加热区顶升电机 加热位2设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand heaterMotor2Set(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor2Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.heater_motor_2, CmdAction.set, params, "加热区顶升电机加热位2设置参数"); + return setInfoCmd(CmdDevice.heater_motor_2, CmdAction.set, params, "加热区顶升电机 加热位2设置参数"); } /** * 加热区顶升电机 加热位3设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand heaterMotor3Set(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor3Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.heater_motor_3, CmdAction.set, params, "加热区顶升电机加热位3设置参数"); + return setInfoCmd(CmdDevice.heater_motor_3, CmdAction.set, params, "加热区顶升电机 加热位3设置参数"); } /** * 加热区顶升电机 加热位4设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand heaterMotor4Set(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor4Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.heater_motor_4, CmdAction.set, params, "加热区顶升电机加热位4设置参数"); + return setInfoCmd(CmdDevice.heater_motor_4, CmdAction.set, params, "加热区顶升电机 加热位4设置参数"); } /** * 加热区顶升电机 加热位5设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand heaterMotor5Set(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor5Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.heater_motor_5, CmdAction.set, params, "加热区顶升电机加热位5设置参数"); + return setInfoCmd(CmdDevice.heater_motor_5, CmdAction.set, params, "加热区顶升电机 加热位5设置参数"); } /** * 加热区顶升电机 加热位6设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand heaterMotor6Set(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor6Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setCurrent(current); - params.setDirection(direction); - params.setPosition(position); params.setSpeed(speed); - return setInfoCmd(CmdDevice.heater_motor_6, CmdAction.set, params, "加热区顶升电机加热位6设置参数"); + return setInfoCmd(CmdDevice.heater_motor_6, CmdAction.set, params, "加热区顶升电机 加热位6设置参数"); } /** * 加热区顶升电机 加热位1回原点 */ public static DeviceCommand heaterMotor1Origin() { - return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.origin, null, "加热区顶升电机加热位1回原点"); + return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.origin, null, "加热区顶升电机 加热位1回原点"); } /** * 加热区顶升电机 加热位2回原点 */ public static DeviceCommand heaterMotor2Origin() { - return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.origin, null, "加热区顶升电机加热位2回原点"); + return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.origin, null, "加热区顶升电机 加热位2回原点"); } /** * 加热区顶升电机 加热位3回原点 */ public static DeviceCommand heaterMotor3Origin() { - return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.origin, null, "加热区顶升电机加热位3回原点"); + return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.origin, null, "加热区顶升电机 加热位3回原点"); } /** * 加热区顶升电机 加热位4回原点 */ public static DeviceCommand heaterMotor4Origin() { - return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.origin, null, "加热区顶升电机加热位4回原点"); + return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.origin, null, "加热区顶升电机 加热位4回原点"); } /** * 加热区顶升电机 加热位5回原点 */ public static DeviceCommand heaterMotor5Origin() { - return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.origin, null, "加热区顶升电机加热位5回原点"); + return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.origin, null, "加热区顶升电机 加热位5回原点"); } /** * 加热区顶升电机 加热位6回原点 */ public static DeviceCommand heaterMotor6Origin() { - return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.origin, null, "加热区顶升电机加热位6回原点"); + return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.origin, null, "加热区顶升电机 加热位6回原点"); } /** * 加热区顶升电机 加热位1移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand heaterMotor1Move(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor1Move(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.move, params, "加热区顶升电机加热位1移动"); + return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.move, params, "加热区顶升电机 加热位1移动"); } /** * 加热区顶升电机 加热位2移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand heaterMotor2Move(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor2Move(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.move, params, "加热区顶升电机加热位2移动"); + return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.move, params, "加热区顶升电机 加热位2移动"); } /** * 加热区顶升电机 加热位3移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand heaterMotor3Move(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor3Move(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.move, params, "加热区顶升电机加热位3移动"); + return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.move, params, "加热区顶升电机 加热位3移动"); } /** * 加热区顶升电机 加热位4移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand heaterMotor4Move(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor4Move(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.move, params, "加热区顶升电机加热位4移动"); + return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.move, params, "加热区顶升电机 加热位4移动"); } /** * 加热区顶升电机 加热位5移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand heaterMotor5Move(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor5Move(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.move, params, "加热区顶升电机加热位5移动"); + return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.move, params, "加热区顶升电机 加热位5移动"); } /** * 加热区顶升电机 加热位6移动 + * + * @param position 位置 单位 mm */ - public static DeviceCommand heaterMotor6Move(Double current, CmdDirection direction, Double position, Double speed) { + public static DeviceCommand heaterMotor6Move(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setCurrent(current); - params.setDirection(direction); params.setPosition(position); - params.setSpeed(speed); - return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.move, params, "加热区顶升电机加热位6移动"); + return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.move, params, "加热区顶升电机 加热位6移动"); } @@ -457,308 +524,316 @@ public class DeviceCommandGenerator { * 加热区顶升电机 加热位1停止 */ public static DeviceCommand heaterMotor1Stop() { - return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.stop, null, "加热区顶升电机加热位1停止"); + return controlMotorCmd(CmdDevice.heater_motor_1, CmdAction.stop, null, "加热区顶升电机 加热位1停止"); } /** * 加热区顶升电机 加热位2停止 */ public static DeviceCommand heaterMotor2Stop() { - return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.stop, null, "加热区顶升电机加热位2停止"); + return controlMotorCmd(CmdDevice.heater_motor_2, CmdAction.stop, null, "加热区顶升电机 加热位2停止"); } /** * 加热区顶升电机 加热位3停止 */ public static DeviceCommand heaterMotor3Stop() { - return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.stop, null, "加热区顶升电机加热位3停止"); + return controlMotorCmd(CmdDevice.heater_motor_3, CmdAction.stop, null, "加热区顶升电机 加热位3停止"); } /** * 加热区顶升电机 加热位4停止 */ public static DeviceCommand heaterMotor4Stop() { - return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.stop, null, "加热区顶升电机加热位4停止"); + return controlMotorCmd(CmdDevice.heater_motor_4, CmdAction.stop, null, "加热区顶升电机 加热位4停止"); } /** * 加热区顶升电机 加热位5停止 */ public static DeviceCommand heaterMotor5Stop() { - return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.stop, null, "加热区顶升电机加热位5停止"); + return controlMotorCmd(CmdDevice.heater_motor_5, CmdAction.stop, null, "加热区顶升电机 加热位5停止"); } /** * 加热区顶升电机 加热位6停止 */ public static DeviceCommand heaterMotor6Stop() { - return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.stop, null, "加热区顶升电机加热位6停止"); + return controlMotorCmd(CmdDevice.heater_motor_6, CmdAction.stop, null, "加热区顶升电机 加热位6停止"); } /** * 加液泵 泵1设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump1Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump1Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump1, CmdAction.set, params, "加液泵1设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump1, CmdAction.set, params, "加液泵1 设置参数"); } /** * 加液泵 泵2设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump2Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump2Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump2, CmdAction.set, params, "加液泵2设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump2, CmdAction.set, params, "加液泵2 设置参数"); } /** * 加液泵 泵3设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump3Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump3Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump3, CmdAction.set, params, "加液泵3设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump3, CmdAction.set, params, "加液泵3 设置参数"); } /** * 加液泵 泵4设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump4Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump4Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump4, CmdAction.set, params, "加液泵4设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump4, CmdAction.set, params, "加液泵4 设置参数"); } /** * 加液泵 泵5设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump5Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump5Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump5, CmdAction.set, params, "加液泵5设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump5, CmdAction.set, params, "加液泵5 设置参数"); } /** * 加液泵 泵6设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump6Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump6Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump6, CmdAction.set, params, "加液泵6设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump6, CmdAction.set, params, "加液泵6 设置参数"); } /** * 加液泵 泵7设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump7Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump7Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump7, CmdAction.set, params, "加液泵7设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump7, CmdAction.set, params, "加液泵7 设置参数"); } /** * 加液泵 泵8设置参数 + * + * @param current 电流 [0-31] + * @param speed 速度 单位 mm/s */ - public static DeviceCommand acidPump8Set(Double current, CmdDirection direction, Double speed) { + public static DeviceCommand acidPump8Set(Integer current, Double speed) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDirection(direction); - params.setSpeed(speed); params.setCurrent(current); - return setInfoCmd(CmdDevice.acid_pump8, CmdAction.set, params, "加液泵8设置参数"); + params.setSpeed(speed); + return setInfoCmd(CmdDevice.acid_pump8, CmdAction.set, params, "加液泵8 设置参数"); } /** * 加液泵 泵1移动 + * + * @param direction 方向 forward | backward + * @param volume 加液量 单位mL */ - public static DeviceCommand acidPump1Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump1Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump1, CmdAction.move, params, "加液泵1移动"); + return setInfoCmd(CmdDevice.acid_pump1, CmdAction.move, params, "加液泵1 移动"); } /** * 加液泵 泵2移动 */ - public static DeviceCommand acidPump2Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump2Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump2, CmdAction.move, params, "加液泵2移动"); + return setInfoCmd(CmdDevice.acid_pump2, CmdAction.move, params, "加液泵2 移动"); } /** * 加液泵 泵3移动 */ - public static DeviceCommand acidPump3Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump3Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump3, CmdAction.move, params, "加液泵3移动"); + return setInfoCmd(CmdDevice.acid_pump3, CmdAction.move, params, "加液泵3 移动"); } /** * 加液泵 泵4移动 */ - public static DeviceCommand acidPump4Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump4Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump4, CmdAction.move, params, "加液泵4移动"); + return setInfoCmd(CmdDevice.acid_pump4, CmdAction.move, params, "加液泵4 移动"); } /** * 加液泵 泵5移动 */ - public static DeviceCommand acidPump5Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump5Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump5, CmdAction.move, params, "加液泵5移动"); + return setInfoCmd(CmdDevice.acid_pump5, CmdAction.move, params, "加液泵5 移动"); } /** * 加液泵 泵6移动 */ - public static DeviceCommand acidPump6Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump6Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump6, CmdAction.move, params, "加液泵6移动"); + return setInfoCmd(CmdDevice.acid_pump6, CmdAction.move, params, "加液泵6 移动"); } /** * 加液泵 泵7移动 */ - public static DeviceCommand acidPump7Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump7Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump7, CmdAction.move, params, "加液泵7移动"); + return setInfoCmd(CmdDevice.acid_pump7, CmdAction.move, params, "加液泵7 移动"); } /** * 加液泵 泵8移动 */ - public static DeviceCommand acidPump8Move(CmdDirection direction, Double volume, Double speed) { + public static DeviceCommand acidPump8Move(CmdDirection direction, Double volume) { DeviceCommandParams params = new DeviceCommandParams(); params.setDirection(direction); - params.setSpeed(speed); params.setVolume(volume); - return setInfoCmd(CmdDevice.acid_pump8, CmdAction.move, params, "加液泵8移动"); + return setInfoCmd(CmdDevice.acid_pump8, CmdAction.move, params, "加液泵8 移动"); } /** * 加液泵 泵1停止 */ public static DeviceCommand acidPump1Stop() { - return setInfoCmd(CmdDevice.acid_pump1, CmdAction.stop, null, "加液泵1停止"); + return setInfoCmd(CmdDevice.acid_pump1, CmdAction.stop, null, "加液泵1 停止"); } /** * 加液泵 泵2停止 */ public static DeviceCommand acidPump2Stop() { - return setInfoCmd(CmdDevice.acid_pump2, CmdAction.stop, null, "加液泵2停止"); + return setInfoCmd(CmdDevice.acid_pump2, CmdAction.stop, null, "加液泵2 停止"); } /** * 加液泵 泵3停止 */ public static DeviceCommand acidPump3Stop() { - return setInfoCmd(CmdDevice.acid_pump3, CmdAction.stop, null, "加液泵3停止"); + return setInfoCmd(CmdDevice.acid_pump3, CmdAction.stop, null, "加液泵3 停止"); } /** * 加液泵 泵4停止 */ public static DeviceCommand acidPump4Stop() { - return setInfoCmd(CmdDevice.acid_pump4, CmdAction.stop, null, "加液泵4停止"); + return setInfoCmd(CmdDevice.acid_pump4, CmdAction.stop, null, "加液泵4 停止"); } /** * 加液泵 泵5停止 */ public static DeviceCommand acidPump5Stop() { - return setInfoCmd(CmdDevice.acid_pump5, CmdAction.stop, null, "加液泵5停止"); + return setInfoCmd(CmdDevice.acid_pump5, CmdAction.stop, null, "加液泵5 停止"); } /** * 加液泵 泵6停止 */ public static DeviceCommand acidPump6Stop() { - return setInfoCmd(CmdDevice.acid_pump6, CmdAction.stop, null, "加液泵6停止"); + return setInfoCmd(CmdDevice.acid_pump6, CmdAction.stop, null, "加液泵6 停止"); } /** * 加液泵 泵7停止 */ public static DeviceCommand acidPump7Stop() { - return setInfoCmd(CmdDevice.acid_pump7, CmdAction.stop, null, "加液泵7停止"); + return setInfoCmd(CmdDevice.acid_pump7, CmdAction.stop, null, "加液泵7 停止"); } /** * 加液泵 泵8停止 */ public static DeviceCommand acidPump8Stop() { - return setInfoCmd(CmdDevice.acid_pump8, CmdAction.stop, null, "加液泵8停止"); + return setInfoCmd(CmdDevice.acid_pump8, CmdAction.stop, null, "加液泵8 停止"); } /** * 夹爪 设置参数 + * + * @param speed 速度 单位 mm/s */ public static DeviceCommand clawSet(Double speed) { DeviceCommandParams params = new DeviceCommandParams(); params.setSpeed(speed); - return setInfoCmd(CmdDevice.claw, CmdAction.set, params, "夹爪设置参数"); + return setInfoCmd(CmdDevice.claw, CmdAction.set, params, "夹爪 设置参数"); } /** - * 夹爪 夹紧 + * 夹爪 移动 + * + * @param position 位置 0-100 */ - public static DeviceCommand clawTight(Double distance) { + public static DeviceCommand clawMove(Double position) { DeviceCommandParams params = new DeviceCommandParams(); - params.setDistance(distance); - return controlCmd(CmdDevice.claw, CmdAction.tight, params, "夹爪夹紧"); - } - - /** - * 夹爪 松开 - */ - public static DeviceCommand clawTight() { - return controlCmd(CmdDevice.claw, CmdAction.loose, null, "夹爪松开"); + params.setPosition(position); + return controlCmd(CmdDevice.claw, CmdAction.tight, params, "夹爪 移动"); } /** * 夹爪 停止 */ public static DeviceCommand clawStop() { - return controlCmd(CmdDevice.claw, CmdAction.stop, null, "夹爪松开"); + return controlCmd(CmdDevice.claw, CmdAction.stop, null, "夹爪停止"); } @@ -766,208 +841,220 @@ public class DeviceCommandGenerator { * 风扇 1打开 */ public static DeviceCommand fan1Open() { - return controlCmd(CmdDevice.fan1, CmdAction.open, null, "风扇1打开"); + return controlCmd(CmdDevice.fan1, CmdAction.open, null, "风扇1 打开"); } /** * 风扇 2打开 */ public static DeviceCommand fan2Open() { - return controlCmd(CmdDevice.fan2, CmdAction.open, null, "风扇2打开"); + return controlCmd(CmdDevice.fan2, CmdAction.open, null, "风扇2 打开"); } /** * 风扇 3打开 */ public static DeviceCommand fan3Open() { - return controlCmd(CmdDevice.fan3, CmdAction.open, null, "风扇3打开"); + return controlCmd(CmdDevice.fan3, CmdAction.open, null, "风扇3 打开"); } /** * 风扇 4打开 */ public static DeviceCommand fan4Open() { - return controlCmd(CmdDevice.fan4, CmdAction.open, null, "风扇4打开"); + return controlCmd(CmdDevice.fan4, CmdAction.open, null, "风扇4 打开"); } /** * 风扇 5打开 */ public static DeviceCommand fan5Open() { - return controlCmd(CmdDevice.fan5, CmdAction.open, null, "风扇5打开"); + return controlCmd(CmdDevice.fan5, CmdAction.open, null, "风扇5 打开"); } /** * 风扇 6打开 */ public static DeviceCommand fan6Open() { - return controlCmd(CmdDevice.fan6, CmdAction.open, null, "风扇6打开"); + return controlCmd(CmdDevice.fan6, CmdAction.open, null, "风扇6 打开"); } /** * 风扇 1关闭 */ public static DeviceCommand fan1Close() { - return controlCmd(CmdDevice.fan1, CmdAction.close, null, "风扇1关闭"); + return controlCmd(CmdDevice.fan1, CmdAction.close, null, "风扇1 关闭"); } /** * 风扇 2关闭 */ public static DeviceCommand fan2Close() { - return controlCmd(CmdDevice.fan2, CmdAction.close, null, "风扇2关闭"); + return controlCmd(CmdDevice.fan2, CmdAction.close, null, "风扇2 关闭"); } /** * 风扇 3关闭 */ public static DeviceCommand fan3Close() { - return controlCmd(CmdDevice.fan3, CmdAction.close, null, "风扇3关闭"); + return controlCmd(CmdDevice.fan3, CmdAction.close, null, "风扇3 关闭"); } /** * 风扇 4关闭 */ public static DeviceCommand fan4Close() { - return controlCmd(CmdDevice.fan4, CmdAction.close, null, "风扇4关闭"); + return controlCmd(CmdDevice.fan4, CmdAction.close, null, "风扇4 关闭"); } /** * 风扇 5关闭 */ public static DeviceCommand fan5Close() { - return controlCmd(CmdDevice.fan5, CmdAction.close, null, "风扇5关闭"); + return controlCmd(CmdDevice.fan5, CmdAction.close, null, "风扇5 关闭"); } /** * 风扇 6关闭 */ public static DeviceCommand fan6Close() { - return controlCmd(CmdDevice.fan6, CmdAction.close, null, "风扇6关闭"); + return controlCmd(CmdDevice.fan6, CmdAction.close, null, "风扇6 关闭"); } /** * 水泵电源 开启 */ public static DeviceCommand waterPumpPowerOpen() { - return controlCmd(CmdDevice.water_pump_power, CmdAction.open, null, "水泵电源开启"); + return controlCmd(CmdDevice.water_pump_power, CmdAction.open, null, "水泵 电源开启"); } /** * 水泵电源 关闭 */ public static DeviceCommand waterPumpPowerClose() { - return controlCmd(CmdDevice.water_pump_power, CmdAction.close, null, "水泵电源关闭"); + return controlCmd(CmdDevice.water_pump_power, CmdAction.close, null, "水泵 电源关闭"); } /** * 风机电源 开启 */ public static DeviceCommand ventilatorPowerOpen() { - return controlCmd(CmdDevice.ventilator_power, CmdAction.open, null, " 风机电源开启"); + return controlCmd(CmdDevice.ventilator_power, CmdAction.open, null, " 风机 电源开启"); } /** * 风机电源 关闭 */ public static DeviceCommand ventilatorPowerClose() { - return controlCmd(CmdDevice.ventilator_power, CmdAction.close, null, "风机电源关闭"); + return controlCmd(CmdDevice.ventilator_power, CmdAction.close, null, "风机 电源关闭"); } /** * 加热棒1 获取温度 */ public static DeviceCommand heatRod1Get() { - return getInfoCmd(CmdDevice.heat_rod_1, "加热棒1获取温度"); + return getInfoCmd(CmdDevice.heat_rod_1, "加热棒1 获取温度"); } /** * 加热棒2 获取温度 */ public static DeviceCommand heatRod2Get() { - return getInfoCmd(CmdDevice.heat_rod_2, "加热棒2获取温度"); + return getInfoCmd(CmdDevice.heat_rod_2, "加热棒2 获取温度"); } /** * 加热棒3 获取温度 */ public static DeviceCommand heatRod3Get() { - return getInfoCmd(CmdDevice.heat_rod_3, "加热棒3获取温度"); + return getInfoCmd(CmdDevice.heat_rod_3, "加热棒3 获取温度"); } /** * 加热棒4 获取温度 */ public static DeviceCommand heatRod4Get() { - return getInfoCmd(CmdDevice.heat_rod_4, "加热棒4获取温度"); + return getInfoCmd(CmdDevice.heat_rod_4, "加热棒4 获取温度"); } /** * 加热棒5 获取温度 */ public static DeviceCommand heatRod5Get() { - return getInfoCmd(CmdDevice.heat_rod_5, "加热棒5获取温度"); + return getInfoCmd(CmdDevice.heat_rod_5, "加热棒5 获取温度"); } /** * 加热棒6 获取温度 */ public static DeviceCommand heatRod6Get() { - return getInfoCmd(CmdDevice.heat_rod_6, "加热棒6获取温度"); + return getInfoCmd(CmdDevice.heat_rod_6, "加热棒6 获取温度"); } /** * 加热棒1 开启加热 + * + * @param temperature 目标温度 */ public static DeviceCommand heatRod1Open(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return controlCmd(CmdDevice.heat_rod_1, CmdAction.open, params, "加热棒1开启加热"); + return controlCmd(CmdDevice.heat_rod_1, CmdAction.open, params, "加热棒1 开启加热"); } /** * 加热棒2 开启加热 + * + * @param temperature 目标温度 */ public static DeviceCommand heatRod2Open(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return controlCmd(CmdDevice.heat_rod_2, CmdAction.open, params, "加热棒2开启加热"); + return controlCmd(CmdDevice.heat_rod_2, CmdAction.open, params, "加热棒2 开启加热"); } /** * 加热棒3 开启加热 + * + * @param temperature 目标温度 */ public static DeviceCommand heatRod3Open(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return controlCmd(CmdDevice.heat_rod_3, CmdAction.open, params, "加热棒3开启加热"); + return controlCmd(CmdDevice.heat_rod_3, CmdAction.open, params, "加热棒3 开启加热"); } /** * 加热棒4 开启加热 + * + * @param temperature 目标温度 */ public static DeviceCommand heatRod4Open(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return controlCmd(CmdDevice.heat_rod_4, CmdAction.open, params, "加热棒4开启加热"); + return controlCmd(CmdDevice.heat_rod_4, CmdAction.open, params, "加热棒4 开启加热"); } /** * 加热棒5 开启加热 + * + * @param temperature 目标温度 */ public static DeviceCommand heatRod5Open(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return controlCmd(CmdDevice.heat_rod_5, CmdAction.open, params, "加热棒5开启加热"); + return controlCmd(CmdDevice.heat_rod_5, CmdAction.open, params, "加热棒5 开启加热"); } /** * 加热棒6 开启加热 + * + * @param temperature 目标温度 */ public static DeviceCommand heatRod6Open(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return controlCmd(CmdDevice.heat_rod_6, CmdAction.open, params, "加热棒6开启加热"); + return controlCmd(CmdDevice.heat_rod_6, CmdAction.open, params, "加热棒6 开启加热"); } @@ -975,133 +1062,153 @@ public class DeviceCommandGenerator { * 加热棒1 关闭加热 */ public static DeviceCommand heatRod1Close() { - return controlCmd(CmdDevice.heat_rod_1, CmdAction.close, null, "加热棒1关闭加热"); + return controlCmd(CmdDevice.heat_rod_1, CmdAction.close, null, "加热棒1 关闭加热"); } /** * 加热棒2 关闭加热 */ public static DeviceCommand heatRod2Close() { - return controlCmd(CmdDevice.heat_rod_2, CmdAction.close, null, "加热棒2关闭加热"); + return controlCmd(CmdDevice.heat_rod_2, CmdAction.close, null, "加热棒2 关闭加热"); } /** * 加热棒3 关闭加热 */ public static DeviceCommand heatRod3Close() { - return controlCmd(CmdDevice.heat_rod_3, CmdAction.close, null, "加热棒3关闭加热"); + return controlCmd(CmdDevice.heat_rod_3, CmdAction.close, null, "加热棒3 关闭加热"); } /** * 加热棒4 关闭加热 */ public static DeviceCommand heatRod4Close() { - return controlCmd(CmdDevice.heat_rod_4, CmdAction.close, null, "加热棒4关闭加热"); + return controlCmd(CmdDevice.heat_rod_4, CmdAction.close, null, "加热棒4 关闭加热"); } /** * 加热棒5 关闭加热 */ public static DeviceCommand heatRod5Close() { - return controlCmd(CmdDevice.heat_rod_5, CmdAction.close, null, "加热棒5关闭加热"); + return controlCmd(CmdDevice.heat_rod_5, CmdAction.close, null, "加热棒5 关闭加热"); } /** * 加热棒6 关闭加热 */ public static DeviceCommand heatRod6Close() { - return controlCmd(CmdDevice.heat_rod_6, CmdAction.close, null, "加热棒6关闭加热"); + return controlCmd(CmdDevice.heat_rod_6, CmdAction.close, null, "加热棒6 关闭加热"); } /** * 三色灯开启 + * + * @param color red | green | blue */ public static DeviceCommand tricolorLightOpen(CmdColor color) { DeviceCommandParams params = new DeviceCommandParams(); params.setColor(color); - return controlCmd(CmdDevice.tricolor_light, CmdAction.open, params, "三色灯开启"); + return controlCmd(CmdDevice.tricolor_light, CmdAction.open, params, "三色灯 开启"); } /** * 三色灯关闭 */ public static DeviceCommand tricolorLightClose() { - return controlCmd(CmdDevice.tricolor_light, CmdAction.close, null, "三色灯关闭"); + return controlCmd(CmdDevice.tricolor_light, CmdAction.close, null, "三色灯 关闭"); } /** - * 相机补灯光开启 + * 相机补灯光 开启 + * + * @param brightness 亮度 0-100 */ public static DeviceCommand fillLightOpen(Double brightness) { DeviceCommandParams params = new DeviceCommandParams(); params.setBrightness(brightness); - return controlCmd(CmdDevice.fill_light, CmdAction.open, params, "相机补灯光开启"); + return controlCmd(CmdDevice.fill_light, CmdAction.open, params, "相机补光灯 开启"); } /** - * 相机补灯光关闭 + * 相机补光灯 关闭 */ public static DeviceCommand fillLightClose() { - return controlCmd(CmdDevice.fill_light, CmdAction.close, null, "相机补灯光关闭"); + return controlCmd(CmdDevice.fill_light, CmdAction.close, null, "相机补光灯 关闭"); } - /** * 冷阱开启电源 */ public static DeviceCommand coldTrapOpenPower() { - return controlCmd(CmdDevice.cold_trap, CmdAction.open_power, null, "冷阱开启电源"); + return controlCmd(CmdDevice.cold_trap, CmdAction.open_power, null, "冷阱 开启电源"); } /** * 冷阱关闭电源 */ public static DeviceCommand coldTrapClosePower() { - return controlCmd(CmdDevice.cold_trap, CmdAction.close_power, null, "冷阱关闭电源"); + return controlCmd(CmdDevice.cold_trap, CmdAction.close_power, null, "冷阱 关闭电源"); } /** * 冷阱设置温度 + * + * @param temperature 温度 */ public static DeviceCommand coldTrapSet(Double temperature) { DeviceCommandParams params = new DeviceCommandParams(); params.setTemperature(temperature); - return setInfoCmd(CmdDevice.cold_trap, CmdAction.close_power, params, "冷阱设置温度"); + return setInfoCmd(CmdDevice.cold_trap, CmdAction.close_power, params, "冷阱 设置温度"); } /** * 冷阱打开循环 */ public static DeviceCommand coldTrapOpenCircle() { - return controlCmd(CmdDevice.cold_trap, CmdAction.open_circle, null, "冷阱打开循环"); + return controlCmd(CmdDevice.cold_trap, CmdAction.open_circle, null, "冷阱 打开循环"); } /** * 冷阱关闭循环 */ public static DeviceCommand coldTrapCloseCircle() { - return controlCmd(CmdDevice.cold_trap, CmdAction.close_circle, null, "冷阱关闭循环"); + return controlCmd(CmdDevice.cold_trap, CmdAction.close_circle, null, "冷阱 关闭循环"); } /** + * 冷阱开启制冷 + */ + public static DeviceCommand coldTrapOpenCool() { + return controlCmd(CmdDevice.cold_trap, CmdAction.open_cool, null, "冷阱 开启制冷"); + } + + /** + * 冷阱关闭制冷 + */ + public static DeviceCommand coldTrapCloseCool() { + return controlCmd(CmdDevice.cold_trap, CmdAction.close_cool, null, "冷阱 关闭制冷"); + } + + + /** * 冷阱开启加热 */ public static DeviceCommand coldTrapOpenHeart() { - return controlCmd(CmdDevice.cold_trap, CmdAction.open_heart, null, "冷阱开启加热"); + return controlCmd(CmdDevice.cold_trap, CmdAction.open_heart, null, "冷阱 开启加热"); } /** * 冷阱关闭加热 */ public static DeviceCommand coldTrapCloseHeart() { - return controlCmd(CmdDevice.cold_trap, CmdAction.close_heart, null, "冷阱关闭加热"); + return controlCmd(CmdDevice.cold_trap, CmdAction.close_heart, null, "冷阱 关闭加热"); } /** * 拍照 */ public static DeviceCommand takePhoto() { - return controlCmd(CmdDevice.photo, CmdAction.take_photo, null, "冷阱关闭加热"); + return controlCmd(CmdDevice.photo, CmdAction.take_photo, null, "拍照"); } diff --git a/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandParams.java b/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandParams.java index 946c568..6522aeb 100644 --- a/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandParams.java +++ b/src/main/java/com/iflytop/gd/common/cmd/DeviceCommandParams.java @@ -20,4 +20,7 @@ public class DeviceCommandParams { private CmdAxis axis; private CmdColor color; private Double brightness; + private Double x; + private Double y; + private Double z; } diff --git a/src/main/java/com/iflytop/gd/common/enums/AcidPumpDevice.java b/src/main/java/com/iflytop/gd/common/enums/AcidPumpDevice.java new file mode 100644 index 0000000..ae1d082 --- /dev/null +++ b/src/main/java/com/iflytop/gd/common/enums/AcidPumpDevice.java @@ -0,0 +1,29 @@ +package com.iflytop.gd.common.enums; + +import lombok.Getter; + +/** + * 泵设备id枚举 + */ +@Getter +public enum AcidPumpDevice { + PUMP_01("acid_pump1"), + PUMP_02("acid_pump2"), + PUMP_03("acid_pump3"), + PUMP_04("acid_pump4"), + PUMP_05("acid_pump5"), + PUMP_06("acid_pump6"), + PUMP_07("acid_pump7"), + PUMP_08("acid_pump8"); + + private final String id; + + AcidPumpDevice(String id) { + this.id = id; + } + + @Override + public String toString() { + return id; + } +} diff --git a/src/main/java/com/iflytop/gd/common/enums/HeatModuleId.java b/src/main/java/com/iflytop/gd/common/enums/HeatModuleId.java index 21399a6..737ab20 100644 --- a/src/main/java/com/iflytop/gd/common/enums/HeatModuleId.java +++ b/src/main/java/com/iflytop/gd/common/enums/HeatModuleId.java @@ -1,9 +1,12 @@ package com.iflytop.gd.common.enums; +import lombok.Getter; + /** * 加热模块id枚举 * 格式为 "heat_module_01" ~ "heat_module_06" */ +@Getter public enum HeatModuleId { MODULE_01("heat_module_01"), MODULE_02("heat_module_02"), @@ -18,15 +21,6 @@ public enum HeatModuleId { this.id = id; } - /** - * 获取对应的加热模块 ID - * - * @return 模块唯一标识 - */ - public String getId() { - return id; - } - @Override public String toString() { return id; diff --git a/src/main/java/com/iflytop/gd/common/enums/cmd/CmdAction.java b/src/main/java/com/iflytop/gd/common/enums/cmd/CmdAction.java index 30fb736..e3d45df 100644 --- a/src/main/java/com/iflytop/gd/common/enums/cmd/CmdAction.java +++ b/src/main/java/com/iflytop/gd/common/enums/cmd/CmdAction.java @@ -1,6 +1,6 @@ package com.iflytop.gd.common.enums.cmd; public enum CmdAction { - open, close, stop, start, origin, move, move_x_joint, move_y_joint, move_joint, move_point, set, get, tight, loose, + open, close, stop, start, origin, move, move_joint, move_point, set, get, tight, loose, open_power, close_power, open_circle, close_circle, open_heart, close_heart, open_cool, close_cool, take_photo } diff --git a/src/main/java/com/iflytop/gd/common/enums/cmd/CmdColor.java b/src/main/java/com/iflytop/gd/common/enums/cmd/CmdColor.java index 988a563..c8149ea 100644 --- a/src/main/java/com/iflytop/gd/common/enums/cmd/CmdColor.java +++ b/src/main/java/com/iflytop/gd/common/enums/cmd/CmdColor.java @@ -1,5 +1,5 @@ package com.iflytop.gd.common.enums.cmd; public enum CmdColor { - red,green,blue + red, green, blue } diff --git a/src/main/java/com/iflytop/gd/common/enums/cmd/CmdDevice.java b/src/main/java/com/iflytop/gd/common/enums/cmd/CmdDevice.java index b456b9d..061f23c 100644 --- a/src/main/java/com/iflytop/gd/common/enums/cmd/CmdDevice.java +++ b/src/main/java/com/iflytop/gd/common/enums/cmd/CmdDevice.java @@ -1,10 +1,44 @@ package com.iflytop.gd.common.enums.cmd; public enum CmdDevice { - door, shake_motor, tray_motor, dual_robot, hbot_x, hbot_y, hbot_z, - heater_motor_1, heater_motor_2, heater_motor_3, heater_motor_4, heater_motor_5, heater_motor_6, - acid_pump1, acid_pump2, acid_pump3, acid_pump4, acid_pump5, acid_pump6, acid_pump7, acid_pump8, - claw, fan1, fan2, fan3, fan4, fan5, fan6, water_pump_power, ventilator_power, - heat_rod_1, heat_rod_2, heat_rod_3, heat_rod_4, heat_rod_5, heat_rod_6, - tricolor_light, fill_light, cold_trap, photo + door_motor, + shake_motor, + tray_motor, + dual_robot, + gantry_x, + gantry_y, + gantry_z, + heater_motor_1, + heater_motor_2, + heater_motor_3, + heater_motor_4, + heater_motor_5, + heater_motor_6, + acid_pump1, + acid_pump2, + acid_pump3, + acid_pump4, + acid_pump5, + acid_pump6, + acid_pump7, + acid_pump8, + claw, + fan1, + fan2, + fan3, + fan4, + fan5, + fan6, + water_pump_power, + ventilator_power, + heat_rod_1, + heat_rod_2, + heat_rod_3, + heat_rod_4, + heat_rod_5, + heat_rod_6, + tricolor_light, + fill_light, + cold_trap, + photo } diff --git a/src/main/java/com/iflytop/gd/common/result/ResultCode.java b/src/main/java/com/iflytop/gd/common/result/ResultCode.java index 504cc5c..d88fc38 100644 --- a/src/main/java/com/iflytop/gd/common/result/ResultCode.java +++ b/src/main/java/com/iflytop/gd/common/result/ResultCode.java @@ -44,8 +44,9 @@ public enum ResultCode implements IResultCode, Serializable { SERVICE_UNAVAILABLE("5001", "服务暂不可用"), EXTERNAL_API_ERROR("5002", "第三方服务调用失败"), COMMAND_EXEC_TIMEOUT("5003", "命令执行超时"), - HARDWARE_ERROR("5004", "硬件错误"); - + HARDWARE_ERROR("5004", "硬件错误"), + //============================ 6xxx:指令相关 ============================ + COMMAND_NOT_FOUND("6000", "指令未找到"); /** 状态码 */ private final String code; /** 提示信息 */