Skip to content

Commit

Permalink
feat(plc4j/iec-60870): Slightly changed the API for the new MetaData …
Browse files Browse the repository at this point in the history
…in PlcValues
  • Loading branch information
chrisdutz committed Sep 1, 2023
1 parent 85aa897 commit e3b831c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public interface PlcValue {

Map<String, ? extends PlcValue> getStruct();

Map<String, PlcValue> getMetaData();
Set<String> getMetaDataNames();

boolean hasMetaData(String key);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -272,8 +273,8 @@ public PlcValue getValue(String key) {
}

@Override
public Map<String, PlcValue> getMetaData() {
return null;
public Set<String> getMetaDataNames() {
return Collections.emptySet();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ public void addMetaData(String key, PlcValue value) {
}

@Override
public Map<String, PlcValue> getMetaData() {
return metaData;
public Set<String> getMetaDataNames() {
return metaData.keySet();
}

@Override
Expand Down

0 comments on commit e3b831c

Please sign in to comment.