From c7f95d1604f9d7b10b3f7b82912eb8a2b1d24bc1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 13 Aug 2021 23:33:34 +0200 Subject: [PATCH] Change OCPP classes methods scope to protected MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/OCPPIncomingRequestService.ts | 2 +- src/charging-station/ocpp/OCPPRequestService.ts | 2 +- src/utils/Constants.ts | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) 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 }); -- 2.34.1