org.lsst.ccs.subsystems.powermanage
Class PMTest

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.powermanage.PMTest
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable
Direct Known Subclasses:
PMTestHdw, PMTestSim

public abstract class PMTest
extends org.lsst.ccs.framework.Module

Implements the pmmanage test modular subsystem

This is an abstract class implementing the interactions with the CCS buses, but deferring the hardware interaction, real or simulated, to sub-classes.

Author:
Xiaowen Lei
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
PMTest()
           
 
Method Summary
 PMFullState getFullState()
          Gets the full state of the pmmanage module
 int getState()
          Gets the operating state word
 void initModule()
          Initializes the pmmanage subsystem
 void publishLimits()
          Publishes all the limit values of the pmmanage module
 void publishState()
          Publishes the state of the pmmanage module
 void saveConfiguration()
          Saves the configuration data
 void setConfigFile(String name)
          Sets the dynamic configuration file name
 void setOFaultLimit(int id, double limit)
          Sets the over fault limit for a channel
 void setOWarnLimit(int id, double limit)
          Sets the over warn limit for a channel
 void setStructFile(String name)
          Sets the structural configuration file name
 void setTickMillis(int value)
          Sets the tick period
 void setUFaultLimit(int id, double limit)
          Sets the under fault limit for a channel
 void setUWarnLimit(int id, double limit)
          Sets the under warn limit for a channel
 void tick()
          Performs periodic readout of the values of the parameters
 
Methods inherited from class org.lsst.ccs.framework.Module
alias, change, checkHardware, dropConfigurationContext, getAvailableCommands, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, processUpdate, publishData, publishData, publishData, publishData, publishData, publishData, publishData, register, register, removeLogPanicState, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setHandlerLevel, setLogLevel, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, 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, toString, wait, wait, wait
 

Constructor Detail

PMTest

public PMTest()
Method Detail

initModule

public void initModule()
Initializes the pmmanage subsystem

Overrides:
initModule in class org.lsst.ccs.framework.Module

tick

public void tick()
Performs periodic readout of the values of the parameters

Overrides:
tick in class org.lsst.ccs.framework.Module

setStructFile

public void setStructFile(String name)
Sets the structural configuration file name

Parameters:
name - The name of the structural configuration file

setConfigFile

public void setConfigFile(String name)
Sets the dynamic configuration file name

Parameters:
name - The name of the dynamic configuration file

setTickMillis

public void setTickMillis(int value)
Sets the tick period

Overrides the method in Module in order to publish a status update.

Overrides:
setTickMillis in class org.lsst.ccs.framework.Module
Parameters:
value - The tick period (milliseconds) to set.

setUFaultLimit

public void setUFaultLimit(int id,
                           double limit)
Sets the under fault limit for a channel

Parameters:
id - The channel ID
limit - The under fault limit value.

setOFaultLimit

public void setOFaultLimit(int id,
                           double limit)
Sets the over fault limit for a channel

Parameters:
id - The channel ID
limit - The over fault limit value.

setUWarnLimit

public void setUWarnLimit(int id,
                          double limit)
Sets the under warn limit for a channel

Parameters:
id - The channel ID
limit - The under warn limit value.

setOWarnLimit

public void setOWarnLimit(int id,
                          double limit)
Sets the over warn limit for a channel

Parameters:
id - The channel ID
limit - The over warn limit value.

saveConfiguration

public void saveConfiguration()
Saves the configuration data


getState

public int getState()
Gets the operating state word

Returns:
The current value of the operating state

getFullState

public PMFullState getFullState()
Gets the full state of the pmmanage module

This is intended to be called by GUIs during initialization


publishState

public void publishState()
Publishes the state of the pmmanage module

This is intended to be called whenever any element of the state is changed.


publishLimits

public void publishLimits()
Publishes all the limit values of the pmmanage module

This is intended to be called at startup time.



Copyright © 2013 LSST. All Rights Reserved.