X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcharging-station%2Focpp%2F1.6%2FOCPP16ResponseService.ts;h=1bcce7055b6814d4de4c7344f6b35d2757b9d2ea;hb=ccb1d6e97cc0248cd96a9505cf5e8f037d66984c;hp=c4e7eef879993860e5f94cff257cf6e3150115ff;hpb=08f130a055123f5e47c59e1a64875f8cff44d020;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index c4e7eef8..1bcce705 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -25,6 +25,7 @@ import { } from '../../../types/ocpp/1.6/MeterValues'; import type ChargingStation from '../../ChargingStation'; +import { ChargingStationConfigurationUtils } from '../../ChargingStationConfigurationUtils'; import { ErrorType } from '../../../types/ocpp/ErrorType'; import { JsonType } from '../../../types/JsonType'; import { OCPP16ChargePointErrorCode } from '../../../types/ocpp/1.6/ChargePointErrorCode'; @@ -102,13 +103,15 @@ export default class OCPP16ResponseService extends OCPPResponseService { payload: OCPP16BootNotificationResponse ): void { if (payload.status === OCPP16RegistrationStatus.ACCEPTED) { - chargingStation.addConfigurationKey( + ChargingStationConfigurationUtils.addConfigurationKey( + chargingStation, OCPP16StandardParametersKey.HeartbeatInterval, payload.interval.toString(), {}, { overwrite: true, save: true } ); - chargingStation.addConfigurationKey( + ChargingStationConfigurationUtils.addConfigurationKey( + chargingStation, OCPP16StandardParametersKey.HeartBeatInterval, payload.interval.toString(), { visible: false }, @@ -334,9 +337,11 @@ export default class OCPP16ResponseService extends OCPPResponseService { if (chargingStation.stationInfo.powerSharedByConnectors) { chargingStation.stationInfo.powerDivider++; } - const configuredMeterValueSampleInterval = chargingStation.getConfigurationKey( - OCPP16StandardParametersKey.MeterValueSampleInterval - ); + const configuredMeterValueSampleInterval = + ChargingStationConfigurationUtils.getConfigurationKey( + chargingStation, + OCPP16StandardParametersKey.MeterValueSampleInterval + ); chargingStation.startMeterValues( connectorId, configuredMeterValueSampleInterval