Search in sources :

Example 31 with DeviceConnection

use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850ScheduleAbsTimeCommand method execute.

@Override
public ProfileDto execute(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex) throws NodeReadException {
    final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, DATA_ATTRIBUTE, FC);
    client.readNodeDataValues(connection.getConnection().getClientAssociation(), containingNode.getFcmodelNode());
    return this.translate(containingNode);
}
Also used : NodeContainer(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 32 with DeviceConnection

use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850ScheduleAbsTimeCommand method executeWrite.

@Override
public void executeWrite(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex, final ProfileDto profile) throws NodeWriteException {
    this.checkProfile(profile);
    final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, DATA_ATTRIBUTE, FC);
    final ProfilePair profilePair = this.convert(profile.getProfileEntries());
    containingNode.writeFloatArray(SubDataAttribute.VALUES, profilePair.getValues());
    containingNode.writeDateArray(SubDataAttribute.TIMES, profilePair.getTimes());
}
Also used : NodeContainer(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.NodeContainer) ProfilePair(com.alliander.osgp.adapter.protocol.iec61850.domain.valueobjects.ProfilePair)

Example 33 with DeviceConnection

use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850ScheduleCatCommand method execute.

@Override
public MeasurementDto execute(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex) throws NodeReadException {
    final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, DATA_ATTRIBUTE_RTU, FC);
    client.readNodeDataValues(connection.getConnection().getClientAssociation(), containingNode.getFcmodelNode());
    return this.translate(containingNode);
}
Also used : NodeContainer(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 34 with DeviceConnection

use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850ScheduleCatCommand method executeWrite.

@Override
public void executeWrite(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex, final SetPointDto setPoint) throws NodeWriteException {
    final int value = this.checkValue(setPoint.getValue());
    final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, DATA_ATTRIBUTE_RTU, FC);
    containingNode.writeInteger(SUB_DATA_ATTRIBUTE, value);
}
Also used : NodeContainer(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 35 with DeviceConnection

use of com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850ScheduleIdCommand method executeWrite.

@Override
public void executeWrite(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex, final SetPointDto setPoint) throws NodeWriteException {
    final int value = this.checkValue(setPoint.getValue());
    final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, DATA_ATTRIBUTE, FC);
    containingNode.writeInteger(SUB_DATA_ATTRIBUTE, value);
}
Also used : NodeContainer(com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Aggregations

NodeContainer (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)55 ProtocolAdapterException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ProtocolAdapterException)22 DeviceConnection (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.DeviceConnection)18 ConnectionFailureException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.ConnectionFailureException)17 NodeWriteException (com.alliander.osgp.adapter.protocol.iec61850.exceptions.NodeWriteException)17 JMSException (javax.jms.JMSException)16 DeviceMessageLog (com.alliander.osgp.adapter.protocol.iec61850.domain.valueobjects.DeviceMessageLog)15 Function (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.Function)15 FunctionalException (com.alliander.osgp.shared.exceptionhandling.FunctionalException)14 TechnicalException (com.alliander.osgp.shared.exceptionhandling.TechnicalException)13 ArrayList (java.util.ArrayList)8 Ssld (com.alliander.osgp.core.db.api.iec61850.entities.Ssld)7 LogicalNode (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.helper.LogicalNode)6 DeviceOutputSetting (com.alliander.osgp.core.db.api.iec61850.entities.DeviceOutputSetting)6 DateTime (org.joda.time.DateTime)6 BdaBoolean (org.openmuc.openiec61850.BdaBoolean)5 Iec61850ClientAssociation (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.Iec61850ClientAssociation)4 Iec61850Connection (com.alliander.osgp.adapter.protocol.iec61850.infra.networking.Iec61850Connection)4 ClientAssociation (org.openmuc.openiec61850.ClientAssociation)4 ServerModel (org.openmuc.openiec61850.ServerModel)4