]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor: cleanup GetBaseReport implementation feat/get-variables
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 22 Oct 2025 12:21:30 +0000 (14:21 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 22 Oct 2025 12:21:30 +0000 (14:21 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts

index 94935c8a261421051438e4ced852797d82355afe..489f6e95d581bacb9a8d4b0b8b3d79e02476d5bc 100644 (file)
@@ -528,13 +528,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
       `${chargingStation.logPrefix()} ${moduleName}.handleRequestGetBaseReport: GetBaseReport request received with requestId ${commandPayload.requestId} and reportBase ${commandPayload.reportBase}`
     )
 
-    const supportedReportBases = [
-      ReportBaseEnumType.ConfigurationInventory,
-      ReportBaseEnumType.FullInventory,
-      ReportBaseEnumType.SummaryInventory,
-    ]
-
-    if (!supportedReportBases.includes(commandPayload.reportBase)) {
+    if (!Object.values(ReportBaseEnumType).includes(commandPayload.reportBase)) {
       logger.warn(
         `${chargingStation.logPrefix()} ${moduleName}.handleRequestGetBaseReport: Unsupported reportBase ${commandPayload.reportBase}`
       )