use of org.opensmartgridplatform.dto.valueobjects.microgrids.SetDataSystemIdentifierDto in project open-smart-grid-platform by OSGP.
the class Iec61850RtuDeviceService method handleSetData.
private void handleSetData(final DeviceConnection connection, final SetDataDeviceRequest deviceRequest) throws ProtocolAdapterException {
final SetDataRequestDto setDataRequest = deviceRequest.getSetDataRequest();
final Function<Void> function = new Function<Void>() {
@Override
public Void apply(final DeviceMessageLog deviceMessageLog) throws ProtocolAdapterException {
for (final SetDataSystemIdentifierDto identifier : setDataRequest.getSetDataSystemIdentifiers()) {
final SystemService systemService = Iec61850RtuDeviceService.this.systemServiceFactory.getSystemService(identifier.getSystemType());
systemService.setData(identifier, Iec61850RtuDeviceService.this.iec61850Client, connection);
}
return null;
}
};
this.iec61850Client.sendCommandWithRetry(function, deviceRequest.getDeviceIdentification());
}
Aggregations