]> git.basschouten.com Git - openhab-addons.git/blob
c3891a58cbe15e9031a2863a9715fbee8f88eaa6
[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.tellstick.internal.local.dto;
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 Jan Gustafsson - Initial contribution
24  */
25 public class TellstickLocalSensorEventDTO extends TellstickSensorEvent implements TellstickEvent {
26
27     private LocalDataTypeValueDTO dataType;
28
29     public TellstickLocalSensorEventDTO(int sensorId, String data, LocalDataTypeValueDTO dataValue, String protocol,
30             String model, long timeStamp) {
31         super(sensorId, data, null, protocol, model, timeStamp);
32         this.dataType = dataValue;
33     }
34
35     public LocalDataTypeValueDTO getDataTypeValue() {
36         return dataType;
37     }
38
39     @Override
40     public DataType getDataType() {
41         throw new TellstickRuntimeException("Should not call this method");
42     }
43 }