public class AutochangerLatch extends MobileItem implements MovedByEPOSController, ControlledBySensors
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
updatingState |
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, s, scheduleralertSeparater| 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.
|
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 |
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 |
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.
|
abort, abort, cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdown, signal, stop, stopActionNow, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmonitorCurrentcheckSensorsclearAlarm, getAlertService, getName, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningcheckHardware, checkStartedpublic AutochangerLatch(EPOSController latchController, ComplementarySensors closeSensors, ComplementarySensors openSensors, ComplementarySensors filterEngagedSensors)
latchController - closeSensors - openSensors - 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 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 isClosed()
@Command(type=QUERY,
level=1,
description="Returns true if LockStatus=UNLOCKED. Doesn\'t read again sensors.",
alias="isOpen")
public boolean isOpened()
@Command(type=QUERY,
level=1,
description="Returns true if LockStatus=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 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 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 © 2018 LSST. All rights reserved.