]> git.basschouten.com Git - openhab-addons.git/blob
c20e84dc69642cb533025b4add99583fcdf7d661
[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.types;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.snmp4j.security.SecurityLevel;
17
18 /**
19  * The {@link SnmpSecurityModel} enum defines the security model for v3
20  *
21  * @author Jan N. Klug - Initial contribution
22  */
23 @NonNullByDefault
24 public enum SnmpSecurityModel {
25     NO_AUTH_NO_PRIV(SecurityLevel.NOAUTH_NOPRIV),
26     AUTH_NO_PRIV(SecurityLevel.AUTH_NOPRIV),
27     AUTH_PRIV(SecurityLevel.AUTH_PRIV);
28
29     private final int securityLevel;
30
31     SnmpSecurityModel(int securityLevel) {
32         this.securityLevel = securityLevel;
33     }
34
35     /**
36      * get the numeric security level
37      *
38      * @return the int representing this security level
39      */
40     public int getSecurityLevel() {
41         return securityLevel;
42     }
43 }