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.lirc.internal.messages;
16 * Represents a button event that was received from the LIRC server
18 * @author Andrew Nagle - Initial contribution
20 public class LIRCButtonEvent {
22 private final String code;
23 private final int repeats;
24 private final String button;
25 private final String remote;
27 public LIRCButtonEvent(String remote, String button, int repeats, String code) {
29 this.repeats = repeats;
35 * Gets the number of times this event was repeated.
37 * @return number of repeats
39 public int getRepeats() {
44 * Gets the name of the button that was pressed
46 * @return the name of the button
48 public String getButton() {
53 * Gets the name of the remote that generated this event
55 * @return the name of the remote
57 public String getRemote() {
62 * Gets the raw hex code of the button pressed
64 * @return the hex code
66 public String getCode() {