8 changed files with 387 additions and 56 deletions
-
2src/main/java/a8k/app/constant/ActionOvertimeConstant.java
-
66src/main/java/a8k/app/hardware/driver/PipetteCtrlDriverV2.java
-
12src/main/java/a8k/app/hardware/type/CmdId.java
-
22src/main/java/a8k/app/hardware/type/pipette_module/AspirationParamId.java
-
35src/main/java/a8k/app/hardware/type/pipette_module/DistribuAllParamId.java
-
87src/main/java/a8k/app/hardware/type/pipette_module/param/AspirationParam.java
-
56src/main/java/a8k/app/hardware/type/pipette_module/param/DistribuAllParam.java
-
163src/main/java/a8k/extui/page/driver/pipette_module/PipetteGunOperationCtrlPage.java
@ -0,0 +1,35 @@ |
|||
package a8k.app.hardware.type.pipette_module; |
|||
|
|||
public enum DistribuAllParamId { |
|||
// |
|||
// 容器位置 |
|||
// |
|||
containerPos, // 容器位置 |
|||
|
|||
// |
|||
// 目标容器信息 |
|||
// |
|||
destContainerCpyid, // 目标容器配置索引 |
|||
destContainerIsEmpty, // 目标容器是否为空 |
|||
destLiquidCfgIndex, // 目标容器中的液体类型 |
|||
|
|||
// |
|||
// 分配方式 |
|||
// |
|||
distribuType, // 分配类型 0:液面上分配,1:液面下分配 |
|||
|
|||
// |
|||
// 混匀配置 |
|||
// |
|||
mixVolume, // 混匀体积 |
|||
mixTimes, // 混匀次数 |
|||
// |
|||
// 其他配置 |
|||
// |
|||
zmAutoMoveToZero, // zm自动归零 |
|||
; |
|||
|
|||
public Integer toInteger() { |
|||
return ordinal(); |
|||
} |
|||
} |
@ -0,0 +1,87 @@ |
|||
package a8k.app.hardware.type.pipette_module.param; |
|||
|
|||
import a8k.app.hardware.type.pipette_module.AspirationParamId; |
|||
import a8k.app.type.exception.AppException; |
|||
|
|||
public class AspirationParam { |
|||
// |
|||
// 吸取体积 |
|||
// |
|||
public Integer volume; |
|||
// |
|||
// 容器 |
|||
// |
|||
public Integer containerPos; |
|||
public Integer containerInfoIndex; |
|||
// |
|||
// 液体类型 |
|||
// |
|||
public Integer liquidCfgIndex; |
|||
// |
|||
// 吸取模式 |
|||
// |
|||
public Integer aspirationMode; |
|||
// |
|||
// lld配置 |
|||
// |
|||
public Integer lldEnable; |
|||
public Integer lldType; |
|||
public Integer lldEnableProtect; |
|||
// |
|||
// llf配置 |
|||
// |
|||
public Integer mixLlfEnable; |
|||
public Integer llfEnable; |
|||
// |
|||
// 混匀配置 |
|||
// |
|||
public Integer mixVolume; |
|||
public Integer mixTimes; |
|||
|
|||
@FunctionalInterface |
|||
public interface AssignObjectItemFn { |
|||
Integer assignVal(AspirationParamId index) throws AppException; |
|||
} |
|||
|
|||
@FunctionalInterface |
|||
public interface SerializationObjectItemFn { |
|||
void serializeObject(AspirationParamId index, Integer itermVal) throws AppException; |
|||
} |
|||
|
|||
public static AspirationParam build(AssignObjectItemFn assignFn) throws AppException { |
|||
AspirationParam info = new AspirationParam(); |
|||
info.assignObject(assignFn); |
|||
return info; |
|||
} |
|||
|
|||
public void assignObject(AssignObjectItemFn assignFn) throws AppException { |
|||
for (AspirationParamId idx : AspirationParamId.values()) { |
|||
try { |
|||
AspirationParam.class.getDeclaredField(idx.name()).set(this, assignFn.assignVal(idx)); |
|||
} catch (IllegalAccessException | NoSuchFieldException e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public void serialization(SerializationObjectItemFn fn) throws AppException { |
|||
for (AspirationParamId idx : AspirationParamId.values()) { |
|||
try { |
|||
Integer val = (Integer) AspirationParam.class.getDeclaredField(idx.name()).get(this); |
|||
fn.serializeObject(idx, val); |
|||
} catch (NoSuchFieldException | IllegalAccessException e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public static void main(String[] args) throws AppException { |
|||
AspirationParam info = new AspirationParam(); |
|||
info.assignObject(Enum::ordinal); |
|||
|
|||
info.serialization((index, val) -> { |
|||
System.out.println("Index: " + index + ", Value: " + val); |
|||
}); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
package a8k.app.hardware.type.pipette_module.param; |
|||
|
|||
import a8k.app.hardware.type.pipette_module.DistribuAllParamId; |
|||
import a8k.app.type.exception.AppException; |
|||
|
|||
public class DistribuAllParam { |
|||
// |
|||
// 容器位置 |
|||
// |
|||
public Integer containerPos = 0; // 容器位置 |
|||
|
|||
// |
|||
// 目标容器信息 |
|||
// |
|||
public Integer destContainerCpyid = 0; // 目标容器配置索引 |
|||
public Integer destContainerIsEmpty = 0; // 目标容器是否为空 |
|||
public Integer destLiquidCfgIndex = 0; // 目标容器中的液体类型 |
|||
|
|||
// |
|||
// 分配方式 |
|||
// |
|||
public Integer distribuType = 0; // 分配类型 0:液面上分配,1:液面下分配 |
|||
|
|||
// |
|||
// 混匀配置 |
|||
// |
|||
public Integer mixVolume = 0; // 混匀体积 |
|||
public Integer mixTimes = 0; // 混匀次数 |
|||
// |
|||
// 其他配置 |
|||
// |
|||
public Integer zmAutoMoveToZero = 0; // zm自动归零 |
|||
|
|||
@FunctionalInterface |
|||
public interface SerializationObjectItemFn { |
|||
void serializeObject(DistribuAllParamId index, Integer itermVal) throws AppException; |
|||
} |
|||
|
|||
|
|||
public void serialization(SerializationObjectItemFn fn) throws AppException { |
|||
for (DistribuAllParamId idx : DistribuAllParamId.values()) { |
|||
try { |
|||
Integer val = (Integer) DistribuAllParam.class.getDeclaredField(idx.name()).get(this); |
|||
fn.serializeObject(idx, val); |
|||
} catch (NoSuchFieldException | IllegalAccessException e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public static void main(String[] args) throws AppException { |
|||
DistribuAllParam info = new DistribuAllParam(); |
|||
info.serialization((index, val) -> System.out.println("Index: " + index + ", Value: " + val)); |
|||
} |
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue