Search in sources :

Example 31 with ServerModel

use of com.beanit.openiec61850.ServerModel in project open-smart-grid-platform by OSGP.

the class RtuSimulator method addPqDevices.

private void addPqDevices(final ServerModel serverModel) {
    final String pqPrefix = "PQ";
    int i = 1;
    String logicalDeviceName = pqPrefix + i;
    ModelNode pqNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    while (pqNode != null) {
        this.logicalDevices.add(new Pq(this.getDeviceName(), logicalDeviceName, serverModel));
        i += 1;
        logicalDeviceName = pqPrefix + i;
        pqNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    }
}
Also used : Pq(org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.Pq) ModelNode(com.beanit.openiec61850.ModelNode)

Example 32 with ServerModel

use of com.beanit.openiec61850.ServerModel in project open-smart-grid-platform by OSGP.

the class RtuSimulator method addSwitchDevices.

private void addSwitchDevices(final ServerModel serverModel) {
    final String logicalDeviceName = "IO";
    final ModelNode switchDevice = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    if (switchDevice != null) {
        LOGGER.info("Adding switchDevice {}", this.getDeviceName());
        this.logicalDevices.add(new SwitchDevice(this.getDeviceName(), logicalDeviceName, serverModel));
    }
}
Also used : ModelNode(com.beanit.openiec61850.ModelNode) SwitchDevice(org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.SwitchDevice)

Example 33 with ServerModel

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

Example 34 with ServerModel

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

Example 35 with ServerModel

use of com.beanit.openiec61850.ServerModel in project open-smart-grid-platform by OSGP.

the class RtuSimulator method addRtuDevices.

private void addRtuDevices(final ServerModel serverModel) {
    final String rtuPrefix = "RTU";
    int i = 1;
    String logicalDeviceName = rtuPrefix + i;
    ModelNode rtuNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    while (rtuNode != null) {
        this.logicalDevices.add(new Rtu(this.getDeviceName(), logicalDeviceName, serverModel));
        i += 1;
        logicalDeviceName = rtuPrefix + i;
        rtuNode = serverModel.getChild(this.getDeviceName() + logicalDeviceName);
    }
}
Also used : Rtu(org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.Rtu) LightMeasurementRtu(org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.LightMeasurementRtu) ModelNode(com.beanit.openiec61850.ModelNode)

Aggregations

ServerModel (org.openmuc.openiec61850.ServerModel)17 ModelNode (com.beanit.openiec61850.ModelNode)16 ServerModel (com.beanit.openiec61850.ServerModel)12 ModelNode (org.openmuc.openiec61850.ModelNode)10 ProtocolAdapterException (org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.ProtocolAdapterException)8 ProtocolAdapterException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ProtocolAdapterException)7 JMSException (javax.jms.JMSException)6 ClientAssociation (com.beanit.openiec61850.ClientAssociation)5 ConnectionFailureException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ConnectionFailureException)4 Iec61850ClientAssociation (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.Iec61850ClientAssociation)4 Iec61850Connection (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.Iec61850Connection)4 DeviceConnection (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection)4 ClientAssociation (org.openmuc.openiec61850.ClientAssociation)4 ConnectionFailureException (org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.ConnectionFailureException)4 Iec61850ClientAssociation (org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.Iec61850ClientAssociation)4 Iec61850Connection (org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.Iec61850Connection)4 DeviceConnection (org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection)4 EmptyDeviceResponse (com.alliander.osgp.adapter.protocol.iec61850.device.ssld.responses.EmptyDeviceResponse)3 EmptyDeviceResponse (org.opensmartgridplatform.adapter.protocol.iec61850.device.ssld.responses.EmptyDeviceResponse)3 BasicDataAttribute (com.beanit.openiec61850.BasicDataAttribute)2