public class AutochangerLatch extends MobileItem implements MovedByEPOSController, ControlledBySensors
agentStateService, beginTime, commandDuration, currentAction, dataProviderDictionaryService, FCSLOG, hasToWaitForEndOfAction, lock, moving, name, path, readSensorsHandle, scheduler, subs, timeoutExceededalertSeparator| Constructor and Description |
|---|
AutochangerLatch(EPOSController latchController,
ComplementarySensors closeSensors,
ComplementarySensors openSensors,
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
|
void |
build() |
void |
close()
Close this latch.
|
StatusDataPublishedByAutochangerLatch |
createStatusDataPublishedByLatch()
Creates an return an object to be published on the STATUS bus.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
Ending action OPEN or CLOSE
|
EPOSController |
getController()
Return latchController
|
int |
getCurrentToClose()
For simulation, return currentToClose
|
int |
getCurrentToOpen()
For simulation, return currentToClose
|
FcsEnumerations.LockStatus |
getLockStatus()
Return lockStatus.
|
void |
init()
Initialize field autochanger and latchController
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action)
Return true if action is completed with success.
|
boolean |
isClosed()
Returns true if LockStatus=LOCKED Doesn't read again sensors.
|
boolean |
isEmpty()
Returns true if autochanger is empty.
|
boolean |
isFilterEngagedInError() |
boolean |
isInError()
Returns true if LockStatus=ERROR, this means that openSensor and closeSensor
return non consistant values.
|
boolean |
isInitialized()
Returns true if latch is initialized.
|
boolean |
isOpened()
Returns true if LockStatus=UNLOCKED Doesn't read again sensors.
|
boolean |
myDevicesReady()
Returns true if autochanger CANopen hardware is connected and ready.
|
void |
open()
Open this latch.
|
void |
postStart()
Executed during INITIALIZATION phase.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
recoveryClose() |
void |
recoveryOpen() |
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.
|
protected void |
updateState()
This methods updates lockStatus from the values return by the sensors.
|
void |
updateStateAndCheckSensors()
Reads sensors, updates state and checks if sensors are in error.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted()
Read sensors and update State.
|
cancelReadingSensors, checkReadyForAction, executeAction, getActionDurationPath, getAlertService, getHaltRequired, getName, getPath, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, registerAction, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetControllerNamecheckSensorsclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewpublic AutochangerLatch(EPOSController latchController, ComplementarySensors closeSensors, ComplementarySensors openSensors, ComplementarySensors filterEngagedSensors)
latchController - closeSensors - openSensors - filterEngagedSensors - public EPOSController getController()
getController in interface MovedByEPOSController@Command(type=QUERY,
level=1,
description="Returns true if latch is initialized.")
public boolean isInitialized()
public int getCurrentToClose()
public int getCurrentToOpen()
public FcsEnumerations.LockStatus getLockStatus()
@Command(type=QUERY,
level=1,
description="Returns true if LOCKED. Doesn\'t read again sensors.",
alias="isClosed")
public boolean isClosed()
@Command(type=QUERY,
level=1,
description="Returns true if UNLOCKED. Doesn\'t read again sensors.",
alias="isOpen")
public boolean isOpened()
@Command(type=QUERY,
level=1,
description="Returns true if in ERROR, this means that openSensor and closeSensor 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 boolean isFilterEngagedInError()
public void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic void build()
build in interface org.lsst.ccs.framework.HasLifecyclepublic void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycleprotected void updateState()
@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 myDevicesReady()
myDevicesReady in class MobileItem@Command(type=ACTION,
level=1,
description="Close latch.")
public void close()
@Command(type=ACTION,
level=3,
description="Close latch even if latch sensors are in error.")
public void recoveryClose()
@Command(type=ACTION,
level=1,
description="Open latch.")
public void open()
FcsHardwareException@Command(type=ACTION,
level=3,
description="Open latch even if latch sensors are in error.")
public void recoveryOpen()
public boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemaction - public void updateStateAndCheckSensors()
public void updateStateWithSensorsToCheckIfActionIsCompleted()
updateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemaction - FcsHardwareExceptionpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
abortAction in class MobileItemaction - delay - FcsHardwareExceptionpublic void endAction(FcsEnumerations.MobileItemAction action)
endAction in class MobileItemaction - FcsHardwareExceptionpublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemaction - delay - FcsHardwareExceptionpublic StatusDataPublishedByAutochangerLatch createStatusDataPublishedByLatch()
@Command(type=QUERY,
level=1,
description="Publish Data on the Status Bus.")
public void publishData()
publishData in interface MovedByEPOSControllerpublishData in class MobileItemCopyright © 2023 LSST. All rights reserved.