2 * Copyright (c) 2010-2023 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.snmp.internal.config;
15 import javax.measure.Unit;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.snmp.internal.SnmpChannelMode;
20 import org.openhab.binding.snmp.internal.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;
27 * The {@link SnmpInternalChannelConfiguration} class contains fields mapping channel configuration parameters.
29 * @author Jan N. Klug - Initial contribution
33 public class SnmpInternalChannelConfiguration {
34 public final ChannelUID channelUID;
36 public final SnmpChannelMode mode;
37 public final SnmpDatatype datatype;
39 public final @Nullable Variable onValue;
40 public final @Nullable Variable offValue;
41 public final State exceptionValue;
42 public final boolean doNotLogException;
43 public final @Nullable Unit<?> unit;
45 public SnmpInternalChannelConfiguration(ChannelUID channelUID, OID oid, SnmpChannelMode mode, SnmpDatatype datatype,
46 @Nullable Variable onValue, @Nullable Variable offValue, State exceptionValue, boolean doNotLogException,
47 @Nullable Unit<?> unit) {
48 this.channelUID = channelUID;
51 this.datatype = datatype;
52 this.onValue = onValue;
53 this.offValue = offValue;
54 this.exceptionValue = exceptionValue;
55 this.doNotLogException = doNotLogException;