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