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;
15 import java.time.LocalDateTime;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.openhab.binding.mikrotik.internal.util.Converter;
23 * The {@link RouterosPPPCliInterface} is a model class for `pppoe-out` interface models having casting accessors for
24 * data that is specific to this network interface kind. Is a subclass of {@link RouterosInterfaceBase}.
26 * @author Oleg Vivtash - Initial contribution
29 public class RouterosPPPCliInterface extends RouterosInterfaceBase {
30 public RouterosPPPCliInterface(Map<String, String> props) {
35 public RouterosInterfaceType getDesignedType() {
36 return RouterosInterfaceType.PPP_CLIENT;
40 public String getApiType() {
45 public boolean hasDetailedReport() {
50 public boolean hasMonitor() {
55 public @Nullable String getMacAddress() {
59 public @Nullable String getLocalAddress() {
60 return getProp("local-address");
63 public @Nullable String getRemoteAddress() {
64 return getProp("remote-address");
67 public @Nullable String getStatus() {
68 return getProp("status");
71 public @Nullable String getUptime() {
72 return getProp("uptime");
75 public @Nullable LocalDateTime getUptimeStart() {
76 return Converter.routerosPeriodBack(getUptime());