From: Jérôme Benoit Date: Sat, 15 May 2021 16:32:32 +0000 (+0200) Subject: Make a constants name consistent. X-Git-Tag: v1.0.1-0~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bb3343f93c9a7ce03bfe9346c846ea2c3c4ee343;p=e-mobility-charging-stations-simulator.git Make a constants name consistent. Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index fe9d27f0..8e5c3ffa 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -62,7 +62,7 @@ export default class OCPP16RequestService extends OCPPRequestService { public async sendAuthorize(idTag?: string): Promise { try { const payload: AuthorizeRequest = { - ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_TAGID }, + ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_IDTAG }, }; return await this.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.AUTHORIZE) as OCPP16AuthorizeResponse; } catch (error) { @@ -74,7 +74,7 @@ export default class OCPP16RequestService extends OCPPRequestService { try { const payload: StartTransactionRequest = { connectorId, - ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_TAGID }, + ...!Utils.isUndefined(idTag) ? { idTag } : { idTag: Constants.TRANSACTION_DEFAULT_IDTAG }, meterStart: 0, timestamp: new Date().toISOString(), }; diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 6a1a7cfe..8b1df1ca 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -29,7 +29,7 @@ export default class Constants { static readonly CHARGING_STATION_ATG_WAIT_TIME = 2000; // Ms static readonly CHARGING_STATION_ATG_INITIALIZATION_TIME = 1000; // Ms - static readonly TRANSACTION_DEFAULT_TAGID = '00000000'; + static readonly TRANSACTION_DEFAULT_IDTAG = '00000000'; static readonly WORKER_START_DELAY = 500; static readonly WORKER_POOL_MAX_INACTIVE_TIME = 60000;