|
@ -1,59 +1,45 @@ |
|
|
package com.dreamworks.boditech.driver.consumable; |
|
|
package com.dreamworks.boditech.driver.consumable; |
|
|
public class CsmLargeBufferTube { |
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
|
|
|
|
public class CsmLargeBufferTube extends ConsumableBase { |
|
|
|
|
|
// manager |
|
|
|
|
|
private final CsmLargeBufferTubeManager manager; |
|
|
|
|
|
|
|
|
// index of tube : 0 - 5 |
|
|
// index of tube : 0 - 5 |
|
|
public Integer index = -1; |
|
|
public Integer index = -1; |
|
|
// if the tube is loaded |
|
|
// if the tube is loaded |
|
|
public Boolean isLoaded = false; |
|
|
public Boolean isLoaded = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// position |
|
|
|
|
|
public Integer position = -1; |
|
|
|
|
|
// project id |
|
|
|
|
|
public Integer projectId = 0; |
|
|
|
|
|
// project name |
|
|
|
|
|
public String projectName = ""; |
|
|
|
|
|
// project color |
|
|
|
|
|
public String projectColor = ""; |
|
|
|
|
|
// amount |
|
|
// amount |
|
|
public Integer amount; |
|
|
public Integer amount; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final String STATUS_NOT_LOADED = "NOT_LOADED"; |
|
|
|
|
|
public static final String STATUS_LOADED = "LOADED"; |
|
|
|
|
|
// status |
|
|
|
|
|
public String status = CsmLargeBufferTube.STATUS_NOT_LOADED; |
|
|
|
|
|
|
|
|
|
|
|
// exists |
|
|
|
|
|
public Boolean exists = false; |
|
|
|
|
|
|
|
|
|
|
|
// manager |
|
|
|
|
|
private final CsmLargeBufferTubeManager manager; |
|
|
|
|
|
|
|
|
|
|
|
// constructor |
|
|
// constructor |
|
|
public CsmLargeBufferTube(CsmLargeBufferTubeManager manager) { |
|
|
public CsmLargeBufferTube(CsmLargeBufferTubeManager manager) { |
|
|
this.manager = manager; |
|
|
this.manager = manager; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// get location x |
|
|
// get location x |
|
|
|
|
|
@JsonIgnore |
|
|
public Integer getLocationX() { |
|
|
public Integer getLocationX() { |
|
|
Integer startLocation = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationStart.x"); |
|
|
Integer startLocation = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationStart.x"); |
|
|
Integer distance = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationDistanceX"); |
|
|
Integer distance = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationDistanceX"); |
|
|
return startLocation - distance * (this.position % 3); |
|
|
|
|
|
|
|
|
return startLocation - distance * (this.index % 3); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// get location y |
|
|
// get location y |
|
|
|
|
|
@JsonIgnore |
|
|
public Integer getLocationY() { |
|
|
public Integer getLocationY() { |
|
|
Integer startLocation = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationStart.y"); |
|
|
Integer startLocation = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationStart.y"); |
|
|
Integer distance = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationDistanceY"); |
|
|
Integer distance = this.manager.getDevice().getLocationByName("largeBufferTubeAspirationDistanceY"); |
|
|
return startLocation - distance * (this.position / 2); |
|
|
|
|
|
|
|
|
return startLocation - distance * (this.index / 2); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// get location z |
|
|
// get location z |
|
|
|
|
|
@JsonIgnore |
|
|
public Integer getLocationZ() { |
|
|
public Integer getLocationZ() { |
|
|
return this.manager.getDevice().getLocationByName("largeBufferTuebAspirationDepth"); |
|
|
return this.manager.getDevice().getLocationByName("largeBufferTuebAspirationDepth"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// get if the tube is empty |
|
|
// get if the tube is empty |
|
|
|
|
|
@JsonIgnore |
|
|
public boolean isEmpty() { |
|
|
public boolean isEmpty() { |
|
|
// @TODO : check if the tube is empty |
|
|
// @TODO : check if the tube is empty |
|
|
return false; |
|
|
return false; |
|
|