
public abstract class BasicAutoChanger extends MobileItem implements FilterHolder, TruckMotorListener
| Modifier and Type | Field and Description |
|---|---|
protected Carousel |
carousel |
protected boolean |
closingLatches |
protected FcsEnumerations.LockStatus |
latchesState |
protected boolean |
openingLatches |
static String |
publishedByAutoChangerOutputName |
protected ModuleState |
state |
protected long |
timeoutForClosingLatches |
protected long |
timeoutForOpeningLatches |
protected Truck |
truckXminus
The truck on side X-
|
protected Truck |
truckXplus
The truck on side X+
|
protected boolean |
updatingLatches
****************************************************************************************
|
agentStateService, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, s, scheduleralertSeparator| Constructor and Description |
|---|
BasicAutoChanger(SftFilterLatch latchXminus,
SftFilterLatch latchXplus,
Truck truckXminus,
Truck truckXplus,
String railsSensorsDIOName,
String filterSensorsDIOName)
Build a BasicAutoChangerModule with 2 latches, 2 trucks and 2 DIO devices.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
build() |
void |
checkPreConditionsForTrucksMotion()
This method checks if the preconditions are ok before a motion of the
trucks can be started.
|
String |
closeLatchesAtStandby()
Close the 2 latches when the autochanger trucks are at standby position.
|
Filter |
getFilterOnTrucks() |
String |
getFilterOnTrucksName() |
CompactIO |
getFilterSensorsDIO() |
String |
getFilterSensorsDIOName() |
FcsEnumerations.LockStatus |
getLatchesState()
This method returns the latchesState if it is not been updated otherwise
it waits until the end of the update.
|
SftFilterLatch |
getLatchXminus() |
SftFilterLatch |
getLatchXplus() |
CompactIO |
getRailsSensorsDIO()
***********************************************************************************************
|
String |
getRailsSensorsDIOName() |
ModuleState |
getState() |
StatusDataPublishedByBasicAutoChanger |
getStatusData() |
FcsEnumerations.AutoChangerTrucksLocation |
getTrucksLocation()
This method returns the truckLocation if it is not been updated otherwise
it waits until the end of the update.
|
Truck |
getTruckXminus() |
Truck |
getTruckXplus() |
abstract String |
goToStandback() |
abstract String |
goToStandby() |
String |
grabFilterAtStandby(Filter filter)
Go to STANDBY to grab filter and stay at STANDBY.
|
void |
init()
**************************************************************************************************
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoff()
This method returns true if the autochanger trucks are at HANDOFF position, false otherwise.
|
boolean |
isAtStandback()
For the single-filter-test only ?
|
boolean |
isAtStandby()
This method returns true if the autochanger trucks are at STANDBY position, false otherwise.
|
boolean |
isHoldingFilter()
Return true if the FilterHolder is holding a filter, false otherwise.
|
boolean |
isHoldingFilterAtStandback() |
boolean |
isHoldingFilterAtStandby() |
abstract boolean |
isMoving()
Return true if the MobileItemMobile is moving.
|
abstract boolean |
isMovingToStandback() |
abstract boolean |
isMovingToStandby() |
boolean |
isOnline() |
boolean |
isTrucksEmpty() |
abstract String |
moveFilterToStandback(Filter aFilter) |
abstract String |
moveFilterToStandby(Filter aFilter) |
boolean |
myDevicesReady()
Return True if all CAN open devices useful for this MobileItemMobile are ready for an action.
|
void |
onTruckEvent() |
String |
openLatchesAtStandby()
Open the 2 latches when the autochanger trucks are at standby position.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
publishDataAndNotifyObservers() |
void |
setFilterOnTrucks(Filter filterOnTrucks) |
void |
setFilterSensorsDIOName(String filterSensorsDIOName) |
void |
setRailsSensorsDIOName(String railsSensorsDIOName) |
void |
setState(ModuleState state) |
void |
setTrucksEmpty(boolean isEmpty) |
void |
startAction(FcsEnumerations.MobileItemAction action)
starts the action given as argument.
|
String |
toString() |
String |
ungrabFilterAtStandby()
Open the latches at standby position and go back empty to STANBACK
position.
|
void |
updateLatchesStateWithSensors()
This methods updates the latches status in reading the sensors.
|
abstract void |
updateStateWithSensors()
This method read values sent by the sensors and update state from this new values.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted()
reads sensors or any device and updates state from sensors
it can be also reading a position or a current on a motor controller.
|
void |
updateTrucksLocationWithSensors()
This methods updates the trucks location in reading the sensors.
|
cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, quickStopAction, readSensorsUntilActionIsCompleted, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisNotHoldingFiltercheckHardware, checkStartedclearAlarm, getAlertSeparator, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning@LookupField(strategy=BYNAME) protected Carousel carousel
protected Truck truckXminus
protected Truck truckXplus
public static final String publishedByAutoChangerOutputName
protected volatile ModuleState state
protected volatile FcsEnumerations.LockStatus latchesState
protected volatile boolean updatingLatches
protected volatile boolean closingLatches
protected volatile boolean openingLatches
protected long timeoutForOpeningLatches
protected long timeoutForClosingLatches
public BasicAutoChanger(SftFilterLatch latchXminus, SftFilterLatch latchXplus, Truck truckXminus, Truck truckXplus, String railsSensorsDIOName, String filterSensorsDIOName)
latchXminus - latchXplus - truckXminus - truckXplus - railsSensorsDIOName - filterSensorsDIOName - public CompactIO getRailsSensorsDIO()
public CompactIO getFilterSensorsDIO()
public Filter getFilterOnTrucks()
public ModuleState getState()
public void setState(ModuleState state)
state - the state to setpublic SftFilterLatch getLatchXminus()
public SftFilterLatch getLatchXplus()
public Truck getTruckXminus()
public Truck getTruckXplus()
public boolean isTrucksEmpty()
public void setTrucksEmpty(boolean isEmpty)
public void setFilterOnTrucks(Filter filterOnTrucks)
public String getFilterOnTrucksName()
public String getFilterSensorsDIOName()
public void setFilterSensorsDIOName(String filterSensorsDIOName)
public String getRailsSensorsDIOName()
public void setRailsSensorsDIOName(String railsSensorsDIOName)
public abstract boolean isMovingToStandback()
public abstract boolean isMovingToStandby()
public void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic void build()
build in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
level=1,
description="Returns true if hardware is connected and ready.")
public boolean myDevicesReady()
MobileItemmyDevicesReady in class MobileItempublic void onTruckEvent()
onTruckEvent in interface TruckMotorListenerpublic StatusDataPublishedByBasicAutoChanger getStatusData()
public void publishDataAndNotifyObservers()
public void publishData()
publishData in class MobileItempublic abstract boolean isMoving()
MobileItemisMoving in class MobileItempublic abstract String goToStandby()
public abstract String goToStandback()
public abstract void updateStateWithSensors()
FilterHolderupdateStateWithSensors in interface FilterHolder@Command(type=QUERY,
level=1,
description="checks if the preconditions are ok before a motion of the trucks can be started")
public void checkPreConditionsForTrucksMotion()
@Command(type=ACTION,
level=1,
description="Go to STANDBY to grab filter and stay at STANDBY")
public String grabFilterAtStandby(Filter filter)
filter - FcsHardwareException@Command(type=ACTION,
level=1,
description="Ungrab filter at STANDBY and go back to HANDOFF")
public String ungrabFilterAtStandby()
RejectedCommandExceptionFcsHardwareExceptionpublic FcsEnumerations.LockStatus getLatchesState()
public boolean isHoldingFilter()
FilterHolderisHoldingFilter in interface FilterHolder@Command(type=QUERY,
level=0,
description="Return true if the trucks are at STANDBY position and hold a filter")
public boolean isHoldingFilterAtStandby()
@Command(type=QUERY,
level=0,
description="Return true if the trucks are at STANDBACK position and hold a filter")
public boolean isHoldingFilterAtStandback()
public boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void startAction(FcsEnumerations.MobileItemAction action)
MobileItemstartAction in class MobileItempublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemabortAction in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItem@Command(type=ACTION,
level=1,
description="Open the 2 latches when the autochanger trucks are at standby position",
alias="openLatches")
public String openLatchesAtStandby()
throws FcsHardwareException
RejectedCommandExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Close the 2 latches when the autochanger trucks are at standby position",
alias="closeLatches")
public String closeLatchesAtStandby()
RejectedCommandExceptionFcsHardwareExceptionpublic void updateLatchesStateWithSensors()
FcsHardwareExceptionpublic FcsEnumerations.AutoChangerTrucksLocation getTrucksLocation()
@Command(type=QUERY,
level=1,
description="Return true if the trucks are at STANDBY position")
public boolean isAtStandby()
FilterHolderisAtStandby in interface FilterHolder@Command(type=QUERY,
level=1,
description="Return true if the trucks are at STANDBACK position")
public boolean isAtStandback()
@Command(type=QUERY,
level=1,
description="Return true if the trucks are at HANDOFF position")
public boolean isAtHandoff()
FilterHolderisAtHandoff in interface FilterHolder@Command(type=QUERY,
level=1,
description="Return true if the trucks are at ONLINE position")
public boolean isOnline()
public void updateTrucksLocationWithSensors()
FcsHardwareExceptionCopyright © 2018 LSST. All rights reserved.