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);
}
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());
}
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);
}
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);
}
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);
}
Aggregations