4 changed files with 125 additions and 8 deletions
-
24src/main/java/com/iflytop/sgs/common/enums/DevicePartId.java
-
31src/main/java/com/iflytop/sgs/common/enums/SensorStateCode.java
-
58src/main/java/com/iflytop/sgs/common/service/GDDeviceStatusInterface.java
-
20src/main/java/com/iflytop/sgs/hardware/service/GDDeviceStatusService.java
@ -0,0 +1,24 @@ |
|||
package com.iflytop.sgs.common.enums; |
|||
|
|||
|
|||
import lombok.Getter; |
|||
|
|||
@Getter |
|||
public enum DevicePartId { |
|||
DoorM("门电机"), |
|||
LiquidM("加液电机"), |
|||
ZM("Z轴电机"), |
|||
LiquidPumpM("加液泵"), |
|||
HEATER_ROD1_ID("加热棒1"), |
|||
HEATER_ROD2_ID("加热棒2"), |
|||
HEATER_ROD3_ID("加热棒3"), |
|||
HEATER_ROD4_ID("加热棒4"), |
|||
; |
|||
private final String description; |
|||
|
|||
DevicePartId(String description){ |
|||
this.description = description; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.iflytop.sgs.common.enums; |
|||
|
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* 系统配置累 |
|||
* |
|||
*/ |
|||
@Getter |
|||
public enum SensorStateCode { |
|||
E_STOP("急停"), |
|||
HEATER_TRAY_1_EXIST("加热位1托盘存在状态"), |
|||
HEATER_TRAY_2_EXIST("加热位2托盘存在状态"), |
|||
HEATER_TRAY_3_EXIST("加热位3托盘存在状态"), |
|||
HEATER_TRAY_4_EXIST("加热位4托盘存在状态"), |
|||
WASTE_EXIST("废液桶是否存在"), |
|||
LIQUID_TRAY_EXIST("加液区托盘是否存在"), |
|||
THIN_LOW_LEVEL("稀硝酸低液位"), |
|||
THICK_LOW_LEVEL("浓硝酸低液位"), |
|||
WATER_LOW_LEVEL("水低液位"), |
|||
WASTE_HIGH_LEVEL("废液高液位"); |
|||
|
|||
|
|||
private String description; |
|||
|
|||
SensorStateCode(String description) { |
|||
this.description = description; |
|||
} |
|||
} |
|||
|
|||
|
@ -0,0 +1,58 @@ |
|||
package com.iflytop.sgs.common.service; |
|||
|
|||
import com.iflytop.sgs.hardware.exception.HardwareException; |
|||
import com.iflytop.sgs.hardware.type.IO.InputIOMId; |
|||
import com.iflytop.sgs.hardware.type.Servo.LeisaiServoMId; |
|||
import com.iflytop.sgs.hardware.type.StepMotor.StepMotorMId; |
|||
import com.iflytop.sgs.hardware.type.driver.HeaterRodSlavedId; |
|||
|
|||
public interface GDDeviceStatusInterface { |
|||
|
|||
/** |
|||
* 获取步进电机的原点状态 |
|||
* @param stepMotorMId |
|||
* @return true 在原点 false 不在原点 |
|||
*/ |
|||
Boolean stepMotorIsOrigin(StepMotorMId stepMotorMId) throws HardwareException; |
|||
|
|||
/** |
|||
* 获取XY 伺服的原点状态 |
|||
* @param mid |
|||
* @return |
|||
* @throws HardwareException |
|||
*/ |
|||
Boolean getXYServoIsOrigin(LeisaiServoMId mid) throws HardwareException; |
|||
|
|||
|
|||
/** |
|||
* 获取 传感器信号 |
|||
* @param inputIOMId |
|||
* @return |
|||
* @throws HardwareException |
|||
*/ |
|||
Boolean getInputState(String inputIOMId) throws HardwareException; |
|||
|
|||
/** |
|||
* 获取加热棒温度 |
|||
* @param heaterRodSlavedId |
|||
* @return |
|||
* @throws Exception |
|||
*/ |
|||
Double getHeaterRodTemperature(String heaterRodSlavedId) throws Exception; |
|||
|
|||
/** |
|||
* 获取电机位置 |
|||
* @param stepMotorMId |
|||
* @return |
|||
* @throws HardwareException |
|||
*/ |
|||
Double getStepMotorPostion(String stepMotorMId) throws HardwareException; |
|||
|
|||
/** |
|||
* 获取伺服类电机位置 |
|||
* @param mid |
|||
* @return |
|||
* @throws HardwareException |
|||
*/ |
|||
Double getXYServoPosition(LeisaiServoMId mid) throws HardwareException; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue