Imports cleanup
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 8 Mar 2022 11:47:08 +0000 (12:47 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 8 Mar 2022 11:47:08 +0000 (12:47 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts

index 901276c363c192399d958eac1ea182e48e204a1d..659fc85a1063175d29aafa738268b96da69baeba 100644 (file)
@@ -21,7 +21,6 @@ import { ErrorType } from '../../../types/ocpp/ErrorType';
 import MeasurandValues from '../../../types/MeasurandValues';
 import { OCPP16RequestCommand } from '../../../types/ocpp/1.6/Requests';
 import OCPPError from '../../../exception/OCPPError';
-import { RequestCommand } from '../../../types/ocpp/Requests';
 import Utils from '../../../utils/Utils';
 import logger from '../../../utils/Logger';
 
@@ -35,13 +34,13 @@ export class OCPP16ServiceUtils {
         measurandType ?? OCPP16MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
       }: powerDivider is undefined`;
       logger.error(errMsg);
-      throw new OCPPError(ErrorType.INTERNAL_ERROR, errMsg, RequestCommand.METER_VALUES);
+      throw new OCPPError(ErrorType.INTERNAL_ERROR, errMsg, OCPP16RequestCommand.METER_VALUES);
     } else if (chargingStation.stationInfo?.powerDivider <= 0) {
       const errMsg = `${chargingStation.logPrefix()} MeterValues measurand ${
         measurandType ?? OCPP16MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
       }: powerDivider have zero or below value ${chargingStation.stationInfo.powerDivider}`;
       logger.error(errMsg);
-      throw new OCPPError(ErrorType.INTERNAL_ERROR, errMsg, RequestCommand.METER_VALUES);
+      throw new OCPPError(ErrorType.INTERNAL_ERROR, errMsg, OCPP16RequestCommand.METER_VALUES);
     }
   }