use of org.opensmartgridplatform.dto.valueobjects.smartmetering.EventTypeDto in project open-smart-grid-platform by OSGP.
the class EventService method enrichEvents.
public void enrichEvents(final MessageMetadata deviceMessageMetadata, final EventMessageDataResponseDto responseDto) throws FunctionalException {
LOGGER.info("Enrich EventMessageDataResponse with EventTypes for device: {}", deviceMessageMetadata.getDeviceIdentification());
final SmartMeter smartMeter = this.domainHelperService.findSmartMeter(deviceMessageMetadata.getDeviceIdentification());
for (final EventDto eventDto : responseDto.getEvents()) {
final String protocolName = smartMeter.getProtocolInfo() != null ? smartMeter.getProtocolInfo().getProtocol() : null;
final EventTypeDto eventTypeDto = this.determineEventType(eventDto, protocolName);
eventDto.setEventTypeDto(eventTypeDto);
}
}
Aggregations