org.lsst.ccs.subsystems.fcs.singlefiltertest
Class SftMainModule

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.singlefiltertest.SftMainModule
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable

public class SftMainModule
extends org.lsst.ccs.framework.Module

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
 
Nested classes/interfaces inherited from interface org.lsst.ccs.framework.Configurable
org.lsst.ccs.framework.Configurable.Environment
 
Field Summary
 
Fields inherited from class org.lsst.ccs.framework.Module
environment, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
SftMainModule()
           
 
Method Summary
 void checkPreConditionsForUnlockClamps()
           
 String displayData()
           
 String executeSequence1()
          This method is the main sequence of commands that we want to test on the Single Filter Test.
 String executeSequence1(int nb)
          This method will execute nb times the Sequence1 : the parameter nb is given by the user at the console.
 SftAutoChangerModule getAutoChangerModule()
           
 BridgeToHardware getBridge()
           
 SftCarouselModule getCarouselModule()
           
 Filter getDummyFilter()
          //FOR SPRING
 Filter getFilterAtStandby()
           
 SingleFilterTestConfig getFullState()
           
 String goToInitialStateForSequence1()
          Initial state for sequence1 : autochanger is in highposition and trucks are empty carousel holds a filter and its clamps are in CLAMPEDONFILTER state.
 void initModule()
           
 boolean isHardwareReady()
          This methods updates the boolean hardwareReady from the hardware bridge.
 void locateFilter()
           
 String printFilters()
           
 void processUpdate(Observable source, org.lsst.ccs.framework.Module.ValueUpdate v)
           
 void setBridge(BridgeToHardware bridge)
           
 void setDummyFilter(Filter dummyFilter)
          //FOR SPRING
 void tick()
           
 String toString()
           
 void updateStateWithSensors()
          This command updates the state of the carousel and of the autochanger in reading the sensors.
 
Methods inherited from class org.lsst.ccs.framework.Module
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, 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, wait, wait, wait
 

Constructor Detail

SftMainModule

public SftMainModule()
Method Detail

getDummyFilter

public Filter getDummyFilter()
//FOR SPRING

Returns:
the dummyFilter

setDummyFilter

public void setDummyFilter(Filter dummyFilter)
//FOR SPRING

Parameters:
dummyFilter - the dummyFilter to set

getBridge

public BridgeToHardware getBridge()

setBridge

public void setBridge(BridgeToHardware bridge)

initModule

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

isHardwareReady

public boolean isHardwareReady()
This methods updates the boolean hardwareReady from the hardware bridge. But when the hardware is ready, it doesn't not ask hardware bridge again to avoid too much messages on the log bus, could be replace by : return this.bridge.isHardwareReady();

Returns:
true if hardware is booted, identified and initialized

tick

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

locateFilter

public void locateFilter()
                  throws HardwareError,
                         org.lsst.ccs.bus.ErrorInCommandExecutionException,
                         org.lsst.ccs.bus.BadCommandException
Throws:
HardwareError
org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandException

checkPreConditionsForUnlockClamps

public void checkPreConditionsForUnlockClamps()
                                       throws HardwareError,
                                              org.lsst.ccs.bus.BadCommandException,
                                              org.lsst.ccs.bus.ErrorInCommandExecutionException
Throws:
HardwareError
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

printFilters

public String printFilters()

updateStateWithSensors

public void updateStateWithSensors()
                            throws HardwareError,
                                   org.lsst.ccs.bus.ErrorInCommandExecutionException,
                                   org.lsst.ccs.bus.BadCommandException
This command updates the state of the carousel and of the autochanger in reading the sensors. It has to be used in Engineering mode at the console when we send commands step by step.

Throws:
HardwareError
org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandException

toString

public String toString()
Overrides:
toString in class Object

displayData

public String displayData()

goToInitialStateForSequence1

public String goToInitialStateForSequence1()
Initial state for sequence1 : autochanger is in highposition and trucks are empty carousel holds a filter and its clamps are in CLAMPEDONFILTER state.

Returns:

executeSequence1

public String executeSequence1()
                        throws org.lsst.ccs.bus.BadCommandException,
                               org.lsst.ccs.bus.ErrorInCommandExecutionException,
                               HardwareError,
                               CanOpenError
This method is the main sequence of commands that we want to test on the Single Filter Test. It executes this sequence of command a single time. Is consists in from the initial position (autochanger trucks empty in the higher position) :

Returns:
a message for the operator
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException
HardwareError
CanOpenError

executeSequence1

public String executeSequence1(int nb)
                        throws org.lsst.ccs.bus.BadCommandException,
                               org.lsst.ccs.bus.ErrorInCommandExecutionException,
                               HardwareError,
                               CanOpenError
This method will execute nb times the Sequence1 : the parameter nb is given by the user at the console.

Parameters:
nb - : number of times we want to execute the Sequence1
Returns:
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException
HardwareError
CanOpenError

getFilterAtStandby

public Filter getFilterAtStandby()

processUpdate

public void processUpdate(Observable source,
                          org.lsst.ccs.framework.Module.ValueUpdate v)
Overrides:
processUpdate in class org.lsst.ccs.framework.Module

getCarouselModule

public SftCarouselModule getCarouselModule()

getAutoChangerModule

public SftAutoChangerModule getAutoChangerModule()

getFullState

public SingleFilterTestConfig getFullState()


Copyright © 2013 LSST. All Rights Reserved.