summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
511c189)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
17 files changed:
import type { AutomaticTransactionGeneratorConfiguration } from '../types/AutomaticTransactionGenerator';
import type ChargingStationConfiguration from '../types/ChargingStationConfiguration';
import type ChargingStationInfo from '../types/ChargingStationInfo';
import type { AutomaticTransactionGeneratorConfiguration } from '../types/AutomaticTransactionGenerator';
import type ChargingStationConfiguration from '../types/ChargingStationConfiguration';
import type ChargingStationInfo from '../types/ChargingStationInfo';
-import type ChargingStationOcppConfiguration from '../types/ChargingStationOcppConfiguration';
+import type { ChargingStationOcppConfiguration } from '../types/ChargingStationOcppConfiguration';
import ChargingStationTemplate, {
CurrentType,
PowerUnits,
import ChargingStationTemplate, {
CurrentType,
PowerUnits,
import OCPPError from '../../../exception/OCPPError';
import { CurrentType, Voltage } from '../../../types/ChargingStationTemplate';
import OCPPError from '../../../exception/OCPPError';
import { CurrentType, Voltage } from '../../../types/ChargingStationTemplate';
-import type MeasurandPerPhaseSampledValueTemplates from '../../../types/MeasurandPerPhaseSampledValueTemplates';
-// eslint-disable-next-line no-duplicate-imports
-import type { SampledValueTemplate } from '../../../types/MeasurandPerPhaseSampledValueTemplates';
-import type MeasurandValues from '../../../types/MeasurandValues';
+import type {
+ MeasurandPerPhaseSampledValueTemplates,
+ SampledValueTemplate,
+} from '../../../types/MeasurandPerPhaseSampledValueTemplates';
+import type { MeasurandValues } from '../../../types/MeasurandValues';
import {
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
import {
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
import type { ChargingStationInfoConfiguration } from './ChargingStationInfo';
import type { ChargingStationInfoConfiguration } from './ChargingStationInfo';
-import type ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration';
+import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
export default interface ChargingStationConfiguration
extends ChargingStationInfoConfiguration,
export default interface ChargingStationConfiguration
extends ChargingStationInfoConfiguration,
maximumAmperage?: number; // Always in Ampere
}
maximumAmperage?: number; // Always in Ampere
}
-export interface ChargingStationInfoConfiguration {
+export type ChargingStationInfoConfiguration = {
stationInfo?: ChargingStationInfo;
stationInfo?: ChargingStationInfo;
-export default interface ChargingStationOcppConfiguration {
+export type ChargingStationOcppConfiguration = {
configurationKey?: ConfigurationKey[];
configurationKey?: ConfigurationKey[];
import type { ClientOptions } from 'ws';
import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
import type { ClientOptions } from 'ws';
import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
-import type ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration';
+import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
import type { ConnectorStatus } from './ConnectorStatus';
import type { OCPPProtocol } from './ocpp/OCPPProtocol';
import type { OCPPVersion } from './ocpp/OCPPVersion';
import type { ConnectorStatus } from './ConnectorStatus';
import type { OCPPProtocol } from './ocpp/OCPPProtocol';
import type { OCPPVersion } from './ocpp/OCPPVersion';
export type WsOptions = ClientOptions & ClientRequestArgs;
export type WsOptions = ClientOptions & ClientRequestArgs;
-interface CommandsSupport {
+type CommandsSupport = {
incomingCommands: Record<IncomingRequestCommand, boolean>;
outgoingCommands?: Record<RequestCommand, boolean>;
incomingCommands: Record<IncomingRequestCommand, boolean>;
outgoingCommands?: Record<RequestCommand, boolean>;
export default interface ChargingStationTemplate {
templateHash?: string;
export default interface ChargingStationTemplate {
templateHash?: string;
SEQUENTIAL = 'sequential',
}
SEQUENTIAL = 'sequential',
}
-export interface StationTemplateUrl {
+export type StationTemplateUrl = {
file: string;
numberOfStations: number;
file: string;
numberOfStations: number;
-export interface UIServerConfiguration {
+export type UIServerConfiguration = {
enabled?: boolean;
type?: ApplicationProtocol;
options?: ServerOptions;
enabled?: boolean;
type?: ApplicationProtocol;
options?: ServerOptions;
username?: string;
password?: string;
};
username?: string;
password?: string;
};
-export interface StorageConfiguration {
+export type StorageConfiguration = {
enabled?: boolean;
type?: StorageType;
uri?: string;
enabled?: boolean;
type?: StorageType;
uri?: string;
-export interface WorkerConfiguration {
+export type WorkerConfiguration = {
processType?: WorkerProcessType;
startDelay?: number;
elementsPerWorker?: number;
processType?: WorkerProcessType;
startDelay?: number;
elementsPerWorker?: number;
poolMinSize?: number;
poolMaxSize?: number;
poolStrategy?: WorkerChoiceStrategy;
poolMinSize?: number;
poolMaxSize?: number;
poolStrategy?: WorkerChoiceStrategy;
-export default interface ConfigurationData {
+export type ConfigurationData = {
supervisionUrls?: string | string[];
supervisionUrlDistribution?: SupervisionUrlDistribution;
stationTemplateUrls: StationTemplateUrl[];
supervisionUrls?: string | string[];
supervisionUrlDistribution?: SupervisionUrlDistribution;
stationTemplateUrls: StationTemplateUrl[];
logFile?: string;
logErrorFile?: string;
logConsole?: boolean;
logFile?: string;
logErrorFile?: string;
logConsole?: boolean;
import type { MeterValue } from './ocpp/MeterValues';
import type { AvailabilityType } from './ocpp/Requests';
import type { MeterValue } from './ocpp/MeterValues';
import type { AvailabilityType } from './ocpp/Requests';
-export interface ConnectorStatus {
+export type ConnectorStatus = {
availability: AvailabilityType;
bootStatus?: ChargePointStatus;
status?: ChargePointStatus;
availability: AvailabilityType;
bootStatus?: ChargePointStatus;
status?: ChargePointStatus;
transactionEnergyActiveImportRegisterValue?: number; // In Wh
transactionBeginMeterValue?: MeterValue;
chargingProfiles?: ChargingProfile[];
transactionEnergyActiveImportRegisterValue?: number; // In Wh
transactionBeginMeterValue?: MeterValue;
chargingProfiles?: ChargingProfile[];
-export interface HandleErrorParams<T> {
+export type HandleErrorParams<T> = {
throwError?: boolean;
consoleOut?: boolean;
errorResponse?: T;
throwError?: boolean;
consoleOut?: boolean;
errorResponse?: T;
fluctuationPercent?: number;
}
fluctuationPercent?: number;
}
-export default interface MeasurandPerPhaseSampledValueTemplates {
+export type MeasurandPerPhaseSampledValueTemplates = {
L1?: SampledValueTemplate;
L2?: SampledValueTemplate;
L3?: SampledValueTemplate;
L1?: SampledValueTemplate;
L2?: SampledValueTemplate;
L3?: SampledValueTemplate;
-export default interface MeasurandValues {
+export type MeasurandValues = {
L1: number;
L2: number;
L3: number;
allPhases: number;
L1: number;
L2: number;
L3: number;
allPhases: number;
import type { CircularArray } from '../utils/CircularArray';
import type { WorkerData } from './Worker';
import type { CircularArray } from '../utils/CircularArray';
import type { WorkerData } from './Worker';
-export interface TimeSeries {
+export type TimeSeries = {
timestamp: number;
value: number;
timestamp: number;
value: number;
-export interface StatisticsData {
+export type StatisticsData = {
countRequest: number;
countResponse: number;
countError: number;
countRequest: number;
countResponse: number;
countError: number;
medTimeMeasurement: number;
ninetyFiveThPercentileTimeMeasurement: number;
stdDevTimeMeasurement: number;
medTimeMeasurement: number;
ninetyFiveThPercentileTimeMeasurement: number;
stdDevTimeMeasurement: number;
export default interface Statistics extends WorkerData {
id: string;
export default interface Statistics extends WorkerData {
id: string;
STATIC_POOL = 'staticPool',
}
STATIC_POOL = 'staticPool',
}
-export interface WorkerOptions {
+export type WorkerOptions = {
workerStartDelay?: number;
elementStartDelay?: number;
poolMaxSize?: number;
workerStartDelay?: number;
elementStartDelay?: number;
poolMaxSize?: number;
elementsPerWorker?: number;
poolOptions?: PoolOptions<Worker>;
messageHandler?: (message: unknown) => void | Promise<void>;
elementsPerWorker?: number;
poolOptions?: PoolOptions<Worker>;
messageHandler?: (message: unknown) => void | Promise<void>;
export type WorkerData = Record<string, unknown>;
export type WorkerData = Record<string, unknown>;
-export interface WorkerSetElement {
+export type WorkerSetElement = {
worker: Worker;
numberOfWorkerElements: number;
worker: Worker;
numberOfWorkerElements: number;
-export interface WorkerMessage<T extends WorkerData> {
+export type WorkerMessage<T extends WorkerData> = {
id: WorkerMessageEvents;
data: T;
id: WorkerMessageEvents;
data: T;
export enum WorkerMessageEvents {
START_WORKER_ELEMENT = 'startWorkerElement',
export enum WorkerMessageEvents {
START_WORKER_ELEMENT = 'startWorkerElement',
export type OutgoingRequest = [MessageType.CALL_MESSAGE, string, RequestCommand, JsonType];
export type OutgoingRequest = [MessageType.CALL_MESSAGE, string, RequestCommand, JsonType];
-export interface RequestParams {
+export type RequestParams = {
skipBufferingOnError?: boolean;
triggerMessage?: boolean;
skipBufferingOnError?: boolean;
triggerMessage?: boolean;
export type IncomingRequestCommand = OCPP16IncomingRequestCommand;
export type IncomingRequestCommand = OCPP16IncomingRequestCommand;
-export interface DefaultResponse {
+export type DefaultResponse = {
export type RegistrationStatus = OCPP16RegistrationStatus;
export type RegistrationStatus = OCPP16RegistrationStatus;
-export interface BaseConfig {
+export type BaseConfig = {
uiServer: UIServerConfig;
uiServer: UIServerConfig;
-interface UIServerConfig {
host: string;
port: number;
protocol: string;
username?: string;
password?: string;
host: string;
port: number;
protocol: string;
username?: string;
password?: string;
import chalk from 'chalk';
import chalk from 'chalk';
-import ConfigurationData, {
- StationTemplateUrl,
- StorageConfiguration,
+import {
+ type ConfigurationData,
+ type StationTemplateUrl,
+ type StorageConfiguration,
SupervisionUrlDistribution,
SupervisionUrlDistribution,
- UIServerConfiguration,
- WorkerConfiguration,
+ type UIServerConfiguration,
+ type WorkerConfiguration,
} from '../types/ConfigurationData';
import type { EmptyObject } from '../types/EmptyObject';
import type { HandleErrorParams } from '../types/Error';
} from '../types/ConfigurationData';
import type { EmptyObject } from '../types/EmptyObject';
import type { HandleErrorParams } from '../types/Error';