use of org.opensmartgridplatform.dto.valueobjects.smartmetering.SetClockConfigurationRequestDto in project open-smart-grid-platform by OSGP.
the class ConfigurationService method setClockConfiguration.
public void setClockConfiguration(final MessageMetadata messageMetadata, final SetClockConfigurationRequestData setClockConfigurationRequest) throws FunctionalException {
log.info("setClockConfiguration for organisationIdentification: {} for deviceIdentification: {}", messageMetadata.getOrganisationIdentification(), messageMetadata.getDeviceIdentification());
final SmartMeter smartMeter = this.domainHelperService.findSmartMeter(messageMetadata.getDeviceIdentification());
final SetClockConfigurationRequestDto requestDto = this.configurationMapper.map(setClockConfigurationRequest, SetClockConfigurationRequestDto.class);
this.osgpCoreRequestMessageSender.send(requestDto, messageMetadata.builder().withIpAddress(smartMeter.getIpAddress()).withNetworkSegmentIds(smartMeter.getBtsId(), smartMeter.getCellId()).build());
}
use of org.opensmartgridplatform.dto.valueobjects.smartmetering.SetClockConfigurationRequestDto in project open-smart-grid-platform by OSGP.
the class SetClockConfigurationRequestMessageProcessor method handleMessage.
@Override
protected Serializable handleMessage(final DlmsConnectionManager conn, final DlmsDevice device, final Serializable requestObject, final MessageMetadata messageMetadata) throws OsgpException {
this.assertRequestObjectType(SetClockConfigurationRequestDto.class, requestObject);
final SetClockConfigurationRequestDto clockConfiguration = (SetClockConfigurationRequestDto) requestObject;
this.configurationService.setClockConfiguration(conn, device, clockConfiguration, messageMetadata);
return null;
}
Aggregations