
public class CarouselModule extends MobileItemModule implements org.lsst.ccs.framework.HardwareController, FilterHolder
| Modifier and Type | Field and Description |
|---|---|
protected PieceOfHardware |
ai814 |
protected Map<String,CarouselSocket> |
socketsMap
A map to store the sockets by their names.
|
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, scheduler| Constructor and Description |
|---|
CarouselModule()
A Constructor with a variable numbers of sockets.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
checkConditionsForRotation()
Check if carousel rotation is permitted.
|
org.lsst.ccs.framework.TreeWalkerDiag |
checkHardware()
Executed during Initialization phase by the framework.
|
void |
checkStarted()
CheckStarted is executed by completeInitialization when a first start has
failed.
|
void |
checkStopped()
This method is executed during a shutdownEPOS of the subystem to prevent a
shutdownEPOS when some hardware is moving.
|
StatusDataPublishedByCarousel |
createStatusDataPublishedByCarousel()
Create an object StatusDataPublishedByCarousel to be published on the
STATUS bus.
|
String |
engageBrake() |
void |
engageClampsContact() |
CarouselClampModule |
getClampXminus()
This method returns the clampX- which is at standby filterPosition.
|
EPOSController |
getClampXminusController() |
CarouselClampModule |
getClampXplus()
This method returns the clampX+ which is at standby filterPosition.
|
EPOSController |
getClampXplusController() |
Filter |
getFilterAtStandby()
This methods return the filter which is in the socketAtStandby at standby
filterPosition.
|
String |
getFilterAtStandbyName()
Returns name of filter which is in the socket at STANDBY position or
NO_FILTER if there is no filter at STANDBY.
|
int |
getPosition()
return carousel position.
|
CarouselSocket |
getSocketAtStandby()
Return the socket HALTED at STANDBY filterPosition if there is one.
|
CarouselSocket |
getSocketByName(String socketName)
Return a CarouselSocket which name is given as parameter.
|
ModuleState |
getState() |
String |
grabFilterAtStandby(Filter filter)
This method has to be executed when a filter has just been moved on the
carousel at standby filterPosition by the autochanger.
|
String |
grabFilterAtStandby(String filterName)
Grab a filter at STANDBY position.
|
void |
initModule() |
boolean |
isAbleToMove() |
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoff()
This method returns true if the autochanger trucks are at HANDOFF position, false otherwise.
|
boolean |
isAtStandby()
Used to publish on the STATUS bus for the GUI.
|
boolean |
isAtStandby(Filter filter)
Return true if the filter given as argument is at STANDBY position.
|
boolean |
isAutochangerHoldingFilter()
This methods returns true if the autochanger is holding a filter at
STANDBY position.
|
boolean |
isCANDevicesReady() |
boolean |
isHoldingFilter()
Return true if carousel is holding a filter at STANDBY position.
|
boolean |
isHoldingFilterAtStandby() |
boolean |
isLocked() |
boolean |
isReadyToGrabAFilterAtStandby()
This method let us know if the carousel is ready to receive a filter at
standby filterPosition : - the carousel must not rotate - an empty
socketAtStandby is at standby filterPosition.
|
boolean |
isRotating()
Returns true if carousel is rotating
|
void |
postAction(FcsEnumerations.MobileItemAction action) |
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
String |
releaseBrake() |
void |
releaseClamps()
Release clamps at standby position to get ready to clamp again.
|
void |
releaseClampsContact() |
void |
rotateEmptySocketAtStandby()
Move an empty socket to STANDBY position.
|
void |
rotateSocketToStandby(String socketName)
Rotate carousel to move a socket which name is given as argument to STANDBY position.
|
void |
rotateToAbsoluteAngle(int angle)
This command rotates carousel until the absolute target position is reached.
|
void |
rotateToRelativeAngle(int angle)
A command to rotate carousel.
|
void |
setRotationTimeout(int rotationTimeout)
Set a new rotationTimeout
|
void |
setState(ModuleState state) |
void |
startAction(FcsEnumerations.MobileItemAction action)
Starts action ROTATE_CAROUSEL_TO_ABSOLUTE_POSITION or ROTATE_CAROUSEL_TO_RELATIVE_POSITION.
|
void |
tick()
What has to be done for each tick of the timer.
|
String |
toString() |
void |
ungrabFilterAtStandby(String filterName)
This unlock clamps at STANDBY.
|
void |
unlockClamps()
Unlocks the clamps at STANDBY.
|
void |
updateClampsStateWithSensors()
Read the clamps state from PDO : all the clamp sensors are read at one
time.
|
void |
updateClampsStateWithSensorsFromPDO()
Read the clamps state from PDO : all the clamp sensors are read at one
time.
|
void |
updateClampsStateWithSensorsFromSDO()
Read the clamp sensors one by one with RSDO command
|
void |
updateCurrent()
Updates the field current in reading the CPU of the controller.
|
void |
updatePosition()
Updates the filterPosition of the carousel in reading the CPU of the
controller.
|
void |
updateStateWithSensors()
This method read values sent by the sensors and update state from this new values.
|
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, 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, wait, wait, waitraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarninggetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected PieceOfHardware ai814
protected Map<String,CarouselSocket> socketsMap
public CarouselModule()
public void setRotationTimeout(int rotationTimeout)
rotationTimeout - public CarouselSocket getSocketByName(String socketName)
socketName - @Command(type=QUERY, level=0, description="Return carousel position.", alias="printPosition") public int getPosition()
public ModuleState getState()
public void setState(ModuleState state)
public EPOSController getClampXminusController()
public EPOSController getClampXplusController()
public CarouselClampModule getClampXminus()
public CarouselClampModule getClampXplus()
@Command(type=QUERY, level=0, description="Return true if a socket is HALTED at STANDBY position, false otherwise.") public boolean isAtStandby()
isAtStandby in interface FilterHolderpublic CarouselSocket getSocketAtStandby()
public Filter getFilterAtStandby()
@Command(type=QUERY, level=0, description="Returns name of filter at STANDBY position or NO_FILTER if there is no filter at STANDBY.") public String getFilterAtStandbyName()
@Command(type=QUERY, level=0, description="Return true if Autochanger is holding filter at STANDBY.") public boolean isAutochangerHoldingFilter()
FcsHardwareExceptionpublic 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 void checkStarted()
throws org.lsst.ccs.HardwareException
checkStarted in interface org.lsst.ccs.framework.HardwareControllercheckStarted in class MobileItemModuleorg.lsst.ccs.HardwareExceptionpublic void checkStopped()
throws org.lsst.ccs.HardwareException
checkStopped in interface org.lsst.ccs.framework.HardwareControllercheckStopped in class MobileItemModuleorg.lsst.ccs.HardwareExceptionpublic void publishData()
publishData in class MobileItemModulepublic StatusDataPublishedByCarousel createStatusDataPublishedByCarousel()
@Command(type=QUERY, level=1, description="Returns true if Carousel is stopped and no filter is at STANDBY position") public boolean isReadyToGrabAFilterAtStandby()
FcsHardwareException@Command(type=QUERY, level=1, description="Returns true if a filter is clamped at STANDBY position") public boolean isHoldingFilterAtStandby()
@Command(type=QUERY, level=1, description="Returns true if carousel is rotating.") public boolean isRotating()
@Command(type=QUERY, level=1, description="Returns true if the brake is released") public boolean isAbleToMove()
public boolean isLocked()
@Command(type=ACTION, level=1, description="Engage the carousel brake to stop the rotation") public String engageBrake()
@Command(type=ACTION, level=1, description="Release the carousel brake") public String releaseBrake()
@Command(type=QUERY, level=1, description="Update carousel position in reading controller.") public void updatePosition()
SDORequestException@Command(type=QUERY, level=1, description="Update field current in reading controller.") public void updateCurrent()
SDORequestExceptionpublic void updateClampsStateWithSensorsFromSDO()
FcsHardwareExceptionpublic void updateClampsStateWithSensorsFromPDO()
FcsHardwareException@Command(type=QUERY, level=1, description="Read clamps sensors and update clamps state") public void updateClampsStateWithSensors()
FcsHardwareExceptionpublic void tick()
tick in class org.lsst.ccs.framework.Modulepublic String grabFilterAtStandby(String filterName)
filterName - FcsHardwareExceptionpublic String grabFilterAtStandby(Filter filter)
filter - FcsHardwareExceptionpublic void ungrabFilterAtStandby(String filterName)
filterName - FcsHardwareException@Command(type=ACTION, level=1, description="Release clamps at standby position to get ready to clamp again") public void releaseClamps()
@Command(type=ACTION, level=3, description="Unlock the clamps at STANDBY.") public void unlockClamps()
public boolean isAtStandby(Filter filter)
filter - public void releaseClampsContact()
public void engageClampsContact()
public boolean isCANDevicesReady()
isCANDevicesReady in class MobileItemModule@Command(type=QUERY, level=1, description="Check if carousel rotation is permitted.") public void checkConditionsForRotation()
FcsHardwareExceptionRejectedCommandException - (RuntimeException)@Command(type=ACTION, level=1, description="Rotate carousel to an absolute angle.") public void rotateToAbsoluteAngle(@Argument(name="angle",description="Angle to reach in degrees") int angle)
angle - FcsHardwareException@Command(type=ACTION, level=1, description="Rotate carousel for an angle.") public void rotateToRelativeAngle(@Argument(name="angle",description="Relative angle to reach in degrees. Can be positive or negative.") int angle)
angle - FcsHardwareException@Command(type=ACTION, level=1, description="Move a socket which name is given as argument to STANDBY position.", alias="moveSocketToStandby") public void rotateSocketToStandby(String socketName)
socketName - FcsHardwareExceptionpublic void rotateEmptySocketAtStandby()
FcsHardwareExceptionpublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemModulepublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemModuleupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItemModulepublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemModuleaction - public void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemModuleabortAction in class MobileItemModulepublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemModulepublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItemModulepublic boolean isHoldingFilter()
isHoldingFilter in interface FilterHolderFcsHardwareExceptionpublic boolean isAtHandoff()
FilterHolderisAtHandoff in interface FilterHolderpublic void updateStateWithSensors()
FilterHolderupdateStateWithSensors in interface FilterHolderCopyright © 2017 LSST. All rights reserved.