From 65b5177e252fab95766ef8141e60e0b2434f2338 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 20 Jan 2024 20:30:20 +0100 Subject: [PATCH] refactor: remove unneeded binding MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../ocpp/1.6/OCPP16ResponseService.ts | 11 ++++------- .../ocpp/2.0/OCPP20ResponseService.ts | 7 ++----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index b8fce37c..5ceeb38a 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -75,7 +75,7 @@ export class OCPP16ResponseService extends OCPPResponseService { OCPP16RequestCommand.BOOT_NOTIFICATION, this.handleResponseBootNotification.bind(this) as ResponseHandler ], - [OCPP16RequestCommand.HEARTBEAT, this.emptyResponseHandler.bind(this) as ResponseHandler], + [OCPP16RequestCommand.HEARTBEAT, this.emptyResponseHandler], [OCPP16RequestCommand.AUTHORIZE, this.handleResponseAuthorize.bind(this) as ResponseHandler], [ OCPP16RequestCommand.START_TRANSACTION, @@ -89,16 +89,13 @@ export class OCPP16ResponseService extends OCPPResponseService { OCPP16RequestCommand.STATUS_NOTIFICATION, this.emptyResponseHandler.bind(this) as ResponseHandler ], - [OCPP16RequestCommand.METER_VALUES, this.emptyResponseHandler.bind(this) as ResponseHandler], + [OCPP16RequestCommand.METER_VALUES, this.emptyResponseHandler], [ OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION, this.emptyResponseHandler.bind(this) as ResponseHandler ], - [OCPP16RequestCommand.DATA_TRANSFER, this.emptyResponseHandler.bind(this) as ResponseHandler], - [ - OCPP16RequestCommand.FIRMWARE_STATUS_NOTIFICATION, - this.emptyResponseHandler.bind(this) as ResponseHandler - ] + [OCPP16RequestCommand.DATA_TRANSFER, this.emptyResponseHandler], + [OCPP16RequestCommand.FIRMWARE_STATUS_NOTIFICATION, this.emptyResponseHandler] ]) this.jsonSchemas = new Map>([ [ diff --git a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts index 28c61265..ee4b201f 100644 --- a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts +++ b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts @@ -43,11 +43,8 @@ export class OCPP20ResponseService extends OCPPResponseService { OCPP20RequestCommand.BOOT_NOTIFICATION, this.handleResponseBootNotification.bind(this) as ResponseHandler ], - [OCPP20RequestCommand.HEARTBEAT, this.emptyResponseHandler.bind(this) as ResponseHandler], - [ - OCPP20RequestCommand.STATUS_NOTIFICATION, - this.emptyResponseHandler.bind(this) as ResponseHandler - ] + [OCPP20RequestCommand.HEARTBEAT, this.emptyResponseHandler], + [OCPP20RequestCommand.STATUS_NOTIFICATION, this.emptyResponseHandler] ]) this.jsonSchemas = new Map>([ [ -- 2.34.1