Search in sources :

Example 1 with InsertTransactionParams

use of de.rwth.idsg.steve.repository.dto.InsertTransactionParams 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);
}
Also used : InsertTransactionParams(de.rwth.idsg.steve.repository.dto.InsertTransactionParams) IdTagInfo(ocpp.cs._2015._10.IdTagInfo) StartTransactionResponse(ocpp.cs._2015._10.StartTransactionResponse)

Aggregations

InsertTransactionParams (de.rwth.idsg.steve.repository.dto.InsertTransactionParams)1 IdTagInfo (ocpp.cs._2015._10.IdTagInfo)1 StartTransactionResponse (ocpp.cs._2015._10.StartTransactionResponse)1