import OCPPError from '../exception/OCPPError';
import PerformanceStatistics from '../performance/PerformanceStatistics';
import type { AutomaticTransactionGeneratorConfiguration } from '../types/AutomaticTransactionGenerator';
-import type ChargingStationConfiguration from '../types/ChargingStationConfiguration';
-import type ChargingStationInfo from '../types/ChargingStationInfo';
+import type { ChargingStationConfiguration } from '../types/ChargingStationConfiguration';
+import type { ChargingStationInfo } from '../types/ChargingStationInfo';
import type { ChargingStationOcppConfiguration } from '../types/ChargingStationOcppConfiguration';
-import ChargingStationTemplate, {
+import {
+ type ChargingStationTemplate,
CurrentType,
PowerUnits,
- WsOptions,
+ type WsOptions,
} from '../types/ChargingStationTemplate';
import { SupervisionUrlDistribution } from '../types/ConfigurationData';
import type { ConnectorStatus } from '../types/ConnectorStatus';
import moment from 'moment';
import BaseError from '../exception/BaseError';
-import type ChargingStationInfo from '../types/ChargingStationInfo';
-import ChargingStationTemplate, {
+import type { ChargingStationInfo } from '../types/ChargingStationInfo';
+import {
AmpereUnits,
+ type ChargingStationTemplate,
CurrentType,
Voltage,
} from '../types/ChargingStationTemplate';
import { StandardParametersKey } from '../types/ocpp/Configuration';
import { MeterValueMeasurand, MeterValuePhase } from '../types/ocpp/MeterValues';
import {
- BootNotificationRequest,
+ type BootNotificationRequest,
IncomingRequestCommand,
RequestCommand,
} from '../types/ocpp/Requests';
import LRUCache from 'mnemonist/lru-map-with-delete';
-import type ChargingStationConfiguration from '../types/ChargingStationConfiguration';
-import type ChargingStationTemplate from '../types/ChargingStationTemplate';
+import type { ChargingStationConfiguration } from '../types/ChargingStationConfiguration';
+import type { ChargingStationTemplate } from '../types/ChargingStationTemplate';
import Utils from '../utils/Utils';
enum CacheType {
skippedConsecutiveTransactions?: number;
skippedTransactions?: number;
};
+
+export type ChargingStationAutomaticTransactionGeneratorConfiguration = {
+ automaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
+ automaticTransactionGeneratorStatus?: Status;
+};
+import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
import type { ChargingStationInfoConfiguration } from './ChargingStationInfo';
import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
-export default interface ChargingStationConfiguration
- extends ChargingStationInfoConfiguration,
- ChargingStationOcppConfiguration {
- configurationHash?: string;
-}
+export type ChargingStationConfiguration = ChargingStationInfoConfiguration &
+ ChargingStationOcppConfiguration &
+ ChargingStationAutomaticTransactionGeneratorConfiguration & {
+ configurationHash?: string;
+ };
-import type ChargingStationTemplate from './ChargingStationTemplate';
+import type { ChargingStationTemplate } from './ChargingStationTemplate';
-export default interface ChargingStationInfo
+export interface ChargingStationInfo
extends Omit<
ChargingStationTemplate,
| 'AutomaticTransactionGenerator'
outgoingCommands?: Record<RequestCommand, boolean>;
};
-export default interface ChargingStationTemplate {
+export type ChargingStationTemplate = {
templateHash?: string;
supervisionUrls?: string | string[];
supervisionUrlOcppConfiguration?: boolean;
Configuration?: ChargingStationOcppConfiguration;
AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
Connectors: Record<string, ConnectorStatus>;
-}
+};
import type { Status } from './AutomaticTransactionGenerator';
-import type ChargingStationInfo from './ChargingStationInfo';
+import type { ChargingStationInfo } from './ChargingStationInfo';
import type { ConnectorStatus } from './ConnectorStatus';
import type { JsonObject } from './JsonType';
import type { BootNotificationResponse } from './ocpp/Responses';