Search in sources :

Example 1 with GetConfigurationObjectRequestDto

use of org.opensmartgridplatform.dto.valueobjects.smartmetering.GetConfigurationObjectRequestDto in project open-smart-grid-platform by OSGP.

the class ConfigurationService method getConfigurationObject.

public void getConfigurationObject(final MessageMetadata messageMetadata, final GetConfigurationObjectRequest getConfigurationObjectRequest) throws FunctionalException {
    log.info("getConfigurationObject for organisationIdentification: {} for deviceIdentification: {}", messageMetadata.getOrganisationIdentification(), messageMetadata.getDeviceIdentification());
    final SmartMeter smartMeter = this.domainHelperService.findSmartMeter(messageMetadata.getDeviceIdentification());
    final GetConfigurationObjectRequestDto requestDto = this.configurationMapper.map(getConfigurationObjectRequest, GetConfigurationObjectRequestDto.class);
    this.osgpCoreRequestMessageSender.send(requestDto, messageMetadata.builder().withIpAddress(smartMeter.getIpAddress()).withNetworkSegmentIds(smartMeter.getBtsId(), smartMeter.getCellId()).build());
}
Also used : SmartMeter(org.opensmartgridplatform.domain.core.entities.SmartMeter) GetConfigurationObjectRequestDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.GetConfigurationObjectRequestDto)

Aggregations

SmartMeter (org.opensmartgridplatform.domain.core.entities.SmartMeter)1 GetConfigurationObjectRequestDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.GetConfigurationObjectRequestDto)1