public class CarouselModule
extends org.lsst.ccs.framework.Module
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,CarouselSocket> |
socketsMap
A map to store the sockets by their names.
|
| Constructor and Description |
|---|
CarouselModule(String aName,
int aTickMillis,
CarouselSocket... oneOrMoreSockets)
A Constructor with a variable numbers of sockets.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
addAngle(double angle1,
double angle2)
Add 2 angles : an angle is a double which value is between -360 and +360
|
StatusDataPublishedByCarousel |
createStatusDataPublishedByCarousel()
Create an object StatusDataPublishedByCarousel to be published on the
STATUS bus.
|
String |
engageBrake() |
void |
engageClampsContact() |
PieceOfHardware |
getCancbxAI420_1() |
PieceOfHardware |
getCancbxAI420_2() |
EPOSController |
getCarouselController() |
PieceOfHardware |
getClampsSensorsReader() |
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()
Return the filter which is in the socket at STANDBY filterPosition or
NO_FILTER if there is no filter at STANDBY.
|
double |
getFilterPosition(Filter filter) |
double |
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.
|
double |
getStandbyPositionForFilter(Filter filter) |
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(Object filterName) |
void |
initModule() |
boolean |
isAbleToMove() |
boolean |
isAtStandby()
Used to publish on the STATUS bus for the GUI.
|
boolean |
isAutochangerHoldingFilter()
This methods returns true if the autochanger is holding a filter at
STANDBY filterPosition.
|
boolean |
isHoldingFilterAtStandby() |
boolean |
isLocked() |
boolean |
isOnStandby(Filter filter) |
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() |
protected String |
moveFilterToStandby(Filter filter)
This method rotates the carousel to put the given filter in front of the
autochanger (standby filterPosition).
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
String |
releaseBrake() |
String |
releaseClamps() |
void |
releaseClampsContact() |
String |
rotate(double angle)
Rotates carousel for an angle given as a parameter.
|
String |
rotateToAbsoluteAngle(double angle)
A quick and dirty simulated rotation to test the carousel GUI.
|
String |
rotateToRelativeAngle(double angle)
A quick and dirty simulated rotation to test the carousel GUI.
|
void |
setState(ModuleState state) |
void |
tick()
What has to be done for each tick of the timer.
|
String |
toString() |
void |
ungrabFilterAtStandby(Filter filter) |
String |
unlockClamps() |
String |
unlockClamps(Filter filter)
This methods ReleaseBrakes the 2 clamps at STANDBY filterPosition.
|
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.
|
getComponentTree, getEnvironment, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, postStart, processUpdate, sendSignal, sendSignalWithTimeLimit, setEnvironment, setName, setNObserverThreads, setObservables, setTickMillis, shutdownNow, signal, startTicking, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchange, getCheckedValueFromConfiguration, getChildren, getComponentByName, getFullPath, getParent, getParentObject, injectResources, listChildren, notifyChange, notifyChangeWithoutPreliminaryChecks, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected Map<String,CarouselSocket> socketsMap
public CarouselModule(String aName, int aTickMillis, CarouselSocket... oneOrMoreSockets)
aName - aTickMillis - oneOrMoreSockets - public CarouselSocket getSocketByName(String socketName)
socketName - public double getPosition()
public ModuleState getState()
public void setState(ModuleState state)
public EPOSController getClampXminusController()
public EPOSController getClampXplusController()
public EPOSController getCarouselController()
public PieceOfHardware getClampsSensorsReader()
public PieceOfHardware getCancbxAI420_1()
public PieceOfHardware getCancbxAI420_2()
public CarouselClampModule getClampXminus()
public CarouselClampModule getClampXplus()
public boolean isAtStandby()
public CarouselSocket getSocketAtStandby()
public Filter getFilterAtStandby()
public String getFilterAtStandbyName()
public boolean isAutochangerHoldingFilter()
public void initModule()
initModule in class org.lsst.ccs.framework.Modulepublic void publishData()
public StatusDataPublishedByCarousel createStatusDataPublishedByCarousel()
@Command(level=1,
type=QUERY,
description="Returns true if Carousel is stopped and no filter is at STANDBY position")
public boolean isReadyToGrabAFilterAtStandby()
throws FcsHardwareException
FcsHardwareException@Command(level=1,
type=QUERY,
description="Returns true if a filter is clamped at STANDBY position")
public boolean isHoldingFilterAtStandby()
throws FcsHardwareException
FcsHardwareExceptionpublic boolean isRotating()
@Command(level=1,
type=QUERY,
description="Returns true if the brake is released")
public boolean isAbleToMove()
public boolean isLocked()
@Command(level=1,
type=ACTION,
description="Engage the carousel brake to stop the rotation")
public String engageBrake()
@Command(level=1,
type=ACTION,
description="Release the carousel brake")
public String releaseBrake()
@Command(type=QUERY,
level=1,
description="Update carousel position in reading controller.")
public void updatePosition()
throws FcsHardwareException
@Command(type=QUERY,
level=1,
description="Update field current in reading controller.")
public void updateCurrent()
throws org.lsst.ccs.messaging.BadCommandException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionFcsHardwareExceptionpublic void updateClampsStateWithSensorsFromSDO()
throws org.lsst.ccs.messaging.BadCommandException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionFcsHardwareExceptionpublic void updateClampsStateWithSensorsFromPDO()
throws org.lsst.ccs.messaging.BadCommandException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionFcsHardwareException@Command(type=QUERY,
level=1,
description="Read clamps sensors and update clamps state")
public void updateClampsStateWithSensors()
throws org.lsst.ccs.messaging.BadCommandException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Rotate carousel to an absolute angle.")
public String rotateToAbsoluteAngle(@Argument(name="angle",description="Angle to reach in degrees")
double angle)
angle - @Command(type=ACTION,
level=1,
description="Rotate carousel for an angle.")
public String rotateToRelativeAngle(@Argument(name="angle",description="Angle to reach in degrees")
double angle)
angle - @Command(type=ACTION,
level=1,
description="Rotate carousel for an angle")
public String rotate(@Argument(name="angle",description="Angle to reach in degrees")
double angle)
throws org.lsst.ccs.messaging.BadCommandException
angle - : rotation angle The rotation angle can be positive or
negative. It must be a double and have a value between -360.0 and 360.0IllegalArgumentException, - BadCommandExceptionorg.lsst.ccs.messaging.BadCommandExceptionpublic void tick()
tick in class org.lsst.ccs.framework.Modulepublic double getFilterPosition(Filter filter)
public double getStandbyPositionForFilter(Filter filter)
@Command(type=ACTION,
level=1,
description="Rotate carousel to put filter at standby position")
protected String moveFilterToStandby(Filter filter)
throws org.lsst.ccs.messaging.BadCommandException
filter - org.lsst.ccs.messaging.BadCommandExceptionpublic String grabFilterAtStandby(Object filterName) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic String grabFilterAtStandby(Filter filter) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
filter - org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic void ungrabFilterAtStandby(Filter filter) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(level=1,
description="Release clamps at standby position to get ready to clamp again",
type=ACTION)
public String releaseClamps()
throws org.lsst.ccs.messaging.BadCommandException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic String unlockClamps(Filter filter) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
filter - org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(level=3,
description="Unlock the clamps",
type=ACTION)
public String unlockClamps()
throws org.lsst.ccs.messaging.BadCommandException,
FcsHardwareException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException
org.lsst.ccs.messaging.BadCommandExceptionFcsHardwareExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionpublic boolean isOnStandby(Filter filter)
public static double addAngle(double angle1,
double angle2)
angle1 - angle2 - public void releaseClampsContact()
public void engageClampsContact()
Copyright © 2016 LSST. All rights reserved.