Search in sources :

Example 1 with Iec61850TransitionCommand

use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850TransitionCommand in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850SsldDeviceService method setTransition.

@Override
public void setTransition(final SetTransitionDeviceRequest deviceRequest, final DeviceResponseHandler deviceResponseHandler) throws JMSException {
    DeviceConnection devCon = null;
    try {
        final DeviceConnection deviceConnection = this.connectToDevice(deviceRequest);
        devCon = deviceConnection;
        new Iec61850TransitionCommand().transitionDevice(this.iec61850Client, deviceConnection, deviceRequest.getTransitionTypeContainer());
        this.createSuccessfulDefaultResponse(deviceRequest, deviceResponseHandler);
        this.enableReporting(deviceConnection, deviceRequest);
    } catch (final ConnectionFailureException se) {
        this.handleConnectionFailureException(deviceRequest, deviceResponseHandler, se);
        this.iec61850DeviceConnectionService.disconnect(devCon, deviceRequest);
    } catch (final Exception e) {
        this.handleException(deviceRequest, deviceResponseHandler, e);
        this.iec61850DeviceConnectionService.disconnect(devCon, deviceRequest);
    }
}
Also used : ConnectionFailureException(com.alliander.osgp.adapter.protocol.iec61850.exceptions.ConnectionFailureException) DeviceConnection(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection) Iec61850TransitionCommand(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850TransitionCommand) NodeWriteException(com.alliander.osgp.adapter.protocol.iec61850.exceptions.NodeWriteException) FunctionalException(com.alliander.osgp.shared.exceptionhandling.FunctionalException) JMSException(javax.jms.JMSException) ProtocolAdapterException(com.alliander.osgp.adapter.protocol.iec61850.exceptions.ProtocolAdapterException) ConnectionFailureException(com.alliander.osgp.adapter.protocol.iec61850.exceptions.ConnectionFailureException) TechnicalException(com.alliander.osgp.shared.exceptionhandling.TechnicalException)

Aggregations

ConnectionFailureException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ConnectionFailureException)1 NodeWriteException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.NodeWriteException)1 ProtocolAdapterException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ProtocolAdapterException)1 DeviceConnection (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection)1 Iec61850TransitionCommand (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850TransitionCommand)1 FunctionalException (com.alliander.osgp.shared.exceptionhandling.FunctionalException)1 TechnicalException (com.alliander.osgp.shared.exceptionhandling.TechnicalException)1 JMSException (javax.jms.JMSException)1