Renamed carSoc to carStateOfCharge
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
"type": "string",
"example": ""
},
- "carSoc": {
+ "carStateOfCharge": {
"type": "integer",
"example": ""
},

MODIFY
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action-transaction-start.json
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action-transaction-start.json
"carID": {
"$ref": "common#/definitions/id"
},
- "carSoc": {
+ "carStateOfCharge": {
"type": "integer",
"sanitize": "mongo",
"minimum": 1,

MODIFY
src/server/ocpp/services/OCPPService.ts
src/server/ocpp/services/OCPPService.ts
@@ -1654,7 +1654,7 @@ export default class OCPPService {
if (user.startTransactionData?.lastSelectedCar &&
user.startTransactionData.lastChangedOn?.getTime() + 5 * 60 * 1000 > Date.now()) {
transaction.carID = user.startTransactionData.lastSelectedCarID;
- transaction.carSoc = user.startTransactionData.lastCarSoc;
+ transaction.carStateOfCharge = user.startTransactionData.lastCarStateOfCharge;
transaction.carOdometer = user.startTransactionData.lastCarOdometer;
transaction.departureTime = user.startTransactionData.lastDepartureTime;
} else {
@@ -1679,7 +1679,7 @@ export default class OCPPService {
lastChangedOn: null,
lastSelectedCarID: null,
lastSelectedCar: false,
- lastCarSoc: null,
+ lastCarStateOfCharge: null,
lastCarOdometer: null,
lastDepartureTime: null
});

MODIFY
src/server/rest/v1/service/ChargingStationService.ts
src/server/rest/v1/service/ChargingStationService.ts
@@ -1800,7 +1800,7 @@ export default class ChargingStationService {
lastChangedOn: new Date(),
lastSelectedCarID: filteredRequest.carID,
lastSelectedCar: true,
- lastCarSoc: filteredRequest.carSoc,
+ lastCarStateOfCharge: filteredRequest.carStateOfCharge,
lastCarOdometer: filteredRequest.carOdometer,
lastDepartureTime: filteredRequest.departureTime
});

MODIFY
src/storage/mongodb/TransactionStorage.ts
src/storage/mongodb/TransactionStorage.ts
@@ -56,7 +56,7 @@ export default class TransactionStorage {
tagID: transactionToSave.tagID,
carID: transactionToSave.carID ? DatabaseUtils.convertToObjectID(transactionToSave.carID) : null,
carCatalogID: transactionToSave.carCatalogID ? Utils.convertToInt(transactionToSave.carCatalogID) : null,
- carSoc: Utils.convertToInt(transactionToSave.carSoc),
+ carStateOfCharge: Utils.convertToInt(transactionToSave.carStateOfCharge),
carOdometer: Utils.convertToInt(transactionToSave.carOdometer),
departureTime: Utils.convertToDate(transactionToSave.departureTime),
userID: DatabaseUtils.convertToObjectID(transactionToSave.userID),

MODIFY
src/types/Transaction.ts
src/types/Transaction.ts
@@ -55,7 +55,7 @@ export default interface Transaction extends AbstractCurrentConsumption {
car?: Car;
carCatalogID?: number;
carCatalog?: CarCatalog;
- carSoc?: number;
+ carStateOfCharge?: number;
carOdometer?: number;
departureTime?: Date;
phasesUsed?: CSPhasesUsed;

MODIFY
src/types/User.ts
src/types/User.ts
@@ -49,7 +49,7 @@ export interface StartTransactionUserData {
lastChangedOn: Date;
lastSelectedCarID: string;
lastSelectedCar: boolean;
- lastCarSoc: number;
+ lastCarStateOfCharge: number;
lastCarOdometer: number;
lastDepartureTime: Date;
}

MODIFY
src/types/requests/HttpChargingStationRequest.ts
src/types/requests/HttpChargingStationRequest.ts
@@ -150,7 +150,7 @@ export interface HttpChargingStationReservationCancelRequest {
export interface HttpChargingStationStartTransactionRequest extends HttpChargingStationCommandRequest {
carID?: string,
userID?: string,
- carSoc?: number,
+ carStateOfCharge?: number,
carOdometer?: number,
departureTime?: Date,
args: {

Renamed carSoc to carStateOfCharge