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 RouterosEthernetInterface} is a model class for `ether` 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 RouterosEthernetInterface extends RouterosInterfaceBase {
28 public RouterosEthernetInterface(Map<String, String> props) {
33 public RouterosInterfaceType getDesignedType() {
34 return RouterosInterfaceType.ETHERNET;
38 public String getApiType() {
43 public boolean hasDetailedReport() {
48 public boolean hasMonitor() {
49 // PowerLine interfaces are of ehter type too
50 String name = getDefaultName();
51 return name != null && !name.startsWith("pwr");
54 public @Nullable String getDefaultName() {
55 return getProp("default-name");
58 public @Nullable String getRate() {
59 return getProp("rate");
62 public @Nullable String getState() {
63 return getProp("status");