]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor: move debug param to last position in buildMeterValue
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 12:29:21 +0000 (13:29 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 12:29:21 +0000 (13:29 +0100)
Reorder buildMeterValue signature so debug is the last optional
parameter, consistent with all other validate*MeasurandValue functions.
Removes need to pass explicit false to reach measurandsKey and context.

src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
src/charging-station/ocpp/OCPPServiceUtils.ts

index d15b038dbd69c677e4ba323879b360e78f608eba..4c6775fad7678a9239d8b646054383058e66598f 100644 (file)
@@ -112,7 +112,6 @@ export class OCPP20ServiceUtils extends OCPPServiceUtils {
         chargingStation,
         transactionId,
         0,
-        false,
         measurandsKey,
         OCPP20ReadingContextEnumType.TRANSACTION_BEGIN
       ) as OCPP20MeterValue
@@ -752,7 +751,6 @@ export class OCPP20ServiceUtils extends OCPPServiceUtils {
         chargingStation,
         transactionId,
         0,
-        false,
         measurandsKey,
         OCPP20ReadingContextEnumType.TRANSACTION_END
       ) as OCPP20MeterValue
index 4f0f351863d344649fb8165c95958393672fefe0..517159c3f191675d9f194a106022dcbf1fb6df4b 100644 (file)
@@ -1577,9 +1577,9 @@ export const buildMeterValue = (
   chargingStation: ChargingStation,
   transactionId: number | string | undefined,
   interval: number,
-  debug = false,
   measurandsKey?: ConfigurationKeyType,
-  context?: MeterValueContext
+  context?: MeterValueContext,
+  debug = false
 ): MeterValue => {
   if (transactionId == null) {
     return buildEmptyMeterValue()