use of com.alliander.osgp.core.db.api.iec61850.entities.Ssld in project Protocol-Adapter-IEC61850 by OSGP.
the class Iec61850SsldDeviceService method getConfiguration.
@Override
public void getConfiguration(final DeviceRequest deviceRequest, final DeviceResponseHandler deviceResponseHandler) throws JMSException {
DeviceConnection deviceConnection = null;
try {
deviceConnection = this.connectToDevice(deviceRequest);
// Getting the SSLD for the device output-settings.
final Ssld ssld = this.ssldDataService.findDevice(deviceRequest.getDeviceIdentification());
final ConfigurationDto configuration = new Iec61850GetConfigurationCommand().getConfigurationFromDevice(this.iec61850Client, deviceConnection, ssld, this.mapper);
final GetConfigurationDeviceResponse response = new GetConfigurationDeviceResponse(deviceRequest.getOrganisationIdentification(), deviceRequest.getDeviceIdentification(), deviceRequest.getCorrelationUid(), DeviceMessageStatus.OK, configuration);
deviceResponseHandler.handleResponse(response);
} catch (final ConnectionFailureException se) {
this.handleConnectionFailureException(deviceRequest, deviceResponseHandler, se);
} catch (final Exception e) {
this.handleException(deviceRequest, deviceResponseHandler, e);
}
this.iec61850DeviceConnectionService.disconnect(deviceConnection, deviceRequest);
}
Aggregations