Constructor and Description |
---|
InOutAllAPIConnect() |
Modifier and Type | Method and Description |
---|---|
boolean |
activateRelay(int relayNumber)
Activates the relay with number relayNumber
does not check if relay exists
|
List<egotham.sdi.model.RealValue> |
consumptionData(int relayNumber,
long startTime,
long endTime,
int resultLimit)
Returns a request for consumption Data as a List of RealValues If
startTime is earlier than the startUpTime of the system, startTime is
replaced by startUpTime
|
boolean |
deactivateRelay(int relayNumber)
Deactivates the relay with number relayNumber
does not check if relay exists
|
List<egotham.sdi.model.DiscreteValue> |
fullConsumption(int N,
long startTime,
long endTime)
returns the Energy consumption of the total system in W*h
|
double |
getConsumptionCap()
Reads the Database and takes the consumption cap from the latest config
input
|
long |
getCurrentTime()
returns the current e-gotham timestamp in the system.
|
Settings |
getSettings() |
long[][] |
gettariff(long endTime)
Reads the Tariff from the database closest to the end time and returns it
as a long[24][3] array if the tariff at the requested timestamp is after
the starting time the returned tariff is the first received after
|
double |
getTemperature(int sensorNumber)
Returns the latest temperature from concerning sensor
|
void |
setSettings(Settings settings) |
boolean |
statusRelay(int relayNumber)
Checks the status of the relay (on/off) and returns it
|
public long getCurrentTime()
getCurrentTime
in interface InOutAll
public Settings getSettings()
public void setSettings(Settings settings)
public List<egotham.sdi.model.RealValue> consumptionData(int relayNumber, long startTime, long endTime, int resultLimit)
consumptionData
in interface InOutAll
relayNumber
- startTime
- Time in egotham time (converted Java time in clock()endTime
- Time in egotham time (converted Java time in clock()resultLimit
- 0, all values are returned 0>N returns N last Samples
0public boolean activateRelay(int relayNumber) throws Exception
activateRelay
in interface InOutAll
relayNumber
- Exception
public boolean deactivateRelay(int relayNumber) throws Exception
deactivateRelay
in interface InOutAll
relayNumber
- Exception
public boolean statusRelay(int relayNumber) throws Exception
statusRelay
in interface InOutAll
relayNumber
- Exception
public List<egotham.sdi.model.DiscreteValue> fullConsumption(int N, long startTime, long endTime) throws Exception
fullConsumption
in interface InOutAll
N
- 0, all values are returned,
0>N returns N last Samples
0startTime
- egotham timestamp for the beginningendTime
- egotham timestamp for the end of the interval returnedException
public long[][] gettariff(long endTime) throws Exception
public double getTemperature(int sensorNumber)
getTemperature
in interface InOutAll
sensorNumber
- number corresponding to databasepublic double getConsumptionCap()
getConsumptionCap
in interface InOutAll
Copyright © 2015. All rights reserved.