2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters;
15 import java.util.Date;
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;
22 * The {@link CachedMeteringValue} saves the metering value of an digitalSTROM-Circuit.
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
28 public interface CachedMeteringValue {
31 * Returns the {@link DSID} of the digitalSTROM-Circuit.
33 * @return dSID of circuit
38 * Returns the saved sensor value.
40 * @return sensor value
45 * Returns the timestamp when the sensor value was read out as {@link String}.
47 * @return read out timestamp
52 * Returns the timestamp when the sensor value was read out as {@link Date}.
54 * @return read out timestamp
59 * Returns the {@link MeteringTypeEnum} of this {@link CachedMeteringValue}.
61 * @return metering type as {@link MeteringTypeEnum}
63 MeteringTypeEnum getMeteringType();
66 * Returns the {@link MeteringUnitsEnum} of this {@link CachedMeteringValue}.
68 * @return metering unit as {@link MeteringUnitsEnum}
70 MeteringUnitsEnum getMeteringUnit();