]> git.basschouten.com Git - openhab-addons.git/blob
884e2cb400d802ed8fabaf4a72dbb3800fc6ec64
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.digiplex.internal.communication.events;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.digiplex.internal.communication.DigiplexMessageHandler;
17
18 /**
19  * Represents generic event received from PRT3 module.
20  *
21  * It is created when no specific handler is found for the received event.
22  *
23  * @author Robert Michalak - Initial contribution
24  *
25  */
26 @NonNullByDefault
27 public class GenericEvent extends AbstractEvent {
28
29     private int eventGroup;
30     private int eventNumber;
31
32     public GenericEvent(int eventGroup, int eventNumber, int areaNumber) {
33         super(areaNumber);
34         this.eventGroup = eventGroup;
35         this.eventNumber = eventNumber;
36     }
37
38     public int getEventGroup() {
39         return eventGroup;
40     }
41
42     public int getEventNumber() {
43         return eventNumber;
44     }
45
46     @Override
47     public void accept(DigiplexMessageHandler visitor) {
48         visitor.handleGenericEvent(this);
49     }
50 }