use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionGasAsyncResponse in project open-smart-grid-platform by OSGP.
the class GetFirmwareVersion method theGetFirmwareVersionGasRequestIsReceived.
@When("^the get firmware version gas request is received$")
public void theGetFirmwareVersionGasRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final GetFirmwareVersionGasRequest gasRequest = GetFirmwareVersionGasRequestFactory.fromParameterMap(requestData);
final GetFirmwareVersionGasAsyncResponse gasAsyncResponse = this.smartMeteringConfigurationClient.getFirmwareVersionGas(gasRequest);
assertThat(gasAsyncResponse).as("Get firmware version gas asyncResponse should not be null").isNotNull();
log.info("Get firmware version gas asyncResponse is received {}", gasAsyncResponse);
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, gasAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GetFirmwareVersionGasAsyncResponse in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method getFirmwareVersionGas.
@PayloadRoot(localPart = "GetFirmwareVersionGasRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetFirmwareVersionGasAsyncResponse getFirmwareVersionGas(@OrganisationIdentification final String organisationIdentification, @RequestPayload final GetFirmwareVersionGasRequest request, @MessagePriority final String messagePriority, @ScheduleTime final String scheduleTime, @ResponseUrl final String responseUrl, @BypassRetry final String bypassRetry) throws OsgpException {
final RequestMessageMetadata requestMessageMetadata = RequestMessageMetadata.newBuilder().withOrganisationIdentification(organisationIdentification).withDeviceIdentification(request.getDeviceIdentification()).withDeviceFunction(DeviceFunction.GET_FIRMWARE_VERSION).withMessageType(MessageType.GET_FIRMWARE_VERSION).withMessagePriority(messagePriority).withScheduleTime(scheduleTime).withBypassRetry(bypassRetry).build();
final AsyncResponse asyncResponse = this.requestService.enqueueAndSendRequest(requestMessageMetadata, new GetFirmwareVersionQuery(true));
this.saveResponseUrlIfNeeded(asyncResponse.getCorrelationUid(), responseUrl);
return this.configurationMapper.map(asyncResponse, GetFirmwareVersionGasAsyncResponse.class);
}
Aggregations