OCPP: separate 1.6 code from global one
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 1.6 / OCPP16ResponseService.ts
index 89f8ffd076a43f9e646f8c93549940cdd081cbe1..041122c5fffd2880045860597092e03a0b82814b 100644 (file)
@@ -38,6 +38,7 @@ import {
 } from '../../../types/ocpp/1.6/Transaction';
 import { ErrorType } from '../../../types/ocpp/ErrorType';
 import type { ResponseHandler } from '../../../types/ocpp/Responses';
+import Constants from '../../../utils/Constants';
 import logger from '../../../utils/Logger';
 import Utils from '../../../utils/Utils';
 import type ChargingStation from '../../ChargingStation';
@@ -177,7 +178,7 @@ export default class OCPP16ResponseService extends OCPPResponseService {
     if (chargingStation.isRegistered() || commandName === OCPP16RequestCommand.BOOT_NOTIFICATION) {
       if (
         this.responseHandlers.has(commandName) &&
-        ChargingStationUtils.isRequestCommandSupported(commandName, chargingStation)
+        OCPP16ServiceUtils.isRequestCommandSupported(commandName, chargingStation)
       ) {
         try {
           this.validatePayload(chargingStation, commandName, payload);
@@ -485,7 +486,7 @@ export default class OCPP16ResponseService extends OCPPResponseService {
         connectorId,
         configuredMeterValueSampleInterval
           ? Utils.convertToInt(configuredMeterValueSampleInterval.value) * 1000
-          : 60000
+          : Constants.DEFAULT_METER_VALUES_INTERVAL
       );
     } else {
       logger.warn(