public class LoaderCarrierModule extends MobileItemModule implements MovedByEPOSController
| Modifier and Type | Field and Description |
|---|---|
protected NumericSensor |
handoffPositionSensor0 |
protected NumericSensor |
handoffPositionSensor1 |
protected NumericSensor |
storagePositionSensor0 |
protected NumericSensor |
storagePositionSensor1 |
protected boolean |
updatingState |
currentAction, FCSLOG, haltRequired, hasToWaitForEndOfAction, lock, motionCompleted, moving, scheduler, stopRequired| Constructor and Description |
|---|
LoaderCarrierModule(NumericSensor handoffPositionSensor,
NumericSensor handoffPositionSensor1,
NumericSensor storagePositionSensor,
NumericSensor storagePositionSensor1)
Creation of a LoaderCarrierModule with 4 sensors.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
Aborts an action.
|
org.lsst.ccs.framework.TreeWalkerDiag |
checkHardware() |
StatusDataPublishedByLoaderCarrier |
createStatusDataPublishedByLoaderCarrier()
Creates an object to be published on the STATUS bus.
|
String |
getControllerName()
Return the name of the controller.
|
protected int |
getCurrent()
returns current for tests
|
int |
getHandoffPosition() |
int |
getMaxCurrent()
Returns max current - Used by GUI
|
int |
getMaxSpeed()
Returns max speed - Used by GUI
|
int |
getPosition() |
int |
getStoragePosition() |
long |
getTimeoutForGoingToHandOff()
Used by GUI
|
long |
getTimeoutForGoingToStorage()
Used by GUI
|
void |
goToAbsolutePosition(int absolutePosition)
For end user.
|
void |
goToHandOff()
Move the carrier to Handoff position.
|
void |
goToStorage()
Move the carrier to storage position.
|
void |
initializeHardware()
Command for ENGINEERING mode.
|
void |
initModule() |
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action)
Tests if action is completed.
|
boolean |
isAtHandoffPosition()
Returns the boolean field atHandoff.
|
boolean |
isAtStoragePosition()
Returns the boolean field atStorage.
|
boolean |
isCANDevicesReady()
Returns true if loader CANopen devices are booted, identified and initialized.
|
boolean |
isControllerInFault()
Returns true if carrierController is in Fault.
|
boolean |
isHandoffSensorsInError() |
boolean |
isInitialized() |
boolean |
isStorageSensorsInError() |
void |
postAction(FcsEnumerations.MobileItemAction action)
Puts controller off after an action and tests if the result of the action is correct.
|
String |
printHardwareState()
Return a printed list of hardware with initialization information.
|
void |
processEmergencyMessage(EmergencyMessage msg)
What to do when we received an Emergency message from controller with an errorCode;
|
void |
processFaultReset()
What to do when a faultReset has been done on the controller.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
int |
readPosition()
To display position for end user.
|
void |
setControllerInFault(boolean controllerInFault) |
void |
startAction(FcsEnumerations.MobileItemAction action)
Starts an action on the carrier.
|
void |
tick() |
void |
updatePosition()
Updates the field position of the carrier in reading the CPU of the
controller.
|
protected void |
updateStateWithSensors(String[] readHexaValues)
This methods updates the lockStatus from an array of hexaValues.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted() |
abort, abort, checkStarted, checkStopped, executeAction, getHaltRequired, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopgetNObserverThreads, getObservables, getTickMillis, init, listens, processUpdate, sendSignal, sendSignalWithTimeLimit, setNObserverThreads, setObservables, setTickMillis, startTicking, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessUpdategetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarningchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected NumericSensor storagePositionSensor0
protected NumericSensor handoffPositionSensor0
protected NumericSensor storagePositionSensor1
protected NumericSensor handoffPositionSensor1
protected volatile boolean updatingState
public LoaderCarrierModule(NumericSensor handoffPositionSensor, NumericSensor handoffPositionSensor1, NumericSensor storagePositionSensor, NumericSensor storagePositionSensor1)
handoffPositionSensor - handoffPositionSensor1 - storagePositionSensor - storagePositionSensor1 - @Command(type=QUERY,
level=0,
description="Returns carrier position.")
public int getPosition()
protected int getCurrent()
@Command(type=QUERY,
level=1,
description="Returns true if carrierController is in Fault.")
public boolean isControllerInFault()
isControllerInFault in interface MovedByEPOSControllerpublic String getControllerName()
MovedByEPOSControllergetControllerName in interface MovedByEPOSControllerpublic void setControllerInFault(boolean controllerInFault)
setControllerInFault in interface MovedByEPOSController@Command(type=QUERY,
level=1,
description="Returns true if carrier is initialized and ready to receive commands.")
public boolean isInitialized()
@Command(type=QUERY,
level=1,
description="Return the max speed in rpm/mn (format decimal).")
public int getMaxSpeed()
@Command(type=QUERY,
level=1,
description="Return the max current in mA (format decimal).")
public int getMaxCurrent()
@Command(type=QUERY,
level=1,
description="Return the handoff position in microns (format decimal).")
public int getHandoffPosition()
@Command(type=QUERY,
level=1,
description="Return the storage position in microns (format decimal).")
public int getStoragePosition()
@Command(type=QUERY,
level=1,
description="Return the timeout for going to Handoff in millis (format decimal).")
public long getTimeoutForGoingToHandOff()
@Command(type=QUERY,
level=1,
description="Return the timeout for going to Storage in millis (format decimal).")
public long getTimeoutForGoingToStorage()
@Command(type=QUERY,
level=1,
description="Return false if the 2 redondant position sensors at Storage are equal.")
public boolean isStorageSensorsInError()
@Command(type=QUERY,
level=1,
description="Return false if the 2 redondant position sensors at HandOff are equal.")
public boolean isHandoffSensorsInError()
public void initModule()
initModule in class MobileItemModulepublic void tick()
tick in class org.lsst.ccs.framework.Modulepublic org.lsst.ccs.framework.TreeWalkerDiag checkHardware()
throws org.lsst.ccs.HardwareException
checkHardware in interface org.lsst.ccs.framework.HardwareControllercheckHardware in class MobileItemModuleorg.lsst.ccs.HardwareExceptionpublic boolean isCANDevicesReady()
isCANDevicesReady in class MobileItemModule@Command(type=QUERY,
level=0,
description="Return true if the carrier is at storage position. This command doesn\'t read again the sensors.")
public boolean isAtStoragePosition()
@Command(type=QUERY,
level=0,
description="Return true if the carrier is at HANDOFF position. This command doesn\'t read again the sensors.")
public boolean isAtHandoffPosition()
@Command(type=ACTION,
level=1,
alias="goToHandoff",
description="Move the carrier to Handoff position.")
public void goToHandOff()
@Command(type=ACTION,
level=1,
description="Move the carrier to STORAGE position.")
public void goToStorage()
@Command(type=ACTION,
level=1,
description="Move the carrier to absolute position given as argument (in decimal format).")
public void goToAbsolutePosition(int absolutePosition)
absolutePosition - public boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemModuleaction - to be tested@Command(type=QUERY,
level=1,
description="Update carrier position in reading controller.")
public void updatePosition()
FcsHardwareException@Command(type=QUERY,
level=1,
description="To update and display position for end user.Updates carrier position in reading controller and returns it.")
public int readPosition()
public void updateStateWithSensorsToCheckIfActionIsCompleted()
updateStateWithSensorsToCheckIfActionIsCompleted in class MobileItemModuleprotected void updateStateWithSensors(String[] readHexaValues)
readHexaValues - FcsHardwareExceptionpublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemModuleaction - to be startedpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
abortAction in class MobileItemModuleaction - delay - public void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemModulepublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItemModuleaction - @Command(type=ACTION,
level=1,
description="Check if hardware is ready to be started.")
public void initializeHardware()
FcsHardwareException@Command(type=ACTION,
level=1,
description="Return a printed list of hardware with initialization information.")
public String printHardwareState()
public StatusDataPublishedByLoaderCarrier createStatusDataPublishedByLoaderCarrier()
public void processEmergencyMessage(EmergencyMessage msg)
processEmergencyMessage in interface MovedByEPOSControllermsg - public void processFaultReset()
MovedByEPOSControllerprocessFaultReset in interface MovedByEPOSControllerpublic void publishData()
publishData in interface MovedByEPOSControllerpublishData in class MobileItemModuleCopyright © 2016 LSST. All rights reserved.