Search in sources :

Example 1 with Battery

use of com.alliander.osgp.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 (org.openmuc.openiec61850.ModelNode)1