|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsst.ccs.subsystems.fcs.CarouselSocket
public class CarouselSocket
This is a socket on the carousel : there is 5 sockets on a carousel. When a filter is on the carousel, it is attached at a socket. A socket has a clamp on each side : - clampX- (clampXminus) - clampX+ (clampXplus) clampX+ and clampX- are the same except for the method isLocked() See FilterClampXminusModule and FilterClampXplusModule The main job of this class CarouselSocket is to synchronize the actions on the 2 clamps. The state of the CarouselSocket is the state of the clamps when both clamps state are identical. To synchonize an action (updateSateWithSensor, unlock or release) on both clamps, we use a CyclicBarrier : we start 2 threads and they wait for each other action completion with a CyclicBarrier. During an action on both clamps, we want to lock the CarouselSocket so no other thread can try to access this object before the completion of action. We do that with a Lock and Condition. (see java.util.concurrent)
| Constructor Summary | |
|---|---|
CarouselSocket()
|
|
CarouselSocket(double position)
This constructor is for tests. |
|
| Method Summary | |
|---|---|
FcsEnumerations.FilterClampState |
getClampsState()
|
FilterClampModule |
getClampXminus()
|
FilterClampModule |
getClampXplus()
|
Filter |
getFilter()
|
double |
getPosition()
|
double |
getStandbyPosition()
|
boolean |
isClampedOnFilter()
|
boolean |
isEmpty()
|
boolean |
isReadyToClamp()
|
boolean |
isUnclampedEmpty()
|
boolean |
isUnclampedOnFilter()
|
void |
putFilterOnSocket(Filter filter)
|
String |
releaseClamps()
Releases the 2 clamps of the socket. |
void |
removeFilter()
|
void |
setClampXminus(FilterClampModule clampXminus)
|
void |
setClampXplus(FilterClampModule clampXplus)
|
protected void |
setFilter(Filter filter)
|
void |
setPosition(double position)
|
void |
setStandbyPosition(double standbyPosition)
|
String |
toString()
|
String |
unlockClamps()
Unlock the 2 clamps |
void |
updateClampsStateWithSensors()
This method updates the state of the 2 clamps in reading the values sent by the sensors. |
void |
updateClampsStateWithSensors(CanOpenProxy.PDOStorage pdoStorage)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CarouselSocket()
public CarouselSocket(double position)
position - | Method Detail |
|---|
public FilterClampModule getClampXminus()
public void setClampXminus(FilterClampModule clampXminus)
public FilterClampModule getClampXplus()
public void setClampXplus(FilterClampModule clampXplus)
public double getPosition()
public void setPosition(double position)
public Filter getFilter()
protected void setFilter(Filter filter)
public double getStandbyPosition()
public void setStandbyPosition(double standbyPosition)
public FcsEnumerations.FilterClampState getClampsState()
public void updateClampsStateWithSensors()
throws HardwareError
HardwareError
public void updateClampsStateWithSensors(CanOpenProxy.PDOStorage pdoStorage)
throws HardwareError
HardwareError
public boolean isEmpty()
throws HardwareError
HardwareErrorpublic boolean isClampedOnFilter()
public boolean isUnclampedOnFilter()
public boolean isUnclampedEmpty()
public boolean isReadyToClamp()
public String releaseClamps()
throws org.lsst.ccs.bus.BadCommandException,
org.lsst.ccs.bus.ErrorInCommandExecutionException,
HardwareError
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException
HardwareError
public String unlockClamps()
throws org.lsst.ccs.bus.BadCommandException,
org.lsst.ccs.bus.ErrorInCommandExecutionException,
HardwareError
actuatorXminus - actuatorXplus -
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException
HardwareError
public void removeFilter()
throws org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.BadCommandExceptionpublic void putFilterOnSocket(Filter filter)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||