From: Jérôme Benoit Date: Fri, 13 Aug 2021 21:33:34 +0000 (+0200) Subject: Change OCPP classes methods scope to protected X-Git-Tag: v1.0.34~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c7f95d1604f9d7b10b3f7b82912eb8a2b1d24bc1;p=e-mobility-charging-stations-simulator.git Change OCPP classes methods scope to protected Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPIncomingRequestService.ts b/src/charging-station/ocpp/OCPPIncomingRequestService.ts index ff2dfd4c..6f91ead0 100644 --- a/src/charging-station/ocpp/OCPPIncomingRequestService.ts +++ b/src/charging-station/ocpp/OCPPIncomingRequestService.ts @@ -9,7 +9,7 @@ export default abstract class OCPPIncomingRequestService { this.chargingStation = chargingStation; } - public handleIncomingRequestError(commandName: IncomingRequestCommand, error: Error, ocppResponse?): unknown { + protected handleIncomingRequestError(commandName: IncomingRequestCommand, error: Error, ocppResponse?): unknown { logger.error(this.chargingStation.logPrefix() + ' Incoming request command ' + commandName + ' error: %j', error); if (ocppResponse) { return ocppResponse; diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 6c24665a..ccc6fc2b 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -106,7 +106,7 @@ export default abstract class OCPPRequestService { }); } - public handleRequestError(commandName: RequestCommand, error: Error): void { + protected handleRequestError(commandName: RequestCommand, error: Error): void { logger.error(this.chargingStation.logPrefix() + ' Request command ' + commandName + ' error: %j', error); throw error; } diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 9327b988..d497628a 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -3,9 +3,6 @@ import { AvailabilityStatus, ChargingProfileStatus, ClearChargingProfileStatus, import { MeterValueMeasurand } from '../types/ocpp/MeterValues'; export default class Constants { - static readonly ENTITY_CHARGING_STATION = 'ChargingStation'; - static readonly ENTITY_AUTOMATIC_TRANSACTION_GENERATOR = 'AutomaticTransactionGenerator'; - static readonly OCPP_RESPONSE_EMPTY = Object.freeze({}); static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: DefaultStatus.ACCEPTED }); static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: DefaultStatus.REJECTED });