edu.berkeley.io.context.home
Class TemperatureSimulatorGenerator
java.lang.Object
java.util.TimerTask
edu.berkeley.io.context.home.TemperatureSimulatorGenerator
- All Implemented Interfaces:
- java.lang.Runnable, context.widgets.WTemperature.Generator
- public class TemperatureSimulatorGenerator
- extends java.util.TimerTask
- implements context.widgets.WTemperature.Generator
- Author:
- alann
Method Summary |
protected double |
getBase(int time)
|
static void |
main(java.lang.String[] args)
|
void |
run()
|
protected void |
setCurrentTemperature()
this is rough approximation of how a real temperature system would behave. |
void |
setStatus(java.lang.String status)
|
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_INIT_LO_TEMPERATURE
public static final int DEFAULT_INIT_LO_TEMPERATURE
- See Also:
- Constant Field Values
DEFAULT_INIT_HI_TEMPERATURE
public static final int DEFAULT_INIT_HI_TEMPERATURE
- See Also:
- Constant Field Values
DEFAULT_UPDATE_PERIOD
public static final int DEFAULT_UPDATE_PERIOD
- See Also:
- Constant Field Values
FAHRENHEIT
public static final java.lang.String FAHRENHEIT
- See Also:
- Constant Field Values
updatePeriod
protected int updatePeriod
timestep
protected int timestep
tempWidget
protected context.widgets.WTemperature tempWidget
tempData
protected TemperatureData tempData
currentStatus
protected java.lang.String currentStatus
hiBaseTemp
protected double hiBaseTemp
loBaseTemp
protected double loBaseTemp
currentTemp
protected double currentTemp
timeRate
protected double timeRate
eqRate
protected double eqRate
effRate
protected double effRate
hysteresisRange
protected double hysteresisRange
TemperatureSimulatorGenerator
public TemperatureSimulatorGenerator(context.widgets.WTemperature tempWidget)
TemperatureSimulatorGenerator
public TemperatureSimulatorGenerator(int loTemp,
int hiTemp,
int updatePeriod,
context.widgets.WTemperature tempWidget)
- Parameters:
updatePeriod
- ltempWidget
-
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
- See Also:
TimerTask.run()
setCurrentTemperature
protected void setCurrentTemperature()
- this is rough approximation of how a real temperature system would behave.
- Returns:
- int
getBase
protected double getBase(int time)
setStatus
public void setStatus(java.lang.String status)
- Specified by:
setStatus
in interface context.widgets.WTemperature.Generator
main
public static void main(java.lang.String[] args)
- Parameters:
args
- expects 2 arguments, the location name and the port