1 package de.dlr.bt.stc.source.opcua; 2 3 import java.time.Instant; 4 import java.util.HashMap; 5 import java.util.Map; 6 7 import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; 8 import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId; 9 10 import de.dlr.bt.stc.source.opcua.NodeItems.NodeItem; 11 import lombok.Data; 12 13 public class NodeItems extends HashMap<NodeId, NodeItem> { 14 private static final long serialVersionUID = 5379404054690811818L; 15 16 @Data 17 public static class NodeItem { 18 private final Map<String, String> varMap; 19 private Instant lastUpdate; 20 private DataValue lastValue = null; 21 22 public NodeItem() { 23 this(new HashMap<>()); 24 } 25 26 public NodeItem(Map<String, String> varMap) { 27 this.varMap = new HashMap<>(varMap); 28 this.lastUpdate = Instant.now(); 29 } 30 } 31 }