2 * Copyright (c) 2010-2022 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.mikrotik.internal.model;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link RouterosWlanInterface} is a model class for `waln` interface models having casting accessors for
22 * data that is specific to this network interface kind. Is a subclass of {@link RouterosInterfaceBase}.
24 * @author Oleg Vivtash - Initial contribution
27 public class RouterosWlanInterface extends RouterosInterfaceBase {
28 public RouterosWlanInterface(Map<String, String> props) {
33 public RouterosInterfaceType getDesignedType() {
34 return RouterosInterfaceType.WLAN;
38 public String getApiType() {
43 public boolean hasDetailedReport() {
48 public boolean hasMonitor() {
52 public boolean isMaster() {
53 return !getProp("master-interface", "").isBlank();
56 public @Nullable String getCurrentState() {
57 return getProp("status");
60 public @Nullable String getSSID() {
61 return getProp("ssid");
64 public @Nullable String getMode() {
65 return getProp("mode");
68 public @Nullable String getRate() {
69 return getProp("band");
72 public @Nullable String getInterfaceType() {
73 return getProp("interface-type");
76 public int getRegisteredClients() {
77 Integer registeredClients = getIntProp("registered-clients");
78 return registeredClients == null ? 0 : registeredClients;
81 public int getAuthorizedClients() {
82 Integer authedClients = getIntProp("authenticated-clients");
83 return authedClients == null ? 0 : authedClients;