
public class AutochangerLatchModule extends MobileItemModule implements MovedByEPOSController, ControlledBySensors
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
updatingState |
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, scheduler| Constructor and Description |
|---|
AutochangerLatchModule(EPOSController latchController,
ComplementarySensors lockSensors,
ComplementarySensors unlockSensors,
ComplementarySensors filterEngagedSensors)
Buils a AutochangerLatchModule with a controller and 3 sensors.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
Stop action OPEN or CLOSE
|
org.lsst.ccs.framework.TreeWalkerDiag |
checkHardware()
Executed during INITIALIZATION phase.
|
void |
close()
Close this latch.
|
StatusDataPublishedByAutochangerLatch |
createStatusDataPublishedByLatch()
Creates an return an object to be published on the STATUS bus.
|
String |
getControllerName()
Return the name of the controller.
|
int |
getCurrentToClose()
For simulation, return currentToClose
|
EPOSController |
getLatchController()
Return latchController
|
FcsEnumerations.LockStatus |
getLockStatus()
Return lockStatus.
|
long |
getTimeoutForClosing()
Return timeoutForClosing
|
long |
getTimeoutForOpening()
Return timeoutForOpening
|
void |
initModule()
Initialize field autochanger and latchController
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action)
Return true if action is completed with success.
|
boolean |
isCANDevicesReady()
Returns true if autochanger CANopen hardware is connected and ready.
|
boolean |
isControllerInFault()
Returns true if latchController is in Fault.
|
boolean |
isEmpty()
Returns true if autochanger is empty.
|
boolean |
isInError()
Returns true if LockStatus=ERROR, this means that unlockSensor and lockSensor return
non consistant values.
|
boolean |
isInitialized()
Returns true if latch is initialized.
|
boolean |
isLocked()
Returns true if LockStatus=LOCKED
Doesn't read again sensors.
|
boolean |
isUnlocked()
Returns true if LockStatus=UNLOCKED
Doesn't read again sensors.
|
void |
open()
Open this latch.
|
void |
postAction(FcsEnumerations.MobileItemAction action)
Switch off controller after a CLOSE or OPEN action.
|
void |
processUpdate(Observable source,
org.lsst.ccs.framework.Module.ValueUpdate v)
Updates field controllerInFault when the controller notifies its observers and sends new values.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
setControllerInFault(boolean controllerInFault)
Set controllerInFault
|
void |
startAction(FcsEnumerations.MobileItemAction action)
Start Action OPEN or CLOSE
|
void |
updateCurrent()
Updates the field readCurrent of the latch in reading the CPU of the
controller.
|
void |
updateStateAndCheckSensors()
Reads sensors, updates state and checks if sensors are in error.
|
protected void |
updateStateWithSensors(String[] hexaValues)
This methods updates lockStatus from the values return by the sensors.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted()
Read sensors and update State.
|
abort, abort, checkStarted, checkStopped, executeAction, getHaltRequired, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopgetNObserverThreads, getObservables, getTickMillis, init, listens, setNObserverThreads, setObservables, setTickMillis, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessEmergencyMessage, processFaultReset, updateControllerInFaultcheckSensorsraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarninggetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, printConfigurableParameters, setBulkParameter, submitChange, submitChanges, validateBulkChangesetParameterBulkpublic AutochangerLatchModule(EPOSController latchController, ComplementarySensors lockSensors, ComplementarySensors unlockSensors, ComplementarySensors filterEngagedSensors)
latchController - lockSensors - unlockSensors - filterEngagedSensors - @Command(type=QUERY, level=1, description="Returns this latch controller name.") public String getControllerName()
MovedByEPOSControllergetControllerName in interface MovedByEPOSControllerpublic EPOSController getLatchController()
@Command(type=QUERY, level=1, description="Returns true if latchController is in Fault.") public boolean isControllerInFault()
isControllerInFault in interface MovedByEPOSControllerpublic void setControllerInFault(boolean controllerInFault)
setControllerInFault in interface MovedByEPOSControllercontrollerInFault - @Command(type=QUERY, level=1, description="Returns true if latch is initialized.") public boolean isInitialized()
public int getCurrentToClose()
public long getTimeoutForOpening()
public long getTimeoutForClosing()
public FcsEnumerations.LockStatus getLockStatus()
@Command(type=QUERY, level=1, description="Returns true if LockStatus=LOCKED. Doesn\'t read again sensors.", alias="isClosed") public boolean isLocked()
@Command(type=QUERY, level=1, description="Returns true if LockStatus=UNLOCKED. Doesn\'t read again sensors.", alias="isOpen") public boolean isUnlocked()
@Command(type=QUERY, level=1, description="Returns true if LockStatus=ERROR, this means that unlockSensor and lockSensor return non consistant values. Doesn\'t read again sensors.") public boolean isInError()
isInError in interface ControlledBySensors@Command(type=QUERY, level=1, description="Returns true if autochanger is empty. Doesn\'t read again sensors.") public boolean isEmpty()
public void initModule()
initModule in class MobileItemModule@Command(type=QUERY, level=1, description="Initialize latch controller.") public org.lsst.ccs.framework.TreeWalkerDiag checkHardware() throws org.lsst.ccs.HardwareException
checkHardware in interface org.lsst.ccs.framework.HardwareControllercheckHardware in class MobileItemModuleorg.lsst.ccs.HardwareExceptionprotected void updateStateWithSensors(String[] hexaValues)
hexaValues - @Command(type=QUERY, level=1, description="Update latch current in reading controller.") public void updateCurrent()
FcsHardwareException@Command(type=QUERY, level=1, description="Returns true if autochanger CANopen hardware is connected and ready.") public boolean isCANDevicesReady()
isCANDevicesReady in class MobileItemModule@Command(type=ACTION, level=1, description="Close latch.") public void close()
@Command(type=ACTION, level=1, description="Open latch.") public void open()
FcsHardwareExceptionpublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemModuleaction - public void updateStateAndCheckSensors()
public void updateStateWithSensorsToCheckIfActionIsCompleted()
updateStateWithSensorsToCheckIfActionIsCompleted in class MobileItemModulepublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemModuleaction - FcsHardwareExceptionpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
abortAction in class MobileItemModuleaction - delay - FcsHardwareExceptionpublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemModuleaction - delay - FcsHardwareExceptionpublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItemModuleaction - FcsHardwareExceptionpublic void processUpdate(Observable source, org.lsst.ccs.framework.Module.ValueUpdate v)
processUpdate in class org.lsst.ccs.framework.Modulesource - v - public StatusDataPublishedByAutochangerLatch createStatusDataPublishedByLatch()
@Command(type=QUERY, level=1, description="Publish Data on the Status Bus.") public void publishData()
publishData in interface MovedByEPOSControllerpublishData in class MobileItemModuleCopyright © 2017 LSST. All rights reserved.