]> git.basschouten.com Git - openhab-addons.git/blob
b4256de121d97c2d23ea949a25822e454659b20b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters;
14
15 import java.util.Date;
16
17 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.MeteringTypeEnum;
18 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.MeteringUnitsEnum;
19 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.impl.DSID;
20
21 /**
22  * The {@link CachedMeteringValue} saves the metering value of an digitalSTROM-Circuit.
23  *
24  * @author Alexander Betker - Initial contribution
25  * @author Michael Ochel - add methods getDateAsDate(), getMeteringType() and getMeteringUnit(); add missing java-doc
26  * @author Matthias Siegele - add methods getDateAsDate(), getMeteringType() and getMeteringUnit(); add missing java-doc
27  */
28 public interface CachedMeteringValue {
29
30     /**
31      * Returns the {@link DSID} of the digitalSTROM-Circuit.
32      *
33      * @return dSID of circuit
34      */
35     DSID getDsid();
36
37     /**
38      * Returns the saved sensor value.
39      *
40      * @return sensor value
41      */
42     double getValue();
43
44     /**
45      * Returns the timestamp when the sensor value was read out as {@link String}.
46      *
47      * @return read out timestamp
48      */
49     String getDate();
50
51     /**
52      * Returns the timestamp when the sensor value was read out as {@link Date}.
53      *
54      * @return read out timestamp
55      */
56     Date getDateAsDate();
57
58     /**
59      * Returns the {@link MeteringTypeEnum} of this {@link CachedMeteringValue}.
60      *
61      * @return metering type as {@link MeteringTypeEnum}
62      */
63     MeteringTypeEnum getMeteringType();
64
65     /**
66      * Returns the {@link MeteringUnitsEnum} of this {@link CachedMeteringValue}.
67      *
68      * @return metering unit as {@link MeteringUnitsEnum}
69      */
70     MeteringUnitsEnum getMeteringUnit();
71 }