]> git.basschouten.com Git - openhab-addons.git/blob
057cd283a0566a90051daaf22b4f6813838f5204
[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.velux.internal.bridge.common;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.velux.internal.things.StatusReply;
17 import org.openhab.binding.velux.internal.things.VeluxProduct;
18
19 /**
20  * <B>Common bridge communication message scheme supported by the </B><I>Velux</I><B> bridge.</B>
21  * <P>
22  * Message semantic will be defined by the implementations according to the different comm paths.
23  * <P>
24  * In addition to the common methods defined by {@link BridgeCommunicationProtocol}
25  * each protocol-specific implementation has to provide the following methods:
26  * <UL>
27  * <LI>{@link #setProductId} for defining the intended product.
28  * <LI>{@link #getProduct} for accessing the retrieved information.
29  * </UL>
30  *
31  * @see BridgeCommunicationProtocol
32  *
33  * @author Guenther Schreiner - Initial contribution.
34  */
35 @NonNullByDefault
36 public abstract class GetProduct implements BridgeCommunicationProtocol {
37
38     /**
39      * Set the intended node identifier to be queried
40      *
41      * @param nodeId Gateway internal node identifier (zero to 199)
42      */
43     public abstract void setProductId(int nodeId);
44
45     /**
46      * <B>Retrieval of information about the selected product</B>
47      *
48      * @return <b>veluxProduct</b> as VeluxProduct.
49      */
50     public abstract VeluxProduct getProduct();
51
52     public StatusReply getStatusReply() {
53         return StatusReply.COMMAND_COMPLETED_OK;
54     }
55 }