
public class LoaderCarrierModule extends MobileItemModule implements MovedByEPOSController, ControlledBySensors
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
updatingState |
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, scheduler| Constructor and Description |
|---|
LoaderCarrierModule(RedondantSensors handoffSensors,
RedondantSensors storageSensors)
Buils a LoaderCarrierModule with 2 couples of redondants sensors to detect carrier position.
|
| 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()
Moves loader 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 |
isInError()
returns true if handoff sensors or storage sensors are in error.
|
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 |
processUpdate(Observable source,
org.lsst.ccs.framework.Module.ValueUpdate v)
Updates field controllerInFault when the controller notifies its observers and sends new values.
|
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 |
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()
reads sensors or any device and updates state from sensors
it can be also reading a position or a current on a motor controller.
|
abort, abort, checkStarted, checkStopped, executeAction, getHaltRequired, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopgetNObserverThreads, getObservables, getTickMillis, init, listens, sendSignal, sendSignalWithTimeLimit, setNObserverThreads, setObservables, setTickMillis, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateControllerInFaultcheckSensorsraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarninggetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangepublic LoaderCarrierModule(RedondantSensors handoffSensors, RedondantSensors storageSensors)
handoffSensors - storageSensors - @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 boolean isInError()
isInError in interface ControlledBySensorspublic void initModule()
initModule in class MobileItemModulepublic 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()
MobileItemModuleupdateStateWithSensorsToCheckIfActionIsCompleted 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 void processUpdate(Observable source, org.lsst.ccs.framework.Module.ValueUpdate v)
processUpdate in class org.lsst.ccs.framework.Modulesource - v - public void processEmergencyMessage(EmergencyMessage msg)
processEmergencyMessage in interface MovedByEPOSControllermsg - public void processFaultReset()
MovedByEPOSControllerprocessFaultReset in interface MovedByEPOSControllerpublic StatusDataPublishedByLoaderCarrier createStatusDataPublishedByLoaderCarrier()
public void publishData()
publishData in interface MovedByEPOSControllerpublishData in class MobileItemModuleCopyright © 2017 LSST. All rights reserved.