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.robonect.internal.model;
16 * Answer object for holding version information.
18 * @author Marco Meyer - Initial contribution
20 public class VersionInfo extends RobonectAnswer {
22 private static final RobonectVersion NA_VERSION = new RobonectVersion();
25 * encapsulates the robonect version information.
27 public static class RobonectVersion {
29 private static final String NA = "n/a";
31 private String serial;
33 private String version;
35 private String compiled;
37 private String comment;
39 public RobonectVersion() {
43 public RobonectVersion(String serial, String version, String compiled, String comment) {
45 this.version = version;
46 this.compiled = compiled;
47 this.comment = comment;
51 * @return - The serial number of the robonect module.
53 public String getSerial() {
58 * @return - The firmware version running on the robonect module.
60 public String getVersion() {
65 * @return - The date and time the firmware was compiled.
67 public String getCompiled() {
72 * @return - The comment added to this version.
74 public String getComment() {
78 public void setSerial(String serial) {
82 public void setVersion(String version) {
83 this.version = version;
86 public void setCompiled(String compiled) {
87 this.compiled = compiled;
90 public void setComment(String comment) {
91 this.comment = comment;
95 private RobonectVersion robonect;
98 * @return - the object encapsulating the version information. See {@link RobonectVersion}
100 public RobonectVersion getRobonect() {
101 if (robonect != null) {
108 public void setRobonect(RobonectVersion robonect) {
109 this.robonect = robonect;