public class CarouselClamp extends MobileItem implements org.lsst.ccs.framework.ClearAlertHandler
| Modifier and Type | Field and Description |
|---|---|
protected EPOSController |
controller
The motor controller which controls this clamp.
|
protected int |
currentToMaintainUnlocked |
protected int |
currentToUnlock |
protected Integer |
filterPresenceOffset1
if filter presence sensor returns a value between 0 and
filterPresenceOffset1 : sensor is in error.
|
protected Integer |
filterPresenceOffset2
if filter presence sensor returns a value between filterPresenceOffset1
and filterPresenceOffset2 : the filter is engaged and lockable.
|
protected Integer |
filterPresenceValueB
if filter presence sensor returns a value between filterPresenceOffset2
and filterPresenceValueB filter is not lockable.
|
protected Integer |
lockSensorMaxValue
If sensor returns a value above lockSensorMaxValue, the sensor is in error.
|
protected Integer |
lockSensorValueA
If the lock sensor returns a value between 0 and lockSensorValueA: the sensor
is unlocked.
|
protected Integer |
lockSensorValueB
If sensor returns a value between lockSensorValueB and lockSensorMaxValue,
the clamp is locked.
|
protected long |
timeoutForReleasing |
protected long |
timeoutForUnlocking |
agentStateService, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, s, scheduleralertSeparator| Constructor and Description |
|---|
CarouselClamp(SensorPluggedOnTTC580 filterPresenceSensor,
SensorPluggedOnTTC580 lockSensor)
Build a new CarouselClampModule with a tickMillis value:5000;
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode |
canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState)
to be able to clear alerts
|
void |
checkAndUpdateOffset2(int newOffset2)
compare offset2 value given as argument with persisted value.
|
void |
checkIsAtStandby() |
StatusDataPublishedByCarouselClamp |
createStatusDataPublishedByClamp()
Create an object to be published on the STATUS bus.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
end current action.
|
FcsEnumerations.FilterClampState |
getClampState()
Returns the clampState of the clamp.
|
short |
getCurrentToUnlock()
Returns the amount of current needed to unlock this clamp.
|
int |
getFilterPresenceOffset1() |
int |
getFilterPresenceOffset2() |
SensorPluggedOnTTC580 |
getFilterPresenceSensor()
For simulation.
|
FcsEnumerations.FilterPresenceStatus |
getFilterPresenceStatus() |
int |
getFilterPresenceValueB() |
SensorPluggedOnTTC580 |
getLockSensor()
For simulation.
|
int |
getLockSensorMaxValue() |
int |
getLockSensorValueA() |
int |
getLockSensorValueB() |
FcsEnumerations.LockStatus |
getLockStatus() |
void |
init()
*** lifecycle methods *************************************************
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtStandby() |
boolean |
isFilterEngaged() |
boolean |
isLocked()
This methods returns true if the clamp is locked.
|
boolean |
isReleased()
Check if controller has been disabled.
|
boolean |
isXminus() |
boolean |
myDevicesReady()
*
|
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
release()
The clamps on the carousel are locked automaticaly when the filter comes at
the standby position.
|
void |
setAtStandby(boolean atStandby) |
protected void |
setController(EPOSController actuator)
In the initialization phase, this method is used to initialize the
controller.
|
void |
setFilterPresenceOffset1(Integer value) |
void |
setFilterPresenceOffset2(Integer value) |
void |
setFilterPresenceValueB(Integer filterPresenceValue) |
void |
setLockSensorMaxValue(Integer maxValue) |
void |
setLockSensorValueA(Integer lockSensorValueA)
for tests
|
void |
setLockSensorValueB(Integer lockSensorValueB)
for tests
|
void |
startAction(FcsEnumerations.MobileItemAction action)
starts the action given as argument.
|
void |
unlock()
Unlock the clamp when a filter is locked by the clamp.
|
void |
updateFilterPresenceStatus()
update filterPresenceStatus from value returned by filterPresenceSensor
|
void |
updateLockStatus()
Update lockStatus from value returned by lockSensor.
|
void |
updateState()
Update clampState from values sent by sensors.
|
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.
|
double |
updateTemperature()
This methods read the thermometer, update the field temperature and returns
the value sent by the thermometer;
|
cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearAlarm, getAlertSeparator, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningprotected EPOSController controller
@ConfigurationParameter protected int currentToUnlock
@ConfigurationParameter protected int currentToMaintainUnlocked
@ConfigurationParameter protected Integer lockSensorValueA
@ConfigurationParameter(range="0..32768") protected Integer lockSensorValueB
@ConfigurationParameter(range="0..32768") protected Integer lockSensorMaxValue
protected Integer filterPresenceOffset1
@Persist protected Integer filterPresenceOffset2
@ConfigurationParameter(range="0..12000") protected Integer filterPresenceValueB
@ConfigurationParameter(range="0..10000") protected long timeoutForUnlocking
@ConfigurationParameter(range="0..10000") protected long timeoutForReleasing
public CarouselClamp(SensorPluggedOnTTC580 filterPresenceSensor, SensorPluggedOnTTC580 lockSensor)
filterPresenceSensor - lockSensor - public boolean isAtStandby()
public void setAtStandby(boolean atStandby)
public short getCurrentToUnlock()
protected void setController(EPOSController actuator)
actuator - public int getLockSensorValueA()
public int getLockSensorValueB()
public int getLockSensorMaxValue()
public int getFilterPresenceOffset1()
public int getFilterPresenceOffset2()
public int getFilterPresenceValueB()
public SensorPluggedOnTTC580 getFilterPresenceSensor()
public SensorPluggedOnTTC580 getLockSensor()
@Command(type=QUERY,
level=1,
description="return the lockStatus")
public FcsEnumerations.LockStatus getLockStatus()
@Command(type=QUERY,
level=1,
description="return filterPresenceStatus")
public FcsEnumerations.FilterPresenceStatus getFilterPresenceStatus()
public void setLockSensorValueA(Integer lockSensorValueA)
lockSensorValueA - public void setLockSensorValueB(Integer lockSensorValueB)
lockSensorValueB - public void setLockSensorMaxValue(Integer maxValue)
public void setFilterPresenceOffset1(Integer value)
public void setFilterPresenceOffset2(Integer value)
public void setFilterPresenceValueB(Integer filterPresenceValue)
public void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState)
canClearAlert in interface org.lsst.ccs.framework.ClearAlertHandleralert - alertState - @Command(type=QUERY,
level=1,
description="Returns true if CANopen hardware is connected and ready.")
public boolean myDevicesReady()
myDevicesReady in class MobileItempublic FcsEnumerations.FilterClampState getClampState()
@Command(type=QUERY,
level=1,
description="Returns true if the clamp is locked")
public boolean isLocked()
@Command(type=QUERY,
level=1,
description="Returns true if filter is engaged on the clamp : filter presence sensors sees it ")
public boolean isFilterEngaged()
public void checkAndUpdateOffset2(int newOffset2)
newOffset2 - public boolean isXminus()
public void updateFilterPresenceStatus()
public void updateLockStatus()
FcsHardwareExceptionpublic void updateState()
FcsHardwareExceptionpublic void publishData()
publishData in class MobileItempublic StatusDataPublishedByCarouselClamp createStatusDataPublishedByClamp()
@Command(level=3,
type=ACTION,
description="Release clamp in order to get ready to clamp a filter again")
public void release()
@Command(level=3,
type=ACTION,
description="Check if controller has been disabled.")
public boolean isReleased()
@Command(type=ACTION,
level=3,
description="Unlock the clamp")
public void unlock()
public void checkIsAtStandby()
public void startAction(FcsEnumerations.MobileItemAction action)
MobileItemstartAction in class MobileItempublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic double updateTemperature()
FcsHardwareExceptionpublic 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 MobileItemCopyright © 2019 LSST. All rights reserved.