]> git.basschouten.com Git - openhab-addons.git/blob
266affea03b919c02b57fa9cbd5494017c8a18aa
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.modbus.sunspec.internal.dto;
14
15 /**
16  * Descriptor for a model block found on the device
17  * This DTO contains only the metadata required to
18  * address the block at the modbus register space
19  *
20  * @author Nagy Attila Gabor - Initial contribution
21  */
22 public class ModelBlock {
23
24     /**
25      * Base address of this block in 16bit words
26      */
27     public int address;
28
29     /**
30      * Length of this block in 16bit words
31      */
32     public int length;
33
34     /**
35      * Module identifier
36      */
37     public int moduleID;
38
39     @Override
40     public String toString() {
41         return String.format("ModelBlock type=%d address=%d length=%d", moduleID, address, length);
42     }
43 }