Search in sources :

Example 1 with Battery

use of org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.Battery in project open-smart-grid-platform 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(org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.Battery) ModelNode(com.beanit.openiec61850.ModelNode)

Example 2 with Battery

use of org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.Battery 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)

Aggregations

Battery (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Battery)1 ModelNode (com.beanit.openiec61850.ModelNode)1 ModelNode (org.openmuc.openiec61850.ModelNode)1 Battery (org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.Battery)1