From: Jérôme Benoit Date: Sun, 12 Feb 2023 15:07:55 +0000 (+0100) Subject: refactor(simulator): add control over the OCPP stack exports X-Git-Tag: v1.1.95~71 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=368a6eda4a2cb8f8f6daaf44fb029fa18bfdbff4;p=e-mobility-charging-stations-simulator.git refactor(simulator): add control over the OCPP stack exports Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 0118f3d1..c74daceb 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -15,16 +15,18 @@ import { ChargingStationConfigurationUtils } from './ChargingStationConfiguratio import { ChargingStationUtils } from './ChargingStationUtils'; import { ChargingStationWorkerBroadcastChannel } from './ChargingStationWorkerBroadcastChannel'; import { MessageChannelUtils } from './MessageChannelUtils'; -import { OCPP16IncomingRequestService } from './ocpp/1.6/OCPP16IncomingRequestService'; -import { OCPP16RequestService } from './ocpp/1.6/OCPP16RequestService'; -import { OCPP16ResponseService } from './ocpp/1.6/OCPP16ResponseService'; -import { OCPP16ServiceUtils } from './ocpp/1.6/OCPP16ServiceUtils'; -import { OCPP20IncomingRequestService } from './ocpp/2.0/OCPP20IncomingRequestService'; -import { OCPP20RequestService } from './ocpp/2.0/OCPP20RequestService'; -import { OCPP20ResponseService } from './ocpp/2.0/OCPP20ResponseService'; -import type { OCPPIncomingRequestService } from './ocpp/OCPPIncomingRequestService'; -import type { OCPPRequestService } from './ocpp/OCPPRequestService'; -import { OCPPServiceUtils } from './ocpp/OCPPServiceUtils'; +import { + OCPP16IncomingRequestService, + OCPP16RequestService, + OCPP16ResponseService, + OCPP16ServiceUtils, + OCPP20IncomingRequestService, + OCPP20RequestService, + OCPP20ResponseService, + type OCPPIncomingRequestService, + type OCPPRequestService, + OCPPServiceUtils, +} from './ocpp'; import { SharedLRUCache } from './SharedLRUCache'; import { BaseError, OCPPError } from '../exception'; import { PerformanceStatistics } from '../performance/PerformanceStatistics'; diff --git a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts index 6ffa0f14..1a2943a7 100644 --- a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts +++ b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts @@ -1,6 +1,6 @@ import type { ChargingStation } from './ChargingStation'; import { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils'; -import { OCPP16ServiceUtils } from './ocpp/1.6/OCPP16ServiceUtils'; +import { OCPP16ServiceUtils } from './ocpp'; import { WorkerBroadcastChannel } from './WorkerBroadcastChannel'; import { BaseError, type OCPPError } from '../exception'; import { diff --git a/src/charging-station/ocpp/index.ts b/src/charging-station/ocpp/index.ts new file mode 100644 index 00000000..a0634d19 --- /dev/null +++ b/src/charging-station/ocpp/index.ts @@ -0,0 +1,11 @@ +export * from './OCPPIncomingRequestService'; +export * from './OCPPRequestService'; +export * from './OCPPServiceUtils'; +export * from './1.6/OCPP16IncomingRequestService'; +export * from './1.6/OCPP16RequestService'; +export * from './1.6/OCPP16ResponseService'; +// FIXME: shall not be exported +export * from './1.6/OCPP16ServiceUtils'; +export * from './2.0/OCPP20IncomingRequestService'; +export * from './2.0/OCPP20RequestService'; +export * from './2.0/OCPP20ResponseService';