dk.deepthought.sidious.greenhouse
Class WindowSetPoint

java.lang.Object
  extended by dk.deepthought.sidious.greenhouse.WindowSetPoint
All Implemented Interfaces:
Adjustable

@Immutable
public class WindowSetPoint
extends java.lang.Object
implements Adjustable

This class represents the setpoint for the greenhouse windows.

Author:
Deepthought

Nested Class Summary
private static class WindowSetPoint.WindowStep
          Internal enum to describe possible adjustments.
 
Field Summary
private  SuperLinkID humidityID
          The id of the humidity sensor.
private static org.apache.commons.logging.Log logger
          Logger for this class
private  SuperLinkID outsideHumidityID
          The id of the outside humidity sensor.
private  SuperLinkID outsideTemperatureID
          The id of the outside temperature sensor.
private  double setting
          The setting of this setpoint.
private  SuperLinkID temperatureID
          The id of the temperature sensor.
private static int windowAreaPercentage
          Approximate window surface percentage.
 
Constructor Summary
WindowSetPoint(double setting)
          Creates a new ScreenSetPoint with the specified setting.
 
Method Summary
 State consequence(State state)
          Calculates the consequense of applying this adjustable to the specified state.
 boolean equals(java.lang.Object obj)
           
 SuperLinkID getID()
          Returns the id of this Adjustable.
 double getSetting()
          Returns the setting of this Adjustable.
 int hashCode()
           
 java.util.Collection<Adjustable> possibleAdjustments()
          Returns the possible adjustments from the current setting of this Adjustable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private static final org.apache.commons.logging.Log logger
Logger for this class


setting

private final double setting
The setting of this setpoint.


temperatureID

private final SuperLinkID temperatureID
The id of the temperature sensor.


humidityID

private final SuperLinkID humidityID
The id of the humidity sensor.


outsideTemperatureID

private final SuperLinkID outsideTemperatureID
The id of the outside temperature sensor.


outsideHumidityID

private final SuperLinkID outsideHumidityID
The id of the outside humidity sensor.


windowAreaPercentage

private static final int windowAreaPercentage
Approximate window surface percentage.

See Also:
Constant Field Values
Constructor Detail

WindowSetPoint

public WindowSetPoint(double setting)
Creates a new ScreenSetPoint with the specified setting.

Input parameters should be between 0 and 100 percent. Parameters outside this will be rounded to nearest limit.

Parameters:
setting - the setting
Method Detail

consequence

public State consequence(State state)
Description copied from interface: Adjustable
Calculates the consequense of applying this adjustable to the specified state.

Returns a new State as the calculated consequence of applying this adjustable to the specified state.

Specified by:
consequence in interface Adjustable
Parameters:
state - the input state
Returns:
the resulting State from applying this adjustable to state

possibleAdjustments

public java.util.Collection<Adjustable> possibleAdjustments()
Description copied from interface: Adjustable
Returns the possible adjustments from the current setting of this Adjustable.

The resulting adjustments represent all currently possible adjustments that can be applied to this adjustable.

Specified by:
possibleAdjustments in interface Adjustable
Returns:
the new possible settings

getID

public SuperLinkID getID()
Description copied from interface: Adjustable
Returns the id of this Adjustable.

Specified by:
getID in interface Adjustable
Returns:
the id of this adjustable

getSetting

public double getSetting()
Description copied from interface: Adjustable
Returns the setting of this Adjustable.

Specified by:
getSetting in interface Adjustable
Returns:
the setting of this adjustable

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © Deepthought Development - All Rights Reserved.