Search in sources :

Example 21 with ModelNode

use of org.openmuc.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850RtuDeviceReportingService method enableHeatPumpReportingOnDevice.

private void enableHeatPumpReportingOnDevice(final DeviceConnection connection, final String deviceIdentification) {
    final ServerModel serverModel = connection.getConnection().getServerModel();
    final String heatPumpPrefix = LogicalDevice.HEAT_PUMP.getDescription();
    int i = 1;
    String logicalDeviceName = heatPumpPrefix + i;
    ModelNode heatPumpNode = serverModel.getChild(this.serverName + logicalDeviceName);
    while (heatPumpNode != null) {
        this.enableStatusReportingOnDevice(connection, deviceIdentification, LogicalDevice.HEAT_PUMP, i, DataAttribute.REPORT_STATUS_ONE);
        this.enableMeasurementReportingOnDevice(connection, deviceIdentification, LogicalDevice.HEAT_PUMP, i, DataAttribute.REPORT_MEASUREMENTS_ONE);
        i += 1;
        logicalDeviceName = heatPumpPrefix + i;
        heatPumpNode = serverModel.getChild(this.serverName + logicalDeviceName);
    }
}
Also used : ServerModel(org.openmuc.openiec61850.ServerModel) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 22 with ModelNode

use of org.openmuc.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850RtuDeviceReportingService method enableLoadReportingOnDevice.

private void enableLoadReportingOnDevice(final DeviceConnection connection, final String deviceIdentification) {
    final ServerModel serverModel = connection.getConnection().getServerModel();
    final String loadPrefix = LogicalDevice.LOAD.getDescription();
    int i = 1;
    String logicalDeviceName = loadPrefix + i;
    ModelNode loadNode = serverModel.getChild(this.serverName + logicalDeviceName);
    while (loadNode != null) {
        this.enableStatusReportingOnDevice(connection, deviceIdentification, LogicalDevice.LOAD, i, DataAttribute.REPORT_STATUS_ONE);
        this.enableMeasurementReportingOnDevice(connection, deviceIdentification, LogicalDevice.LOAD, i, DataAttribute.REPORT_MEASUREMENTS_ONE);
        i += 1;
        logicalDeviceName = loadPrefix + i;
        loadNode = serverModel.getChild(this.serverName + logicalDeviceName);
    }
}
Also used : ServerModel(org.openmuc.openiec61850.ServerModel) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 23 with ModelNode

use of org.openmuc.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850RtuDeviceReportingService method enableBoilerReportingOnDevice.

private void enableBoilerReportingOnDevice(final DeviceConnection connection, final String deviceIdentification) {
    final ServerModel serverModel = connection.getConnection().getServerModel();
    final String boilerPrefix = LogicalDevice.BOILER.getDescription();
    int i = 1;
    String logicalDeviceName = boilerPrefix + i;
    ModelNode boilerNode = serverModel.getChild(this.serverName + logicalDeviceName);
    while (boilerNode != null) {
        this.enableStatusReportingOnDevice(connection, deviceIdentification, LogicalDevice.BOILER, i, DataAttribute.REPORT_STATUS_ONE);
        this.enableMeasurementReportingOnDevice(connection, deviceIdentification, LogicalDevice.BOILER, i, DataAttribute.REPORT_MEASUREMENTS_ONE);
        i += 1;
        logicalDeviceName = boilerPrefix + i;
        boilerNode = serverModel.getChild(this.serverName + logicalDeviceName);
    }
}
Also used : ServerModel(org.openmuc.openiec61850.ServerModel) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 24 with ModelNode

use of org.openmuc.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850RtuDeviceReportingService method enableEngineReportingOnDevice.

private void enableEngineReportingOnDevice(final DeviceConnection connection, final String deviceIdentification) {
    final ServerModel serverModel = connection.getConnection().getServerModel();
    final String enginePrefix = LogicalDevice.ENGINE.getDescription();
    int i = 1;
    String logicalDeviceName = enginePrefix + i;
    ModelNode engineNode = serverModel.getChild(this.serverName + logicalDeviceName);
    while (engineNode != null) {
        this.enableStatusReportingOnDevice(connection, deviceIdentification, LogicalDevice.ENGINE, i, DataAttribute.REPORT_STATUS_ONE);
        this.enableMeasurementReportingOnDevice(connection, deviceIdentification, LogicalDevice.ENGINE, i, DataAttribute.REPORT_MEASUREMENTS_ONE);
        i += 1;
        logicalDeviceName = enginePrefix + i;
        engineNode = serverModel.getChild(this.serverName + logicalDeviceName);
    }
}
Also used : ServerModel(org.openmuc.openiec61850.ServerModel) ModelNode(org.openmuc.openiec61850.ModelNode)

Example 25 with ModelNode

use of org.openmuc.openiec61850.ModelNode in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850RtuDeviceReportingService method enableHeatBufferReportingOnDevice.

private void enableHeatBufferReportingOnDevice(final DeviceConnection connection, final String deviceIdentification) {
    final ServerModel serverModel = connection.getConnection().getServerModel();
    final String heatBufferPrefix = LogicalDevice.HEAT_BUFFER.getDescription();
    int i = 1;
    String logicalDeviceName = heatBufferPrefix + i;
    ModelNode heatBufferNode = serverModel.getChild(this.serverName + logicalDeviceName);
    while (heatBufferNode != null) {
        this.enableStatusReportingOnDevice(connection, deviceIdentification, LogicalDevice.HEAT_BUFFER, i, DataAttribute.REPORT_STATUS_ONE);
        this.enableMeasurementReportingOnDevice(connection, deviceIdentification, LogicalDevice.HEAT_BUFFER, i, DataAttribute.REPORT_MEASUREMENTS_ONE);
        i += 1;
        logicalDeviceName = heatBufferPrefix + i;
        heatBufferNode = serverModel.getChild(this.serverName + logicalDeviceName);
    }
}
Also used : ServerModel(org.openmuc.openiec61850.ServerModel) ModelNode(org.openmuc.openiec61850.ModelNode)

Aggregations

ModelNode (org.openmuc.openiec61850.ModelNode)25 ServerModel (org.openmuc.openiec61850.ServerModel)11 FcModelNode (org.openmuc.openiec61850.FcModelNode)5 ArrayList (java.util.ArrayList)3 DataSampleDto (org.osgpfoundation.osgp.dto.da.iec61850.DataSampleDto)3 NodeReadException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.NodeReadException)1 ProtocolAdapterException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ProtocolAdapterException)1 Iec61850Connection (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.Iec61850Connection)1 Battery (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Battery)1 Boiler (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Boiler)1 Chp (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Chp)1 Engine (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Engine)1 GasFurnace (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.GasFurnace)1 HeatBuffer (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.HeatBuffer)1 HeatPump (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.HeatPump)1 Load (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Load)1 LogicalDevice (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.LogicalDevice)1 Pv (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Pv)1 Rtu (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.Rtu)1 BigDecimal (java.math.BigDecimal)1