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.mikrotik.internal.model;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@link RouterosCapInterface} is a model class for `cap` 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 RouterosCapInterface extends RouterosInterfaceBase {
28 public RouterosCapInterface(Map<String, String> props) {
33 public RouterosInterfaceType getDesignedType() {
34 return RouterosInterfaceType.CAP;
38 public boolean hasDetailedReport() {
43 public boolean hasMonitor() {
47 public boolean isMaster() {
48 return getProp("slave", "").equals("false");
51 public boolean isDynamic() {
52 return getProp("dynamic", "").equals("true");
55 public boolean isBound() {
56 return getProp("bound", "").equals("true");
59 public boolean isActive() {
60 return getProp("inactive", "").equals("false");
63 public @Nullable String getCurrentState() {
64 return getProp("current-state");
67 public @Nullable String getRateSet() {
68 return getProp("current-basic-rate-set");
71 public @Nullable Integer getRegisteredClients() {
72 return getIntProp("current-registered-clients");
75 public @Nullable Integer getAuthorizedClients() {
76 return getIntProp("current-authorized-clients");