]> git.basschouten.com Git - openhab-addons.git/blob
16440d6b8b86612ee3a00e6a4c593afee9fa7a9e
[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.snmp.internal.config;
14
15 import javax.measure.Unit;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.snmp.internal.types.SnmpChannelMode;
20 import org.openhab.binding.snmp.internal.types.SnmpDatatype;
21 import org.openhab.core.thing.ChannelUID;
22 import org.openhab.core.types.State;
23 import org.snmp4j.smi.OID;
24 import org.snmp4j.smi.Variable;
25
26 /**
27  * The {@link SnmpInternalChannelConfiguration} class contains fields mapping channel configuration parameters.
28  *
29  * @author Jan N. Klug - Initial contribution
30  */
31
32 @NonNullByDefault
33 public class SnmpInternalChannelConfiguration {
34     public final ChannelUID channelUID;
35     public final OID oid;
36     public final SnmpChannelMode mode;
37     public final SnmpDatatype datatype;
38
39     public final @Nullable Variable onValue;
40     public final @Nullable Variable offValue;
41     public final State exceptionValue;
42     public final @Nullable Unit<?> unit;
43     public final boolean doNotLogException;
44
45     public SnmpInternalChannelConfiguration(ChannelUID channelUID, OID oid, SnmpChannelMode mode, SnmpDatatype datatype,
46             @Nullable Variable onValue, @Nullable Variable offValue, State exceptionValue, @Nullable Unit<?> unit,
47             boolean doNotLogException) {
48         this.channelUID = channelUID;
49         this.oid = oid;
50         this.mode = mode;
51         this.datatype = datatype;
52         this.onValue = onValue;
53         this.offValue = offValue;
54         this.exceptionValue = exceptionValue;
55         this.unit = unit;
56         this.doNotLogException = doNotLogException;
57     }
58 }