]> git.basschouten.com Git - openhab-addons.git/blob
8d3c71563d7aa618490f15eb774edfa2816d6377
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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 import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.impl.DSUID;
21
22 /**
23  * The {@link CachedMeteringValue} saves the metering value of a digitalSTROM-Circuit.
24  *
25  * @author Alexander Betker - Initial contribution
26  * @author Michael Ochel - add methods getDateAsDate(), getMeteringType() and getMeteringUnit(); add missing java-doc
27  * @author Matthias Siegele - add methods getDateAsDate(), getMeteringType() and getMeteringUnit(); add missing java-doc
28  */
29 public interface CachedMeteringValue {
30
31     /**
32      * Returns the {@link DSID} of the digitalSTROM-Circuit.
33      *
34      * @return dSID of circuit
35      */
36     @Deprecated(since = "value removed in API since dss v1.19.2")
37     DSID getDsid();
38
39     /**
40      * Returns the {@link DSUID} of the digitalSTROM-Circuit.
41      *
42      * @return dSUID of circuit
43      */
44     DSUID getDsuid();
45
46     /**
47      * Returns the saved sensor value.
48      *
49      * @return sensor value
50      */
51     double getValue();
52
53     /**
54      * Returns the timestamp when the sensor value was read out as {@link String}.
55      *
56      * @return read out timestamp
57      */
58     String getDate();
59
60     /**
61      * Returns the timestamp when the sensor value was read out as {@link Date}.
62      *
63      * @return read out timestamp
64      */
65     Date getDateAsDate();
66
67     /**
68      * Returns the {@link MeteringTypeEnum} of this {@link CachedMeteringValue}.
69      *
70      * @return metering type as {@link MeteringTypeEnum}
71      */
72     MeteringTypeEnum getMeteringType();
73
74     /**
75      * Returns the {@link MeteringUnitsEnum} of this {@link CachedMeteringValue}.
76      *
77      * @return metering unit as {@link MeteringUnitsEnum}
78      */
79     MeteringUnitsEnum getMeteringUnit();
80 }