2 * Copyright (c) 2010-2024 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 RouterosWirelessRegistration} is a model class for WiFi client data retrieced from RouterOS
24 * physical wireless interface. Is a subclass of {@link RouterosRegistrationBase}.
26 * @author Oleg Vivtash - Initial contribution
29 public class RouterosWirelessRegistration extends RouterosRegistrationBase {
30 public RouterosWirelessRegistration(Map<String, String> props) {
34 public int getRxSignal() {
35 String signalValue = getProp("signal-strength", "0@hz").split("@")[0];
36 return Integer.parseInt(signalValue);
39 public @Nullable LocalDateTime getLastActivity() {
40 return Converter.routerosPeriodBack(getProp("last-activity"));