]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor: use OCPP20RequiredVariableName for measurands in OCPP20ServiceUtils
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 13:20:30 +0000 (14:20 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 13:20:30 +0000 (14:20 +0100)
Replace StandardParametersKey with OCPP20RequiredVariableName for
TxStartedMeasurands and TxEndedMeasurands in buildTransaction*MeterValues.
Remove unused StandardParametersKey import.

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

index 4c6775fad7678a9239d8b646054383058e66598f..902021095439dabe7d27f0535bdbc055949e8194 100644 (file)
@@ -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,