Search in sources :

Example 1 with GetMbusEncryptionKeyStatusByChannelRequestDataDto

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

the class ConfigurationService method getMbusEncryptionKeyStatusByChannel.

public void getMbusEncryptionKeyStatusByChannel(final MessageMetadata messageMetadata, final GetMbusEncryptionKeyStatusByChannelRequestData getMbusEncryptionKeyStatusByChannelRequestData) throws FunctionalException {
    log.info("getMbusEncryptionKeyStatusByChannel for organisationIdentification: {} for deviceIdentification: {}", messageMetadata.getOrganisationIdentification(), messageMetadata.getDeviceIdentification());
    final SmartMeter gatewayDevice = this.domainHelperService.findSmartMeter(messageMetadata.getDeviceIdentification());
    final GetMbusEncryptionKeyStatusByChannelRequestDataDto requestDto = new GetMbusEncryptionKeyStatusByChannelRequestDataDto(getMbusEncryptionKeyStatusByChannelRequestData.getChannel());
    this.osgpCoreRequestMessageSender.send(requestDto, messageMetadata.builder().withDeviceIdentification(gatewayDevice.getDeviceIdentification()).withIpAddress(gatewayDevice.getIpAddress()).withNetworkSegmentIds(gatewayDevice.getBtsId(), gatewayDevice.getCellId()).build());
}
Also used : GetMbusEncryptionKeyStatusByChannelRequestDataDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusByChannelRequestDataDto) SmartMeter(org.opensmartgridplatform.domain.core.entities.SmartMeter)

Example 2 with GetMbusEncryptionKeyStatusByChannelRequestDataDto

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

the class GetMbusEncryptionKeyStatusByChannelRequestMessageProcessor method handleMessage.

@Override
protected Serializable handleMessage(final DlmsConnectionManager conn, final DlmsDevice device, final Serializable requestObject, final MessageMetadata messageMetadata) throws OsgpException {
    this.assertRequestObjectType(GetMbusEncryptionKeyStatusByChannelRequestDataDto.class, requestObject);
    final GetMbusEncryptionKeyStatusByChannelRequestDataDto request = (GetMbusEncryptionKeyStatusByChannelRequestDataDto) requestObject;
    return this.configurationService.requestGetMbusEncryptionKeyStatusByChannel(conn, device, request, messageMetadata);
}
Also used : GetMbusEncryptionKeyStatusByChannelRequestDataDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.GetMbusEncryptionKeyStatusByChannelRequestDataDto)

Aggregations

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