Search in sources :

Example 1 with GetMbusEncryptionKeyStatusByChannelRequest

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());
}
Also used : GetMbusEncryptionKeyStatusByChannelRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequest) GetMbusEncryptionKeyStatusByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse) When(io.cucumber.java.en.When)

Example 2 with GetMbusEncryptionKeyStatusByChannelRequest

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;
}
Also used : GetMbusEncryptionKeyStatusByChannelRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequest) GetMbusEncryptionKeyStatusByChannelRequestData(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequestData)

Aggregations

GetMbusEncryptionKeyStatusByChannelRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequest)2 When (io.cucumber.java.en.When)1 GetMbusEncryptionKeyStatusByChannelAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelAsyncResponse)1 GetMbusEncryptionKeyStatusByChannelRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetMbusEncryptionKeyStatusByChannelRequestData)1