use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850SetConfigurationCommand in project Protocol-Adapter-IEC61850 by OSGP.
the class Iec61850SsldDeviceService method setConfiguration.
@Override
public void setConfiguration(final SetConfigurationDeviceRequest deviceRequest, final DeviceResponseHandler deviceResponseHandler) throws JMSException {
DeviceConnection deviceConnection = null;
try {
deviceConnection = this.connectToDevice(deviceRequest);
final ConfigurationDto configuration = deviceRequest.getConfiguration();
// Ignoring required, unused fields DALI-configuration, meterType,
// shortTermHistoryIntervalMinutes, preferredLinkType,
// longTermHistoryInterval and longTermHistoryIntervalType.
new Iec61850SetConfigurationCommand().setConfigurationOnDevice(this.iec61850Client, deviceConnection, configuration);
this.createSuccessfulDefaultResponse(deviceRequest, deviceResponseHandler);
} catch (final ConnectionFailureException se) {
this.handleConnectionFailureException(deviceRequest, deviceResponseHandler, se);
} catch (final Exception e) {
this.handleException(deviceRequest, deviceResponseHandler, e);
}
this.iec61850DeviceConnectionService.disconnect(deviceConnection, deviceRequest);
}
Aggregations