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.dsmr.internal.device.p1telegram;
15 import java.util.Collections;
16 import java.util.List;
17 import java.util.Map.Entry;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.binding.dsmr.internal.device.cosem.CosemObject;
23 * Data class containing a Telegram with CosemObjects and TelegramState and if in lenient mode also the raw telegram
26 * @author Hilbrand Bouwkamp - Initial contribution
29 public class P1Telegram {
32 * The TelegramState described the meta data of the P1Telegram
35 private final List<CosemObject> cosemObjects;
36 private final String rawTelegram;
37 private final List<Entry<String, String>> unknownCosemObjects;
39 public P1Telegram(final List<CosemObject> cosemObjects) {
40 this(cosemObjects, "", Collections.emptyList());
43 public P1Telegram(final List<CosemObject> cosemObjects, final String rawTelegram,
44 final List<Entry<String, String>> unknownCosemObjects) {
45 this.cosemObjects = cosemObjects;
46 this.rawTelegram = rawTelegram;
47 this.unknownCosemObjects = unknownCosemObjects;
51 * @return The list of CosemObjects
53 public List<CosemObject> getCosemObjects() {
58 * @return The raw telegram data.
60 public String getRawTelegram() {
65 * @return The list of CosemObject found in the telegram but not known to the binding
67 public List<Entry<String, String>> getUnknownCosemObjects() {
68 return unknownCosemObjects;