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.satel.internal.event;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Event class describing version of communication module.
20 * @author Krzysztof Goworek - Initial contribution
23 public class ModuleVersionEvent implements SatelEvent {
25 private String version;
26 private boolean extPayloadSupport;
29 * Constructs new event class.
31 * @param version string describing version number and firmware revision
32 * @param extPayloadSupport the module supports extended (32-bit) payload for zones/outputs
34 public ModuleVersionEvent(String version, boolean extPayloadSupport) {
35 this.version = version;
36 this.extPayloadSupport = extPayloadSupport;
40 * @return firmware version and date
42 public String getVersion() {
47 * @return <code>true</code> if the module supports extended (32-bit) payload for zones/outputs
49 public boolean hasExtPayloadSupport() {
50 return this.extPayloadSupport;
54 public String toString() {
55 return String.format("ModuleVersionEvent: version = %s, extPayloadSupport = %b", this.version,
56 this.extPayloadSupport);