
public abstract class BasicAutoChangerModule extends MobileItemModule implements FilterHolder, TruckMotorListener
| Modifier and Type | Field and Description |
|---|---|
protected CarouselModule |
carousel |
protected boolean |
closingLatches |
protected FcsEnumerations.LockStatus |
latchesState |
protected boolean |
openingLatches |
static String |
publishedByAutoChangerOutputName |
protected ModuleState |
state |
protected long |
timeoutForClosingLatches |
protected long |
timeoutForOpeningLatches |
protected TruckModule |
truckXminus
The truck on side X-
|
protected TruckModule |
truckXplus
The truck on side X+
|
protected boolean |
updatingLatches
****************************************************************************************
|
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, scheduleralertSeparater| Constructor and Description |
|---|
BasicAutoChangerModule(SftFilterLatchModule latchXminus,
SftFilterLatchModule latchXplus,
TruckModule truckXminus,
TruckModule 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 |
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() |
CompactIOModule |
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.
|
SftFilterLatchModule |
getLatchXminus() |
SftFilterLatchModule |
getLatchXplus() |
CompactIOModule |
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.
|
TruckModule |
getTruckXminus() |
TruckModule |
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()
This method returns 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 |
postAction(FcsEnumerations.MobileItemAction action) |
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.
|
abort, abort, checkReadyForAction, checkStopped, executeAction, getHaltRequired, quickstop, quickStopAction, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckHardware, checkStartedraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningsendSignal, sendSignalWithTimeLimit@LookupField(strategy=BYNAME) protected CarouselModule carousel
protected TruckModule truckXminus
protected TruckModule 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 BasicAutoChangerModule(SftFilterLatchModule latchXminus, SftFilterLatchModule latchXplus, TruckModule truckXminus, TruckModule truckXplus, String railsSensorsDIOName, String filterSensorsDIOName)
latchXminus - latchXplus - truckXminus - truckXplus - railsSensorsDIOName - filterSensorsDIOName - public CompactIOModule getRailsSensorsDIO()
public CompactIOModule getFilterSensorsDIO()
public Filter getFilterOnTrucks()
public ModuleState getState()
public void setState(ModuleState state)
state - the state to setpublic SftFilterLatchModule getLatchXminus()
public SftFilterLatchModule getLatchXplus()
public TruckModule getTruckXminus()
public TruckModule 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.HasLifecycle@Command(type=QUERY, level=1, description="Returns true if hardware is connected and ready.") public boolean myDevicesReady()
MobileItemModulemyDevicesReady in class MobileItemModulepublic void onTruckEvent()
onTruckEvent in interface TruckMotorListenerpublic StatusDataPublishedByBasicAutoChanger getStatusData()
public void publishDataAndNotifyObservers()
public void publishData()
publishData in class MobileItemModulepublic abstract boolean isMoving()
MobileItemModuleisMoving in class MobileItemModulepublic 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=1, description="Return true if the trucks are at STANDBY position and hold a filter") public boolean isHoldingFilterAtStandby()
@Command(type=QUERY, level=1, 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 MobileItemModulepublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItemModulepublic void startAction(FcsEnumerations.MobileItemAction action)
MobileItemModulestartAction in class MobileItemModulepublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemModuleabortAction in class MobileItemModulepublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemModuleupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItemModule@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 © 2017 LSST. All rights reserved.