public class Carousel extends MobileItem implements org.lsst.ccs.framework.HardwareController, FilterHolder, AlertRaiser
| Modifier and Type | Field and Description |
|---|---|
protected int |
absoluteTargetPosition
an absolute target position to reach in a rotation is modified each time
a rotation command has been launched.
|
protected PieceOfHardware |
ai814 |
protected int |
deltaPosition
a difference between a target position and the actual position of the
carousel this is used to know if the rotation is completed or not.
|
protected int |
position
carousel position given by carouselControl.
|
protected Map<String,CarouselSocket> |
socketsMap
A map to store the sockets by their names.
|
protected BridgeToHardware |
tcpProxy |
agentStateService, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, s, scheduleralertSeparator| Constructor and Description |
|---|
Carousel() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
build()
*** lifecycle methods *************************************************
|
void |
changeFilterID(int filterID,
int socketID) |
void |
checkConditionsForRotation()
Check if carousel rotation is permitted.
|
void |
checkSensorTypeIncremental() |
StatusDataPublishedByCarousel |
createStatusDataPublishedByCarousel()
Create an object StatusDataPublishedByCarousel to be published on the STATUS
bus.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
end current action.
|
CarouselClamp |
getClampXminus()
This method returns the clampX- which is at standby filterPosition.
|
EPOSController |
getClampXminusController() |
CarouselClamp |
getClampXplus()
This method returns the clampX+ which is at standby filterPosition.
|
EPOSController |
getClampXplusController() |
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 |
getFilterID() |
CarouselSocket |
getFilterSocket(int filterID) |
int |
getFullTurn()
used by tests.
|
int |
getPosition()
return carousel position.
|
CarouselSocket |
getSocketAtStandby()
Return the socket HALTED at STANDBY filterPosition if there is one.
|
int |
getSocketAtStandbyID() |
CarouselSocket |
getSocketByName(String socketName)
Return a CarouselSocket which name is given as parameter.
|
Map<String,CarouselSocket> |
getSocketsMap() |
void |
homing()
homing of rotation controller to be done before each rotation
|
void |
initializeAndCheckClampsOffset() |
void |
initializeClampsState()
In carousel, sensors are updated from PDOs.
|
void |
initializeHardware()
initialize carousel hardware after initialization.
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoff()
This method returns true if the autochanger trucks are at HANDOFF position,
false otherwise.
|
boolean |
isAtOnline()
This method returns true if the autochanger trucks are at ONLINE
position, false otherwise.
|
boolean |
isAtStandby()
Used to publish on the STATUS bus for the GUI.
|
boolean |
isAtStandby(int filterID)
Return true if the filterID given as argument is at STANDBY position.
|
boolean |
isAutochangerHoldingFilter()
This methods returns true if the autochanger is holding a filter at STANDBY
position.
|
boolean |
isClampsStateInitialized() |
boolean |
isFilterOnCarousel(int filterID)
return true if filterID in on carousel.
|
boolean |
isHoldingFilter()
Return true if carousel is holding a filter at STANDBY position.
|
boolean |
isHoldingFilterAtStandby() |
boolean |
isHomingDone() |
boolean |
isNotHoldingFilter()
Return true if FilterHolder is NOT holding filter, false otherwise.
|
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
|
boolean |
myDevicesReady()
Return True if all CAN open devices useful for this MobileItemMobile are
ready for an action.
|
void |
postStart()
Executed when all components HasLifeCycle of subsystem have been checked.
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
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 |
rotateToAbsolutePosition(int newPos)
Rotate to position newPos.
|
void |
startAction(FcsEnumerations.MobileItemAction action)
Starts action ROTATE_CAROUSEL_TO_ABSOLUTE_POSITION or
ROTATE_CAROUSEL_TO_RELATIVE_POSITION.
|
void |
unlockClamps()
Unlocks the clamps at STANDBY.
|
void |
updateClampsStateWithSensorsFromPDO()
Read the clamps state from PDO : all the clamp sensors are read at one time.
|
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 |
updateSocketAtStandbyState() |
void |
updateSocketAtStandbyWithSensors()
****************************************************************
|
void |
updateSocketNotAtStandby() |
void |
updateState() |
void |
updateStateWithSensors()
Read the clamps state from PDO : all the clamp sensors are read at one time.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted()
reads sensors or any device and updates state from sensors
Tt can be also reading a position or a current on a motor controller.
|
cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckHardware, checkStoppedclearAlarm, getAlertSeparator, getAlertService, getName, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningprotected int position
protected int absoluteTargetPosition
@ConfigurationParameter protected int deltaPosition
@LookupField(strategy=TREE,
pathFilter=".*ai814")
protected PieceOfHardware ai814
@LookupField(strategy=CHILDREN) protected final Map<String,CarouselSocket> socketsMap
@LookupField(strategy=SIBLINGS,
pathFilter="tcpProxy")
protected BridgeToHardware tcpProxy
public void build()
build in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
level=0,
description="Return true if clamp state is initialized for all clamps.")
public boolean isClampsStateInitialized()
@Command(type=QUERY,
level=0,
description="Return true if carouselController homing is done.")
public boolean isHomingDone()
public int getFullTurn()
public Map<String,CarouselSocket> getSocketsMap()
public CarouselSocket getSocketByName(String socketName)
socketName - @Command(type=QUERY,
level=0,
description="Return carousel position.",
alias="printPosition")
public int getPosition()
public EPOSController getClampXminusController()
public EPOSController getClampXplusController()
public CarouselClamp getClampXminus()
public CarouselClamp 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()
@Command(type=QUERY,
level=0,
description="return ID of socket at STANDBY")
public int getSocketAtStandbyID()
@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()
public boolean isFilterOnCarousel(int filterID)
filterID - @Command(type=ACTION,
level=1,
description="To change filterID on socket which ID is given as argument.")
public void changeFilterID(int filterID,
int socketID)
@Command(type=QUERY,
level=0,
description="Return true if Autochanger is holding filter at STANDBY.")
public boolean isAutochangerHoldingFilter()
FcsHardwareException@Command(type=QUERY,
level=1,
description="Initialize carousel hardware after initialization. To be executed if during boot process some hardware is missing.")
public void initializeHardware()
public void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycle@Command(type=ACTION,
level=1,
description="CarouselHoming")
public void homing()
public void checkSensorTypeIncremental()
public void publishData()
publishData in class MobileItempublic 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=ACTION,
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 updateClampsStateWithSensorsFromPDO()
FcsHardwareException@Command(type=QUERY,
level=1,
description="Update clamps state in sending 5 sync.")
public void initializeClampsState()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY,
level=1,
description="Update clamp offsets.")
public void initializeAndCheckClampsOffset()
public CarouselSocket getFilterSocket(int filterID)
filterID - @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(int filterID)
filterID - public void releaseClampsContact()
public boolean myDevicesReady()
MobileItemmyDevicesReady in class MobileItem@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 a new absolute position.",
timeout=60000)
public void rotateToAbsolutePosition(int newPos)
newPos - @Command(type=ACTION,
level=1,
description="Move a socket which name is given as argument to STANDBY position.",
alias="moveSocketToStandby",
timeout=50000)
public void rotateSocketToStandby(String socketName)
socketName - FcsHardwareExceptionpublic void rotateEmptySocketAtStandby()
FcsHardwareExceptionpublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemaction - public void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemabortAction in class MobileItempublic void endAction(FcsEnumerations.MobileItemAction action)
MobileItemendAction in class MobileItempublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItempublic boolean isHoldingFilter()
isHoldingFilter in interface FilterHolderFcsHardwareExceptionpublic boolean isNotHoldingFilter()
FilterHolderisNotHoldingFilter in interface FilterHolderpublic boolean isAtHandoff()
FilterHolderisAtHandoff in interface FilterHolder@Command(type=QUERY,
level=1,
description="Return the ID of filter at STANDBY")
public int getFilterID()
getFilterID in interface FilterHolder@Command(type=QUERY,
level=1,
description="Read sensors and update state",
timeout=2000)
public void updateStateWithSensors()
updateStateWithSensors in interface FilterHolderFcsHardwareExceptionpublic boolean isAtOnline()
FilterHolderisAtOnline in interface FilterHolder@Command(type=QUERY,
level=1,
description="Update socket at standby state from hyttc580 data.",
timeout=2000)
public void updateSocketAtStandbyWithSensors()
public void updateSocketAtStandbyState()
@Command(type=QUERY,
level=1,
description="Update state from hyttc580 data.",
timeout=2000)
public void updateState()
public void updateSocketNotAtStandby()
Copyright © 2019 LSST. All rights reserved.