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;
20 * The {@link RouterosRouterboardInfo} is a model class for RouterOS system info used as bridge thing property values.
22 * @author Oleg Vivtash - Initial contribution
25 public class RouterosRouterboardInfo extends RouterosBaseData {
27 public RouterosRouterboardInfo(Map<String, String> props) {
31 public String getFirmware() {
32 return String.format("v%s (%s)", getFirmwareVersion(), getFirmwareType());
35 public boolean isRouterboard() {
36 return getProp("routerboard", "").equals("true");
39 public String getModel() {
40 return getProp("model", "Unknown");
43 public String getSerialNumber() {
44 return getProp("serial-number", "XXX");
47 public String getFirmwareType() {
48 return getProp("firmware-type", "N/A");
51 public String getFirmwareVersion() {
52 return getProp("current-firmware", "Unknown");