use of org.openmuc.openiec61850.ServerModel 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);
}
}
use of org.openmuc.openiec61850.ServerModel 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);
}
}
use of org.openmuc.openiec61850.ServerModel in project Protocol-Adapter-IEC61850 by OSGP.
the class Iec61850RtuDeviceReportingService method enableBatteryReportingOnDevice.
private void enableBatteryReportingOnDevice(final DeviceConnection connection, final String deviceIdentification) {
final ServerModel serverModel = connection.getConnection().getServerModel();
final String batteryPrefix = LogicalDevice.BATTERY.getDescription();
int i = 1;
String logicalDeviceName = batteryPrefix + i;
ModelNode batteryNode = serverModel.getChild(this.serverName + logicalDeviceName);
while (batteryNode != null) {
this.enableStatusReportingOnDevice(connection, deviceIdentification, LogicalDevice.BATTERY, i, DataAttribute.REPORT_STATUS_ONE);
this.enableMeasurementReportingOnDevice(connection, deviceIdentification, LogicalDevice.BATTERY, i, DataAttribute.REPORT_MEASUREMENTS_ONE);
i += 1;
logicalDeviceName = batteryPrefix + i;
batteryNode = serverModel.getChild(this.serverName + logicalDeviceName);
}
}
Aggregations