public class CarouselSocket extends MobileItem
| Modifier and Type | Field and Description |
|---|---|
protected FilterHolder |
autochanger |
protected Carousel |
carousel |
int |
filterID |
protected SensorPluggedOnTTC580 |
ioModuleSensor |
protected FcsEnumerations.IOModuleStatus |
ioModuleStatus |
agentStateService, beginTime, commandDuration, currentAction, dataProviderDictionaryService, FCSLOG, hasToWaitForEndOfAction, lock, moving, name, path, readSensorsHandle, scheduler, subs, timeoutExceededalertSeparator| Constructor and Description |
|---|
CarouselSocket(int id,
CarouselClamp clampXminus,
CarouselClamp clampXplus)
Build a new CarouselSocket with a tickMillis of 5000.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
build() |
void |
checkAndUpdateOffset1(long sdo)
check and update lock sensor offset1 for the 2 clamps
|
void |
checkAndUpdateOffset2(long sdo)
check and update presence sensor offset2 for the 2 clamps
|
StatusDataPublishedByCarouselSocket |
createStatusDataPublishedByCarouselSocket()
Create an object to be published on the STATUS bus by a CarouselSocket.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
end current action.
|
FcsEnumerations.FilterClampState |
getClampsState()
Returns the state of the clamps.
|
CarouselClamp |
getClampXminus() |
CarouselClamp |
getClampXplus() |
int |
getDeltaPosition() |
int |
getFilterID() |
String |
getFilterName() |
int |
getId() |
FcsEnumerations.IOModuleStatus |
getIOModuleStatus() |
String |
getName() |
int |
getStandbyPosition() |
void |
init()
*** lifecycle methods *************************************************
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtStandby()
Return true if this socket is at STANDBY position.
|
boolean |
isClampedOnFilter() |
boolean |
isEmpty() |
boolean |
isReadyToClamp() |
boolean |
isUnclampedEmpty() |
boolean |
isUnclampedOnFilter() |
boolean |
myDevicesReady()
Return True if all CAN open devices useful for this MobileItemMobile are
ready for an action.
|
void |
publishData() |
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
releaseClamps()
Releases the 2 clamps of the socket.
|
void |
setClampXminus(CarouselClamp clampXminus) |
void |
setClampXplus(CarouselClamp clampXplus) |
void |
setFilterID(int filterID) |
void |
shutdown()
This shutdowns the scheduler.
|
void |
startAction(FcsEnumerations.MobileItemAction action)
Start action of unlocking or releasing clamps.
|
String |
toString() |
void |
unlockClamps()
This method unclamps the 2 clamps at standby position.
|
void |
updateDeltaPosition() |
void |
updateFilterID()
update field filterID to be used only with whole FCS.
|
void |
updateState()
update state from sensors 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.
|
cancelReadingSensors, checkReadyForAction, executeAction, getActionDurationPath, getAlertService, getHaltRequired, getPath, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, registerAction, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearAlarm, getAlertSeparator, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNew@LookupField(strategy=TREE) protected Carousel carousel
@LookupField(strategy=CHILDREN) protected SensorPluggedOnTTC580 ioModuleSensor
protected FcsEnumerations.IOModuleStatus ioModuleStatus
@LookupField(strategy=TREE,
pathFilter="autochanger")
protected FilterHolder autochanger
@Persist public volatile int filterID
public CarouselSocket(int id,
CarouselClamp clampXminus,
CarouselClamp clampXplus)
id - clampXminus - clampXplus - public void build()
public int getId()
public String getName()
getName in interface NamedComponentgetName in class MobileItempublic CarouselClamp getClampXminus()
public void setClampXminus(CarouselClamp clampXminus)
public CarouselClamp getClampXplus()
public void setClampXplus(CarouselClamp clampXplus)
@Command(type=QUERY,
level=1,
description="Returns filterID if a filter is in the socket.")
public int getFilterID()
public String getFilterName()
public void setFilterID(int filterID)
public int getStandbyPosition()
public int getDeltaPosition()
public FcsEnumerations.IOModuleStatus getIOModuleStatus()
@Command(type=QUERY,
level=1,
description="Returns true if this socket is at STANDBY position on the carousel.")
public boolean isAtStandby()
public void init()
@Command(type=QUERY,
level=1,
description="Returns true if hardware is connected and ready.")
public boolean myDevicesReady()
MobileItemmyDevicesReady in class MobileItem@Command(type=QUERY,
level=0,
description="Return clamps state - doesn\'t read again sensors.")
public FcsEnumerations.FilterClampState getClampsState()
public void updateState()
public void updateDeltaPosition()
public void updateFilterID()
public void checkAndUpdateOffset1(long sdo)
sdo - public void checkAndUpdateOffset2(long sdo)
sdo - @Command(type=QUERY,
level=0,
description="Returns true if there is no filter in the socket.")
public boolean isEmpty()
@Command(type=QUERY,
level=0,
description="Returns true if there is a filter in the socket and the clampsare LOCKED.")
public boolean isClampedOnFilter()
@Command(type=QUERY,
level=0,
description="Returns true if there is a filter in the socket and the clampsare UNLOCKED.")
public boolean isUnclampedOnFilter()
@Command(type=QUERY,
level=0,
description="Returns true if there is NO filter in the socket and the clampsare UNLOCKED.")
public boolean isUnclampedEmpty()
@Command(type=QUERY,
level=0,
description="Returns true if this socket is ready to clamp a filter.")
public boolean isReadyToClamp()
@Command(type=ACTION,
level=1,
description="Release the 2 clamps of this socket if the socket is at STANDBY position.")
public void releaseClamps()
FcsHardwareException@Command(type=ACTION,
level=1,
description="Unlock the 2 clamps of this socket if the socket is at STANDBY position.")
public void unlockClamps()
FcsHardwareException@Command(type=QUERY,
level=1,
description="Returns a String representation of a CarouselSocket.")
public String toString()
public boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemaction - FcsHardwareExceptionpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemabortAction in class MobileItempublic void endAction(FcsEnumerations.MobileItemAction action)
MobileItemendAction in class MobileItempublic void publishData()
publishData in class MobileItempublic StatusDataPublishedByCarouselSocket createStatusDataPublishedByCarouselSocket()
public void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItempublic void shutdown()
MobileItemshutdown in interface org.lsst.ccs.framework.HasLifecycleshutdown in class MobileItemCopyright © 2022 LSST. All rights reserved.