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.rfxcom.internal.connector;
15 import java.io.IOException;
17 import org.openhab.binding.rfxcom.internal.config.RFXComBridgeConfiguration;
20 * This interface defines interface to communicate RFXCOM controller.
22 * @author Pauli Anttila - Initial contribution
24 public interface RFXComConnectorInterface {
27 * Procedure for connecting to RFXCOM controller.
29 * @param device Controller connection parameters (e.g. serial port name or IP address).
31 void connect(RFXComBridgeConfiguration device) throws Exception;
34 * Procedure for disconnecting to RFXCOM controller.
40 * Procedure for send raw data to RFXCOM controller.
42 * @param data raw bytes.
44 void sendMessage(byte[] data) throws IOException;
47 * Procedure for register event listener.
49 * @param listener Event listener instance to handle events.
51 void addEventListener(RFXComEventListener listener);
54 * Procedure for remove event listener.
56 * @param listener Event listener instance to remove.
58 void removeEventListener(RFXComEventListener listener);