Search in sources :

Example 1 with CoupleMbusDeviceByChannelRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequest in project open-smart-grid-platform by OSGP.

the class CoupleMbusDeviceByChannelRequestFactory method fromSettings.

public static CoupleMbusDeviceByChannelRequest fromSettings(final Map<String, String> settings) {
    final CoupleMbusDeviceByChannelRequest request = new CoupleMbusDeviceByChannelRequest();
    final CoupleMbusDeviceByChannelRequestData requestData = new CoupleMbusDeviceByChannelRequestData();
    requestData.setChannel(Short.valueOf(settings.get(PlatformKeys.KEY_CHANNEL)));
    request.setCoupleMbusDeviceByChannelRequestData(requestData);
    request.setDeviceIdentification(settings.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION));
    return request;
}
Also used : CoupleMbusDeviceByChannelRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequest) CoupleMbusDeviceByChannelRequestData(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequestData)

Example 2 with CoupleMbusDeviceByChannelRequest

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequest in project open-smart-grid-platform by OSGP.

the class CoupleDeviceSteps method theCoupleMBusDeviceByChannelRequestIsReceived.

@When("^the Couple M-Bus Device By Channel request is received$")
public void theCoupleMBusDeviceByChannelRequestIsReceived(final Map<String, String> settings) throws Throwable {
    final CoupleMbusDeviceByChannelRequest request = CoupleMbusDeviceByChannelRequestFactory.fromSettings(settings);
    final CoupleMbusDeviceByChannelAsyncResponse asyncResponse = this.smartMeteringInstallationClient.coupleMbusDeviceByChannel(request);
    this.checkAndSaveCorrelationId(asyncResponse.getCorrelationUid());
}
Also used : CoupleMbusDeviceByChannelRequest(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequest) CoupleMbusDeviceByChannelAsyncResponse(org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelAsyncResponse) When(io.cucumber.java.en.When)

Aggregations

CoupleMbusDeviceByChannelRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequest)2 When (io.cucumber.java.en.When)1 CoupleMbusDeviceByChannelAsyncResponse (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelAsyncResponse)1 CoupleMbusDeviceByChannelRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.CoupleMbusDeviceByChannelRequestData)1