]> git.basschouten.com Git - openhab-addons.git/blob
d555a32f58d329a9dfd24411dcee0edb43b7f71c
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.rfxcom.internal.messages;
14
15 import org.openhab.binding.rfxcom.internal.exceptions.RFXComException;
16 import org.openhab.binding.rfxcom.internal.messages.RFXComBaseMessage.PacketType;
17
18 /**
19  * Factory to create RFXCom messages from either bytes delivered by the RFXCom device
20  * or from openhab state to transmit.
21  *
22  * @author Pauli Anttila - Initial contribution
23  * @author James Hewitt-Thomas - Convert to interface to allow dependency injection
24  */
25 public interface RFXComMessageFactory {
26     public RFXComMessage createMessage(PacketType packetType) throws RFXComException;
27
28     public RFXComMessage createMessage(byte[] packet) throws RFXComException;
29 }