use of org.opensmartgridplatform.dto.valueobjects.microgrids.ReportDto in project open-smart-grid-platform by OSGP.
the class Iec61850ClientRTUEventListener method processReport.
private void processReport(final Report report, final String reportDescription, final Iec61850ReportHandler reportHandler) throws ProtocolAdapterException {
final List<FcModelNode> dataSetMembers = report.getValues();
if (CollectionUtils.isEmpty(dataSetMembers)) {
this.logger.warn("No dataSet members available for {}", reportDescription);
return;
}
final List<MeasurementDto> measurements = this.processMeasurements(reportHandler, reportDescription, dataSetMembers);
final GetDataSystemIdentifierDto systemResult = reportHandler.createResult(measurements);
final List<GetDataSystemIdentifierDto> systems = new ArrayList<>();
systems.add(systemResult);
final ReportDto reportDto = new ReportDto(report.getSqNum(), new DateTime(report.getTimeOfEntry().getTimestampValue()), report.getRptId());
this.deviceManagementService.sendMeasurements(this.deviceIdentification, new GetDataResponseDto(systems, reportDto));
this.reportingService.storeLastReportEntry(report, this.deviceIdentification);
}
Aggregations