|
|
@ -18,7 +18,7 @@ import java.util.Map; |
|
|
|
@JsonIgnoreProperties(value = {"advisors", "frozen", "preFiltered", "proxyTargetClass", "targetSource", "exposeProxy", "advisorCount", "proxiedInterfaces", "targetClass"}) |
|
|
|
public class DeviceState { |
|
|
|
@Schema(description = "当前设备是否暂停") |
|
|
|
private volatile boolean paused = false; |
|
|
|
private volatile boolean craftsPaused = false; |
|
|
|
|
|
|
|
@Schema(description = "滴定模块") |
|
|
|
private final Map<MultipleModuleCode, TitrationModuleState> titrationModuleStateMap = new HashMap<>(); |
|
|
@ -52,7 +52,9 @@ public class DeviceState { |
|
|
|
|
|
|
|
public JSONObject toJSON() { |
|
|
|
JSONObject json = new JSONObject(); |
|
|
|
json.putOnce("craftsPaused", craftsPaused); |
|
|
|
json.putOnce("titrationModule", new ArrayList<>(titrationModuleStateMap.values())); |
|
|
|
json.putOnce("heatModuleStateMap", new ArrayList<>(heatModuleStateMap.values())); |
|
|
|
json.putOnce("trayTubeState", new ArrayList<>(trayTubeStateMap.values())); |
|
|
|
json.putOnce("trayExist1", virtual); |
|
|
|
json.putOnce("trayExist2", virtual); |
|
|
|