public class AutochangerLatch extends MobileItem implements MovedByEPOSController, ControlledBySensors
agentStateService, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, s, scheduleralertSeparator| 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 |
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
|
FcsEnumerations.LockStatus |
getLockStatus()
Return lockStatus.
|
long |
getTimeoutForClosing()
Return timeoutForClosing
|
long |
getTimeoutForOpening()
Return timeoutForOpening
|
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 |
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, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetControllerName, monitorCurrentcheckSensorsclearAlarm, getAlertSeparator, getAlertService, getName, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningpublic 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 long getTimeoutForOpening()
public long getTimeoutForClosing()
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 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()
updateCurrent in interface MovedByEPOSControllerFcsHardwareException@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=1,
description="Open latch.")
public void open()
FcsHardwareExceptionpublic 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 © 2019 LSST. All rights reserved.