use of org.opensmartgridplatform.dto.da.iec61850.DataSampleDto in project Protocol-Adapter-IEC61850 by OSGP.
the class DistributionAutomationGetPQValuesRequestMessageProcessor method processPQValuesFunctionalChildConstraintObject.
private List<DataSampleDto> processPQValuesFunctionalChildConstraintObject(final LogicalNode parentNode, final String childName, final Fc constraint) {
final List<DataSampleDto> data = new ArrayList<>();
final ModelNode node = parentNode.getChild(childName, constraint);
if (Fc.MX == constraint && node.getChildren() != null) {
if (this.nodeHasBdaQualityChild(node)) {
data.add(this.processPQValue(node));
} else {
for (final ModelNode subNode : node.getChildren()) {
data.add(this.processPQValue(node, subNode));
}
}
}
return data;
}
use of org.opensmartgridplatform.dto.da.iec61850.DataSampleDto in project Protocol-Adapter-IEC61850 by OSGP.
the class DistributionAutomationGetPQValuesRequestMessageProcessor method processPQValueNodeChildren.
private List<DataSampleDto> processPQValueNodeChildren(final LogicalNode node) {
final List<DataSampleDto> data = new ArrayList<>();
final Collection<ModelNode> children = node.getChildren();
final Map<String, Set<Fc>> childMap = new HashMap<>();
for (final ModelNode child : children) {
if (!childMap.containsKey(child.getName())) {
childMap.put(child.getName(), new HashSet<Fc>());
}
childMap.get(child.getName()).add(((FcModelNode) child).getFc());
}
for (final Map.Entry<String, Set<Fc>> childEntry : childMap.entrySet()) {
final List<DataSampleDto> childData = this.processPQValuesFunctionalConstraintObject(node, childEntry.getKey(), childEntry.getValue());
if (!childData.isEmpty()) {
data.addAll(childData);
}
}
return data;
}
use of org.opensmartgridplatform.dto.da.iec61850.DataSampleDto in project open-smart-grid-platform by OSGP.
the class DistributionAutomationGetPQValuesRequestMessageProcessor method processPQValueNodeChildren.
private List<DataSampleDto> processPQValueNodeChildren(final LogicalNode node) {
final List<DataSampleDto> data = new ArrayList<>();
final Collection<ModelNode> children = node.getChildren();
final Map<String, Set<Fc>> childMap = new HashMap<>();
for (final ModelNode child : children) {
if (!childMap.containsKey(child.getName())) {
childMap.put(child.getName(), new HashSet<>());
}
childMap.get(child.getName()).add(((FcModelNode) child).getFc());
}
for (final Map.Entry<String, Set<Fc>> childEntry : childMap.entrySet()) {
final List<DataSampleDto> childData = this.processPQValuesFunctionalConstraintObject(node, childEntry.getKey(), childEntry.getValue());
if (!childData.isEmpty()) {
data.addAll(childData);
}
}
return data;
}
Aggregations