refactor: trivial cleanups
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 2.0 / OCPP20IncomingRequestService.ts
index 2d1ebd4dba73c1aa5367d4a6754b9b0e87833f9e..3fdb5cedf1b784c5b90c93706e05596557f0afe5 100644 (file)
@@ -2,6 +2,7 @@
 
 import type { JSONSchemaType } from 'ajv';
 
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
 import type { ChargingStation } from '../../../charging-station';
 import { OCPPError } from '../../../exception';
 import {
@@ -14,7 +15,7 @@ import {
   OCPPVersion,
 } from '../../../types';
 import { logger } from '../../../utils';
-import { OCPP20ServiceUtils, OCPPIncomingRequestService } from '../internal';
+import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
 
 const moduleName = 'OCPP20IncomingRequestService';
 
@@ -34,7 +35,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
       [
         OCPP20IncomingRequestCommand.CLEAR_CACHE,
         OCPP20ServiceUtils.parseJsonSchemaFile<OCPP20ClearCacheRequest>(
-          '../../../assets/json-schemas/ocpp/2.0/ClearCacheRequest.json',
+          'assets/json-schemas/ocpp/2.0/ClearCacheRequest.json',
           moduleName,
           'constructor'
         ),
@@ -56,7 +57,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
     let response: JsonType;
     if (
       chargingStation.getOcppStrictCompliance() === true &&
-      chargingStation.isInPendingState() === true &&
+      chargingStation.inPendingState() === true &&
       (commandName === OCPP20IncomingRequestCommand.REQUEST_START_TRANSACTION ||
         commandName === OCPP20IncomingRequestCommand.REQUEST_STOP_TRANSACTION)
     ) {
@@ -74,7 +75,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
     if (
       chargingStation.isRegistered() === true ||
       (chargingStation.getOcppStrictCompliance() === false &&
-        chargingStation.isInUnknownState() === true)
+        chargingStation.inUnknownState() === true)
     ) {
       if (
         this.incomingRequestHandlers.has(commandName) === true &&