1 changed files with 51 additions and 36 deletions
@ -1,40 +1,55 @@ |
|||||
package a8k.service.db.dao; |
package a8k.service.db.dao; |
||||
|
|
||||
import a8k.appbean.cfg.*; |
import a8k.appbean.cfg.*; |
||||
|
|
||||
/** |
|
||||
* XY机械臂控制相关参数访问 |
|
||||
*/ |
|
||||
|
import a8k.service.db.entity.HardwareServiceSetting; |
||||
|
import a8k.service.hardware.HbotControlService; |
||||
|
import a8k.utils.HardwareServiceParam; |
||||
|
import a8k.utils.HardwareServiceParams; |
||||
|
import com.fasterxml.jackson.databind.ObjectMapper; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
@Component |
||||
|
@HardwareServiceParams(service = HbotControlService.class) |
||||
public class HbotControlParamsDao { |
public class HbotControlParamsDao { |
||||
|
@HardwareServiceParam(name="滴液反应位", group="滴液反应位") |
||||
|
public Pos3d getReactionPos() throws Exception { |
||||
|
return this.getOption("ReactionPos", Pos3d.class); |
||||
|
} |
||||
|
|
||||
Pos3d getReactionPos() { |
|
||||
return null; |
|
||||
} //滴液反应位 |
|
||||
|
|
||||
TipPickUpPosInfo TipPickUpPosInfo() { |
|
||||
return null; |
|
||||
} //TIP组0 位置信息 |
|
||||
|
|
||||
|
|
||||
SmallBottleBufferPos getSmallBottleBufferPosInfo() { |
|
||||
return null; |
|
||||
}//小瓶缓冲液位置 |
|
||||
|
@HardwareServiceParam(name="TIP组位置信息", group="TIP组位置信息") |
||||
|
public TipPickUpPosInfo getTipPickUpPosInfo() throws Exception { |
||||
|
return this.getOption("TipPickUpPosInfo", TipPickUpPosInfo.class); |
||||
|
} |
||||
|
|
||||
|
@HardwareServiceParam(name="小瓶缓冲液位置", group="小瓶缓冲液位置") |
||||
|
public SmallBottleBufferPos getSmallBottleBufferPosInfo() throws Exception { |
||||
|
return this.getOption("SmallBottleBufferPosInfo", SmallBottleBufferPos.class); |
||||
|
} |
||||
|
|
||||
Plates2dCodeScanPos getPlates2dCodeScanPosInfo() { |
|
||||
return null; |
|
||||
}//反应板夹仓位置 |
|
||||
|
@HardwareServiceParam(name="反应板夹仓位置", group="反应板夹仓位置") |
||||
|
public Plates2dCodeScanPos getPlates2dCodeScanPosInfo() throws Exception { |
||||
|
return this.getOption("Plates2dCodeScanPosInfo", Plates2dCodeScanPos.class); |
||||
|
} |
||||
|
|
||||
LargeBottleBufferPos getLargeBottleBufferPosInfo() { |
|
||||
return null; |
|
||||
}//大瓶缓冲液位置 |
|
||||
|
@HardwareServiceParam(name="大瓶缓冲液位置", group="大瓶缓冲液位置") |
||||
|
public LargeBottleBufferPos getLargeBottleBufferPosInfo() throws Exception { |
||||
|
return this.getOption("LargeBottleBufferPosInfo", LargeBottleBufferPos.class); |
||||
|
} |
||||
|
|
||||
Pos3d getEmergencyPos() { |
|
||||
return null; |
|
||||
} //急诊位 |
|
||||
|
@HardwareServiceParam(name="急诊位", group="急诊位") |
||||
|
public Pos3d getEmergencyPos() throws Exception { |
||||
|
return this.getOption("EmergencyPos", Pos3d.class); |
||||
|
} |
||||
|
|
||||
Pos3d getTipDropPos() { |
|
||||
return null; |
|
||||
} //tip丢弃位置 |
|
||||
|
@HardwareServiceParam(name="Tip丢弃位置", group="Tip丢弃位置") |
||||
|
public Pos3d getTipDropPos() throws Exception { |
||||
|
return this.getOption("TipDropPos", Pos3d.class); |
||||
|
} |
||||
|
|
||||
|
private <T> T getOption( String key, Class<T> clazz) throws Exception { |
||||
|
var option = HardwareServiceSetting.getOption("HbotControlService", key); |
||||
|
if ( option.isNewRecord ) { |
||||
|
return clazz.getDeclaredConstructor().newInstance(); |
||||
|
} |
||||
|
ObjectMapper mapper = new ObjectMapper(); |
||||
|
return mapper.readValue(option.val, clazz); |
||||
|
} |
||||
} |
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue