]> git.basschouten.com Git - openhab-addons.git/blob
e9216eb811b5b428ea359388aa7d66dcc8c0dcfd
[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.regoheatpump.internal.rego6xx;
14
15 /**
16  * The {@link ShortResponseParser} is responsible for parsing short form data format
17  * coming from the rego 6xx unit.
18  *
19  * @author Boris Krivonog - Initial contribution
20  */
21 class ShortResponseParser extends AbstractResponseParser<Short> {
22
23     @Override
24     public int responseLength() {
25         return 5;
26     }
27
28     @Override
29     protected Short convert(byte[] responseBytes) {
30         return ValueConverter.sevenBitFormatToShort(responseBytes, 1);
31     }
32 }