use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequest in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusByChannelSteps method aGetMBusEncryptionKeyStatusByChannelRequestIsReceived.
@When("^a get M-Bus encryption key status by channel request is received$")
public void aGetMBusEncryptionKeyStatusByChannelRequestIsReceived(final Map<String, String> settings) throws Throwable {
final GetMbusEncryptionKeyStatusByChannelRequest request = GetMbusEncryptionKeyStatusByChannelRequestFactory.fromParameterMap(settings);
final GetMbusEncryptionKeyStatusByChannelAsyncResponse asyncResponse = this.smartMeterConfigurationClient.getMbusEncryptionKeyStatusByChannel(request);
assertThat(asyncResponse).as(OPERATION + ": Async response should not be null").isNotNull();
LOGGER.info(OPERATION + ": Async response is received {}", asyncResponse);
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION, asyncResponse.getDeviceIdentification());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequest in project open-smart-grid-platform by OSGP.
the class GetMbusEncryptionKeyStatusByChannelRequestFactory method fromParameterMap.
public static GetMbusEncryptionKeyStatusByChannelRequest fromParameterMap(final Map<String, String> requestParameters) {
final GetMbusEncryptionKeyStatusByChannelRequest request = new GetMbusEncryptionKeyStatusByChannelRequest();
final GetMbusEncryptionKeyStatusByChannelRequestData requestData = new GetMbusEncryptionKeyStatusByChannelRequestData();
request.setGatewayDeviceIdentification(requestParameters.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION));
requestData.setChannel(Short.parseShort(requestParameters.get(PlatformSmartmeteringKeys.KEY_CHANNEL)));
request.setGetMbusEncryptionKeyStatusByChannelRequestData(requestData);
return request;
}
Aggregations