Search in sources :

Example 26 with ModelNode

use of com.beanit.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class RtuSimulator method addChpDevices.

private void addChpDevices(final ServerModel serverModel) {
    final String chpPrefix = "CHP";
    int i = 1;
    String logicalDeviceName = chpPrefix + i;
    ModelNode chpNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    while (chpNode != null) {
        this.logicalDevices.add(new Chp(this.getDeviceName(), logicalDeviceName, serverModel));
        i += 1;
        logicalDeviceName = chpPrefix + i;
        chpNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    }
}
Also used : Chp(com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Chp) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 27 with ModelNode

use of com.beanit.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class RtuSimulator method addLoadDevices.

private void addLoadDevices(final ServerModel serverModel) {
    final String loadPrefix = "LOAD";
    int i = 1;
    String logicalDeviceName = loadPrefix + i;
    ModelNode loadNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    while (loadNode != null) {
        this.logicalDevices.add(new Load(this.getDeviceName(), logicalDeviceName, serverModel));
        i += 1;
        logicalDeviceName = loadPrefix + i;
        loadNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    }
}
Also used : Load(com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Load) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 28 with ModelNode

use of com.beanit.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class RtuSimulator method addBatteryDevices.

private void addBatteryDevices(final ServerModel serverModel) {
    final String batteryPrefix = "BATTERY";
    int i = 1;
    String logicalDeviceName = batteryPrefix + i;
    ModelNode batteryNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    while (batteryNode != null) {
        this.logicalDevices.add(new Battery(this.getDeviceName(), logicalDeviceName, serverModel));
        i += 1;
        logicalDeviceName = batteryPrefix + i;
        batteryNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    }
}
Also used : Battery(com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Battery) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 29 with ModelNode

use of com.beanit.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class RtuSimulator method addBoilerDevices.

private void addBoilerDevices(final ServerModel serverModel) {
    final String boilerPrefix = "BOILER";
    int i = 1;
    String logicalDeviceName = boilerPrefix + i;
    ModelNode boilerNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    while (boilerNode != null) {
        this.logicalDevices.add(new Boiler(this.getDeviceName(), logicalDeviceName, serverModel));
        i += 1;
        logicalDeviceName = boilerPrefix + i;
        boilerNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    }
}
Also used : Boiler(com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Boiler) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 30 with ModelNode

use of com.beanit.openiec61850.ModelNode 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;
}
Also used : DataSampleDto(org.osgpfoundation.osgp.dto.da.iec61850.DataSampleDto) ArrayList(java.util.ArrayList) FcModelNode(org.openmuc.openiec61850.FcModelNode) ModelNode(org.openmuc.openiec61850.ModelNode)

Aggregations

ModelNode (org.openmuc.openiec61850.ModelNode)25 ModelNode (com.beanit.openiec61850.ModelNode)20 ServerModel (org.openmuc.openiec61850.ServerModel)10 ArrayList (java.util.ArrayList)7 FcModelNode (com.beanit.openiec61850.FcModelNode)5 DataSampleDto (org.opensmartgridplatform.dto.da.iec61850.DataSampleDto)4 BigDecimal (java.math.BigDecimal)3 FcModelNode (org.openmuc.openiec61850.FcModelNode)3 DataSampleDto (org.osgpfoundation.osgp.dto.da.iec61850.DataSampleDto)3 BasicDataAttribute (com.beanit.openiec61850.BasicDataAttribute)2 BdaFloat32 (com.beanit.openiec61850.BdaFloat32)2 BdaTimestamp (com.beanit.openiec61850.BdaTimestamp)2 ServerModel (com.beanit.openiec61850.ServerModel)2 MathContext (java.math.MathContext)2 Date (java.util.Date)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Map (java.util.Map)2 Set (java.util.Set)2 LightMeasurementRtu (org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.LightMeasurementRtu)2