use of ocpp.cs._2015._10.StartTransactionResponse in project steve by RWTH-i5-IDSG.
the class CentralSystemService16_Service method startTransaction.
public StartTransactionResponse startTransaction(StartTransactionRequest parameters, String chargeBoxIdentity) {
InsertTransactionParams params = InsertTransactionParams.builder().chargeBoxId(chargeBoxIdentity).connectorId(parameters.getConnectorId()).idTag(parameters.getIdTag()).startTimestamp(parameters.getTimestamp()).startMeterValue(Integer.toString(parameters.getMeterStart())).reservationId(parameters.getReservationId()).build();
Integer transactionId = ocppServerRepository.insertTransaction(params);
IdTagInfo info = ocppTagService.getIdTagInfo(parameters.getIdTag());
return new StartTransactionResponse().withIdTagInfo(info).withTransactionId(transactionId);
}
Aggregations