Search in sources :

Example 1 with SetPointDto

use of com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850HeatPumpSystemService method setData.

@Override
public void setData(final SetDataSystemIdentifierDto systemIdentifier, final Iec61850Client client, final DeviceConnection connection) throws NodeWriteException {
    final int logicalDeviceIndex = systemIdentifier.getId();
    LOGGER.info("Set data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
    for (final SetPointDto sp : systemIdentifier.getSetPoints()) {
        final RtuWriteCommand<SetPointDto> command = Iec61850SetPointCommandFactory.getInstance().getCommand(sp.getNode() + sp.getId());
        if (command == null) {
            LOGGER.warn("Unsupported set point [{}], skip set data for it.", sp.getNode() + sp.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, sp);
        }
    }
    for (final ProfileDto p : systemIdentifier.getProfiles()) {
        final RtuWriteCommand<ProfileDto> command = Iec61850WriteProfileCommandFactory.getInstance().getCommand(p.getNode() + p.getId());
        if (command == null) {
            LOGGER.warn("Unsupported profile [{}], skip set data for it.", p.getNode() + p.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, p);
        }
    }
}
Also used : SetPointDto(com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto) ProfileDto(com.alliander.osgp.dto.valueobjects.microgrids.ProfileDto)

Example 2 with SetPointDto

use of com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850BoilerSystemService method setData.

@Override
public void setData(final SetDataSystemIdentifierDto systemIdentifier, final Iec61850Client client, final DeviceConnection connection) throws NodeWriteException {
    final int logicalDeviceIndex = systemIdentifier.getId();
    LOGGER.info("Set data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
    for (final SetPointDto sp : systemIdentifier.getSetPoints()) {
        final RtuWriteCommand<SetPointDto> command = Iec61850SetPointCommandFactory.getInstance().getCommand(sp.getNode() + sp.getId());
        if (command == null) {
            LOGGER.warn("Unsupported set point [{}], skip set data for it.", sp.getNode() + sp.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, sp);
        }
    }
    for (final ProfileDto p : systemIdentifier.getProfiles()) {
        final RtuWriteCommand<ProfileDto> command = Iec61850WriteProfileCommandFactory.getInstance().getCommand(p.getNode() + p.getId());
        if (command == null) {
            LOGGER.warn("Unsupported profile [{}], skip set data for it.", p.getNode() + p.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, p);
        }
    }
}
Also used : SetPointDto(com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto) ProfileDto(com.alliander.osgp.dto.valueobjects.microgrids.ProfileDto)

Example 3 with SetPointDto

use of com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850BatterySystemService method setData.

@Override
public void setData(final SetDataSystemIdentifierDto systemIdentifier, final Iec61850Client client, final DeviceConnection connection) throws NodeWriteException {
    final int logicalDeviceIndex = systemIdentifier.getId();
    LOGGER.info("Set data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
    for (final SetPointDto sp : systemIdentifier.getSetPoints()) {
        final RtuWriteCommand<SetPointDto> command = Iec61850SetPointCommandFactory.getInstance().getCommand(sp.getNode() + sp.getId());
        if (command == null) {
            LOGGER.warn("Unsupported set point [{}], skip set data for it.", sp.getNode() + sp.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, sp);
        }
    }
    for (final ProfileDto p : systemIdentifier.getProfiles()) {
        final RtuWriteCommand<ProfileDto> command = Iec61850WriteProfileCommandFactory.getInstance().getCommand(p.getNode() + p.getId());
        if (command == null) {
            LOGGER.warn("Unsupported profile [{}], skip set data for it.", p.getNode() + p.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, p);
        }
    }
}
Also used : SetPointDto(com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto) ProfileDto(com.alliander.osgp.dto.valueobjects.microgrids.ProfileDto)

Example 4 with SetPointDto

use of com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto in project Protocol-Adapter-IEC61850 by OSGP.

the class Iec61850RtuSystemService method setData.

@Override
public void setData(final SetDataSystemIdentifierDto systemIdentifier, final Iec61850Client client, final DeviceConnection connection) throws NodeException {
    final int logicalDeviceIndex = systemIdentifier.getId();
    LOGGER.info("Set data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
    for (final SetPointDto sp : systemIdentifier.getSetPoints()) {
        final RtuWriteCommand<SetPointDto> command = Iec61850SetPointCommandFactory.getInstance().getCommand(sp.getNode() + sp.getId());
        if (command == null) {
            LOGGER.warn("Unsupported set point [{}], skip set data for it.", sp.getNode() + sp.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, sp);
        }
    }
    for (final ProfileDto p : systemIdentifier.getProfiles()) {
        final RtuWriteCommand<ProfileDto> command = Iec61850WriteProfileCommandFactory.getInstance().getCommand(p.getNode() + p.getId());
        if (command == null) {
            LOGGER.warn("Unsupported profile [{}], skip set data for it.", p.getNode() + p.getId());
        } else {
            command.executeWrite(client, connection, DEVICE, logicalDeviceIndex, p);
        }
    }
}
Also used : SetPointDto(com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto) ProfileDto(com.alliander.osgp.dto.valueobjects.microgrids.ProfileDto)

Aggregations

ProfileDto (com.alliander.osgp.dto.valueobjects.microgrids.ProfileDto)4 SetPointDto (com.alliander.osgp.dto.valueobjects.microgrids.SetPointDto)4