use of org.opensmartgridplatform.dto.valueobjects.microgrids.ProfileFilterDto in project open-smart-grid-platform by OSGP.
the class Iec61850RtuSystemService method getData.
@Override
public GetDataSystemIdentifierDto getData(final SystemFilterDto systemFilter, final Iec61850Client client, final DeviceConnection connection) throws NodeException {
final int logicalDeviceIndex = systemFilter.getId();
LOGGER.info("Get data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
final List<MeasurementDto> measurements = new ArrayList<>();
for (final MeasurementFilterDto filter : systemFilter.getMeasurementFilters()) {
final RtuReadCommand<MeasurementDto> command = this.iec61850RtuCommandFactory.getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
measurements.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
final List<ProfileDto> profiles = new ArrayList<>();
for (final ProfileFilterDto filter : systemFilter.getProfileFilters()) {
final RtuReadCommand<ProfileDto> command = Iec61850RtuReadProfileCommandFactory.getInstance().getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
profiles.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
return new GetDataSystemIdentifierDto(systemFilter.getId(), systemFilter.getSystemType(), measurements, profiles);
}
use of org.opensmartgridplatform.dto.valueobjects.microgrids.ProfileFilterDto in project open-smart-grid-platform by OSGP.
the class Iec61850BoilerSystemService method getData.
@Override
public GetDataSystemIdentifierDto getData(final SystemFilterDto systemFilter, final Iec61850Client client, final DeviceConnection connection) throws NodeException {
final int logicalDeviceIndex = systemFilter.getId();
LOGGER.info("Get data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
final List<MeasurementDto> measurements = new ArrayList<>();
for (final MeasurementFilterDto filter : systemFilter.getMeasurementFilters()) {
final RtuReadCommand<MeasurementDto> command = this.iec61850BoilerCommandFactory.getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
measurements.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
final List<ProfileDto> profiles = new ArrayList<>();
for (final ProfileFilterDto filter : systemFilter.getProfileFilters()) {
final RtuReadCommand<ProfileDto> command = Iec61850RtuReadProfileCommandFactory.getInstance().getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
profiles.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
return new GetDataSystemIdentifierDto(systemFilter.getId(), systemFilter.getSystemType(), measurements, profiles);
}
use of org.opensmartgridplatform.dto.valueobjects.microgrids.ProfileFilterDto in project open-smart-grid-platform by OSGP.
the class Iec61850HeatPumpSystemService method getData.
@Override
public GetDataSystemIdentifierDto getData(final SystemFilterDto systemFilter, final Iec61850Client client, final DeviceConnection connection) throws NodeException {
final int logicalDeviceIndex = systemFilter.getId();
LOGGER.info("Get data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
final List<MeasurementDto> measurements = new ArrayList<>();
for (final MeasurementFilterDto filter : systemFilter.getMeasurementFilters()) {
final RtuReadCommand<MeasurementDto> command = this.iec61850HeatPumpCommandFactory.getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
measurements.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
final List<ProfileDto> profiles = new ArrayList<>();
for (final ProfileFilterDto filter : systemFilter.getProfileFilters()) {
final RtuReadCommand<ProfileDto> command = Iec61850RtuReadProfileCommandFactory.getInstance().getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
profiles.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
return new GetDataSystemIdentifierDto(systemFilter.getId(), systemFilter.getSystemType(), measurements, profiles);
}
use of org.opensmartgridplatform.dto.valueobjects.microgrids.ProfileFilterDto in project open-smart-grid-platform by OSGP.
the class Iec61850BatterySystemService method getData.
@Override
public GetDataSystemIdentifierDto getData(final SystemFilterDto systemFilter, final Iec61850Client client, final DeviceConnection connection) throws NodeException {
final int logicalDeviceIndex = systemFilter.getId();
LOGGER.info("Get data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
final List<MeasurementDto> measurements = new ArrayList<>();
for (final MeasurementFilterDto filter : systemFilter.getMeasurementFilters()) {
final RtuReadCommand<MeasurementDto> command = this.iec61850BatteryCommandFactory.getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
measurements.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
final List<ProfileDto> profiles = new ArrayList<>();
for (final ProfileFilterDto filter : systemFilter.getProfileFilters()) {
final RtuReadCommand<ProfileDto> command = Iec61850RtuReadProfileCommandFactory.getInstance().getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
profiles.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
return new GetDataSystemIdentifierDto(systemFilter.getId(), systemFilter.getSystemType(), measurements, profiles);
}
use of org.opensmartgridplatform.dto.valueobjects.microgrids.ProfileFilterDto in project open-smart-grid-platform by OSGP.
the class Iec61850EngineSystemService method getData.
@Override
public GetDataSystemIdentifierDto getData(final SystemFilterDto systemFilter, final Iec61850Client client, final DeviceConnection connection) throws NodeException {
final int logicalDeviceIndex = systemFilter.getId();
LOGGER.info("Get data called for logical device {}{}", DEVICE.getDescription(), logicalDeviceIndex);
final List<MeasurementDto> measurements = new ArrayList<>();
for (final MeasurementFilterDto filter : systemFilter.getMeasurementFilters()) {
final RtuReadCommand<MeasurementDto> command = this.iec61850EngineCommandFactory.getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
measurements.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
final List<ProfileDto> profiles = new ArrayList<>();
for (final ProfileFilterDto filter : systemFilter.getProfileFilters()) {
final RtuReadCommand<ProfileDto> command = Iec61850RtuReadProfileCommandFactory.getInstance().getCommand(filter);
if (command == null) {
LOGGER.warn("Unsupported data attribute [{}], skip get data for it", filter.getNode());
} else {
profiles.add(command.execute(client, connection, DEVICE, logicalDeviceIndex));
}
}
return new GetDataSystemIdentifierDto(systemFilter.getId(), systemFilter.getSystemType(), measurements, profiles);
}
Aggregations