2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.knx.internal.channel;
15 import static java.util.stream.Collectors.toList;
17 import java.util.Collections;
18 import java.util.List;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.eclipse.jdt.annotation.Nullable;
22 import org.openhab.binding.knx.internal.client.InboundSpec;
24 import tuwien.auto.calimero.GroupAddress;
29 * @author Simon Kaufmann - initial contribution and API.
33 public class ReadRequestSpecImpl extends AbstractSpec implements InboundSpec {
35 private final List<GroupAddress> readAddresses;
37 public ReadRequestSpecImpl(@Nullable ChannelConfiguration channelConfiguration, String defaultDPT) {
38 super(channelConfiguration, defaultDPT);
39 if (channelConfiguration != null) {
40 this.readAddresses = channelConfiguration.getReadGAs().stream().map(this::toGroupAddress).collect(toList());
42 this.readAddresses = Collections.emptyList();
47 public List<GroupAddress> getGroupAddresses() {