From: Jérôme Benoit Date: Sat, 28 Mar 2026 13:20:30 +0000 (+0100) Subject: refactor: use OCPP20RequiredVariableName for measurands in OCPP20ServiceUtils X-Git-Tag: ocpp-server@v4.0.0~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=811f1428da6d747dcc7555d1bd99dc2ac38afce5;p=e-mobility-charging-stations-simulator.git refactor: use OCPP20RequiredVariableName for measurands in OCPP20ServiceUtils Replace StandardParametersKey with OCPP20RequiredVariableName for TxStartedMeasurands and TxEndedMeasurands in buildTransaction*MeterValues. Remove unused StandardParametersKey import. --- diff --git a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts index 4c6775fa..90202109 100644 --- a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts +++ b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts @@ -25,7 +25,6 @@ import { OCPP20TriggerReasonEnumType, OCPPVersion, ReasonCodeEnumType, - StandardParametersKey, type UUIDv4, } from '../../../types/index.js' import { @@ -106,7 +105,7 @@ export class OCPP20ServiceUtils extends OCPPServiceUtils { try { const measurandsKey = buildConfigKey( OCPP20ComponentName.SampledDataCtrlr, - StandardParametersKey.TxStartedMeasurands + OCPP20RequiredVariableName.TxStartedMeasurands ) const meterValue = buildMeterValue( chargingStation, @@ -745,7 +744,7 @@ export class OCPP20ServiceUtils extends OCPPServiceUtils { try { const measurandsKey = buildConfigKey( OCPP20ComponentName.SampledDataCtrlr, - StandardParametersKey.TxEndedMeasurands + OCPP20RequiredVariableName.TxEndedMeasurands ) const meterValue = buildMeterValue( chargingStation,