Trull

edu.luc.cs.trull.demo.office
Class Thermostat

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.AbstractComponent
              extended by edu.luc.cs.trull.EmitComponent
                  extended by edu.luc.cs.trull.demo.office.Thermostat
All Implemented Interfaces:
Component, EventLabels, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

public class Thermostat
extends EmitComponent
implements EventLabels

A simple thermostat. Whenever the ambient temperature is below the desired temperature, the heat is turned on. When the ambient temperature is at least the desired temperature, the heat is turned off.


Field Summary
private  Temp actualTemp
           
private  Temp targetTemp
           
 
Fields inherited from interface edu.luc.cs.trull.demo.office.EventLabels
AWAKE, DOORCLOSE, DOOROPEN, ECONOMYMODE, HEATOFF, HEATON, LIGHTOFF, LIGHTON, OCCUPANTMODE, REQUESTTEMP, SETTEMP, SLEEP, SWITCHOFF, SWITCHON, TEMP
 
Constructor Summary
Thermostat()
           
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 
Methods inherited from class edu.luc.cs.trull.EmitComponent
eventEmitter, eventEmitterCached, eventEmitterUncached, resume, scheduleEvent, scheduleEvent, scheduleEvent, start, stop, suspend
 
Methods inherited from class edu.luc.cs.trull.AbstractComponent
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
getTerminationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actualTemp

private Temp actualTemp

targetTemp

private Temp targetTemp
Constructor Detail

Thermostat

public Thermostat()
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class EmptyComponent

Trull

http://www.cs.luc.edu/trull/