public class HeaterControl extends Object implements UtilityControl
Constructor and Description |
---|
HeaterControl(int relayNumber,
int sensornumber,
InOutAll inout,
Settings settings) |
Modifier and Type | Method and Description |
---|---|
double |
getConsumptionEstimation()
Runs an estimation on previous data to find the right value.
|
int |
getRelayNumber() |
int |
getSensornumber() |
int |
getUrgency()
Creates a schedule and finds the urgency level
|
boolean |
permitUsage(boolean use)
permits usage to the relay also used for measuring the average
consumption
|
void |
setRelayNumber(int relayNumber) |
void |
setSensornumber(int sensornumber) |
public HeaterControl(int relayNumber, int sensornumber, InOutAll inout, Settings settings)
relayNumber
- is the number the relay corresponds to in the databasesensornumber
- Number of the corresponding thermostatinout
- is the number the relay corresponds to in the databasesettings
- is the main Settings class that updates periodicallypublic int getRelayNumber()
public void setRelayNumber(int relayNumber)
public int getSensornumber()
public void setSensornumber(int sensornumber)
public boolean permitUsage(boolean use)
permitUsage
in interface UtilityControl
use
- represents if the relay is allowed to be active or notpublic int getUrgency()
UtilityControl
getUrgency
in interface UtilityControl
public double getConsumptionEstimation()
UtilityControl
getConsumptionEstimation
in interface UtilityControl
Copyright © 2015. All rights reserved.