org.lsst.ccs.subsystems.fcs
Class FilterClampModule

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.FilterClampModule
All Implemented Interfaces:
java.io.Serializable, java.util.Observer, FilterClamp
Direct Known Subclasses:
FilterClampXminusModule, FilterClampXplusModule, SimuFilterClampModule

public abstract class FilterClampModule
extends org.lsst.ccs.framework.Module
implements FilterClamp

An abstract class which extends Module to model a clamp that holds a filter on the carousel. It implements pattern state. See the state machine diagram for a carousel clamp.

Author:
virieux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.lsst.ccs.framework.Module
org.lsst.ccs.framework.Module.ValueUpdate
 
Field Summary
protected  NumericSensor filterPresenceSensor
          The filterPresenceSensor detects if the filter is in the clamp or not.
 StatusDataPublishedByClamp publishedByClamp
           
 java.lang.String publishedByClampOutputName
           
protected  FilterClampState state
           
 
Fields inherited from class org.lsst.ccs.framework.Module
log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
FilterClampModule()
           
 
Method Summary
 NumericSensor getFilterPresenceSensor()
           
 FilterClampState getState()
           
 StatusDataPublishedByClamp getStatusData()
           
 void initModule()
           
 void initPublishedData()
           
abstract  boolean isLocked()
           
 java.lang.String lock()
           
 java.lang.String release()
           
 void setFilterPresenceSensor(NumericSensor filterPresence)
           
 void setState(FilterClampState state)
           
 void tick()
           
 java.lang.String unlock()
           
 void updateStateWithSensors()
           
 
Methods inherited from class org.lsst.ccs.framework.Module
getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, processUpdate, publishData, publishData, publishData, publishData, sendToReply, sendToStatus, setBeanName, setContext, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, start, update
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.lsst.ccs.subsystems.fcs.common.FilterClamp
getName, getTickMillis
 

Field Detail

state

protected FilterClampState state

filterPresenceSensor

protected NumericSensor filterPresenceSensor
The filterPresenceSensor detects if the filter is in the clamp or not.


publishedByClampOutputName

public java.lang.String publishedByClampOutputName

publishedByClamp

public StatusDataPublishedByClamp publishedByClamp
Constructor Detail

FilterClampModule

public FilterClampModule()
Method Detail

getState

public FilterClampState getState()
Specified by:
getState in interface FilterClamp

setState

public void setState(FilterClampState state)
Specified by:
setState in interface FilterClamp
Parameters:
state - the state to set

release

public java.lang.String release()
                         throws org.lsst.ccs.bus.BadCommandException,
                                org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
release in interface FilterClamp
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

unlock

public java.lang.String unlock()
                        throws org.lsst.ccs.bus.BadCommandException,
                               org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
unlock in interface FilterClamp
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

lock

public java.lang.String lock()
                      throws org.lsst.ccs.bus.BadCommandException,
                             org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
lock in interface FilterClamp
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

isLocked

public abstract boolean isLocked()
Specified by:
isLocked in interface FilterClamp

updateStateWithSensors

public void updateStateWithSensors()
Specified by:
updateStateWithSensors in interface FilterClamp

getFilterPresenceSensor

public NumericSensor getFilterPresenceSensor()
Specified by:
getFilterPresenceSensor in interface FilterClamp
Returns:
the filterPresence

setFilterPresenceSensor

public void setFilterPresenceSensor(NumericSensor filterPresence)
Specified by:
setFilterPresenceSensor in interface FilterClamp
Parameters:
filterPresence - the filterPresence to set

tick

public void tick()
Overrides:
tick in class org.lsst.ccs.framework.Module

initModule

public void initModule()
Overrides:
initModule in class org.lsst.ccs.framework.Module

initPublishedData

public void initPublishedData()

getStatusData

public StatusDataPublishedByClamp getStatusData()
Specified by:
getStatusData in interface FilterClamp


Copyright © 2011 LSST. All Rights Reserved.