]> git.basschouten.com Git - openhab-addons.git/blob
74953a58c34b383e723585498dcc0428d38ed80b
[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.message;
14
15 /**
16  * The {@link ModbusValue} define class for Modbus values of the Nibe communication.
17  *
18  *
19  * @author Pauli Anttila - Initial contribution
20  */
21 public class ModbusValue {
22
23     private int coilAddress;
24     private int value;
25
26     public ModbusValue(int coilAddress, int value) {
27         this.coilAddress = coilAddress;
28         this.value = value;
29     }
30
31     public int getCoilAddress() {
32         return coilAddress;
33     }
34
35     public void setCoilAddress(int coilAddress) {
36         this.coilAddress = coilAddress;
37     }
38
39     public int getValue() {
40         return value;
41     }
42
43     public void setValue(int value) {
44         this.value = value;
45     }
46
47     @Override
48     public String toString() {
49         String str = "{";
50
51         str += "Coil address = " + coilAddress;
52         str += ", Value = " + value;
53         str += "}";
54
55         return str;
56     }
57 }