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 RouterosPPPoECliInterface} 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 RouterosPPPoECliInterface extends RouterosInterfaceBase {
30 public RouterosPPPoECliInterface(Map<String, String> props) {
35 public RouterosInterfaceType getDesignedType() {
36 return RouterosInterfaceType.PPPOE_CLIENT;
40 public String getApiType() {
41 return "pppoe-client";
45 public boolean hasDetailedReport() {
50 public boolean hasMonitor() {
55 public @Nullable String getMacAddress() {
56 return getProp("ac-mac");
59 public @Nullable String getStatus() {
60 return getProp("status");
63 public @Nullable String getUptime() {
64 return getProp("uptime");
67 public @Nullable LocalDateTime getUptimeStart() {
68 return Converter.routerosPeriodBack(getUptime());