public abstract class MobileItemModule
extends org.lsst.ccs.framework.Module
| Modifier and Type | Field and Description |
|---|---|
protected FcsEnumerations.MobileItemAction |
currentAction |
protected AtomicBoolean |
haltRequired |
protected boolean |
itemMoving |
protected Lock |
lock |
protected Condition |
motionCompleted |
| Constructor and Description |
|---|
MobileItemModule(String moduleName,
int aTickMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
abort(long delay)
just to avoid taping "sendSignal HALT"
|
protected String |
executeAction(FcsEnumerations.MobileItemAction action,
long timeoutForAction)
This executes an action which moves the MobileItem and waits for the end od this action.
|
abstract boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isItemMoving() |
abstract void |
postAction(FcsEnumerations.MobileItemAction action) |
void |
readSensorsUntilActionIsCompleted(FcsEnumerations.MobileItemAction action,
long beginTime,
long timeout)
Start reading the sensors at a fixed rate (scheduler.scheduleAtFixedRate) until the action is completed or the timeout for this action is past.
|
org.lsst.ccs.framework.TreeWalkerDiag |
signal(org.lsst.ccs.framework.Signal signal)
This shutdowns the scheduler.
|
abstract void |
startAction(FcsEnumerations.MobileItemAction action) |
void |
stop() |
abstract void |
stopAction(FcsEnumerations.MobileItemAction action,
long delay) |
abstract void |
updateStateWithSensorsToCheckIfActionIsCompleted() |
alias, change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getComponentByName, getComponentDictionariesTree, getComponentTree, getContext, getDictionary, getEnvironment, getMainDictionary, getModule, getName, getNObserverThreads, getObservables, getParent, getSubsystem, getTickMillis, init, initModule, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, percolateSignal, processUpdate, publish, publish, publish, publish, publish, publish, publishData, publishData, publishData, publishData, publishData, publishData, publishData, register, sendSignal, sendSignal, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedprotected volatile boolean itemMoving
protected volatile FcsEnumerations.MobileItemAction currentAction
protected final Lock lock
protected final Condition motionCompleted
protected AtomicBoolean haltRequired
public MobileItemModule(String moduleName, int aTickMillis)
public boolean isItemMoving()
public abstract boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
public abstract void updateStateWithSensorsToCheckIfActionIsCompleted()
throws Exception
Exceptionpublic abstract void startAction(FcsEnumerations.MobileItemAction action) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionpublic abstract void stopAction(FcsEnumerations.MobileItemAction action, long delay) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionpublic abstract void postAction(FcsEnumerations.MobileItemAction action) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionprotected String executeAction(FcsEnumerations.MobileItemAction action, long timeoutForAction) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
action, - timeouttimeoutForAction - org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionpublic void readSensorsUntilActionIsCompleted(FcsEnumerations.MobileItemAction action, long beginTime, long timeout)
action - beginTime - timeout - @Command(type=ABORT,
level=1,
description="Abort the running action.")
public void abort(long delay)
throws org.lsst.ccs.bus.BadCommandException
delay - org.lsst.ccs.bus.BadCommandException@Command(type=ABORT,
level=1,
description="Abort the running action.")
public void abort()
throws org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.BadCommandException@Command(type=ABORT,
level=1,
description="Abort the running action.")
public void stop()
throws org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.BadCommandExceptionpublic org.lsst.ccs.framework.TreeWalkerDiag signal(org.lsst.ccs.framework.Signal signal)
signal in interface org.lsst.ccs.framework.SignalHandlersignal in class org.lsst.ccs.framework.ModuleCopyright © 2014 LSST. All Rights Reserved.