]> git.basschouten.com Git - openhab-addons.git/blob
5532fd9c3fb2c3c68e204a19650353e577830c5a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.tellstick.internal.live.xml;
14
15 import org.openhab.binding.tellstick.internal.TellstickRuntimeException;
16 import org.tellstick.device.TellstickSensorEvent;
17 import org.tellstick.device.iface.TellstickEvent;
18 import org.tellstick.enums.DataType;
19
20 /**
21  * This class is used for events for the telldus live sensors.
22  *
23  * @author Jarle Hjortland - Initial contribution
24  */
25 public class TellstickNetSensorEvent extends TellstickSensorEvent implements TellstickEvent {
26
27     private DataTypeValue dataType;
28
29     public TellstickNetSensorEvent(int sensorId, String data, DataTypeValue dataValue, String protocol, String model,
30             long timeStamp) {
31         super(sensorId, data, null, protocol, model, timeStamp);
32         this.dataType = dataValue;
33     }
34
35     public DataTypeValue getDataTypeValue() {
36         return dataType;
37     }
38
39     @Override
40     public DataType getDataType() {
41         throw new TellstickRuntimeException("Should not call this method");
42     }
43 }