]> git.basschouten.com Git - openhab-addons.git/blob
ca58ee3a195429c6452d998c4b41dbbfd908dc95
[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.nibeheatpump.internal.protocol;
14
15 import java.nio.ByteBuffer;
16
17 /**
18  * The {@link NibeHeatPumpProtocolDefaultContext} implements default Nibe protocol context.
19  *
20  *
21  * @author Pauli Anttila - Initial contribution
22  */
23 public class NibeHeatPumpProtocolDefaultContext implements NibeHeatPumpProtocolContext {
24     private NibeHeatPumpProtocolStates state = NibeHeatPumpProtocolStates.WAIT_START;
25     private final ByteBuffer buffer = ByteBuffer.allocate(1000);
26     private final ByteBuffer msg = ByteBuffer.allocate(100);
27
28     @Override
29     public NibeHeatPumpProtocolStates state() {
30         return this.state;
31     }
32
33     @Override
34     public void state(NibeHeatPumpProtocolStates state) {
35         this.state = state;
36     }
37
38     @Override
39     public ByteBuffer buffer() {
40         return buffer;
41     }
42
43     @Override
44     public ByteBuffer msg() {
45         return msg;
46     }
47
48     @Override
49     public void sendAck() {
50     }
51
52     @Override
53     public void sendNak() {
54     }
55
56     @Override
57     public void msgReceived(byte[] data) {
58     }
59
60     @Override
61     public void sendWriteMsg() {
62     }
63
64     @Override
65     public void sendReadMsg() {
66     }
67 }