Do not throw an error at OCPP message sending to avoid crashing the
[e-mobility-charging-stations-simulator.git] / src / types / ConfigurationData.ts
CommitLineData
6a49ad23 1import { ServerOptions } from 'ws';
72f041bd 2import { StorageType } from './Storage';
9efbac5b 3import type { WorkerChoiceStrategy } from 'poolifier';
a4624c96
JB
4import { WorkerProcessType } from './Worker';
5
2dcfe98e
JB
6export enum SupervisionUrlDistribution {
7 ROUND_ROBIN = 'round-robin',
8 RANDOM = 'random',
9 SEQUENTIAL = 'sequential',
10}
11
1f5df42a 12export interface StationTemplateUrl {
e118beaa
JB
13 file: string;
14 numberOfStations: number;
15}
16
6a49ad23
JB
17export interface UIWebSocketServerConfiguration {
18 enabled?: boolean;
19 options?: ServerOptions;
20}
21
72f041bd
JB
22export interface StorageConfiguration {
23 enabled?: boolean;
24 type?: StorageType;
1f5df42a 25 uri?: string;
72f041bd
JB
26}
27
e118beaa 28export default interface ConfigurationData {
2dcfe98e
JB
29 supervisionUrls?: string | string[];
30 supervisionUrlDistribution?: SupervisionUrlDistribution;
1f5df42a 31 stationTemplateUrls: StationTemplateUrl[];
6a49ad23 32 uiWebSocketServer?: UIWebSocketServerConfiguration;
72f041bd 33 performanceStorage?: StorageConfiguration;
e118beaa 34 autoReconnectMaxRetries?: number;
a4624c96 35 workerProcess?: WorkerProcessType;
322c9192 36 workerStartDelay?: number;
a4624c96 37 workerPoolMinSize?: number;
4fa59b8a 38 workerPoolMaxSize?: number;
9efbac5b 39 workerPoolStrategy?: WorkerChoiceStrategy;
5fdab605 40 chargingStationsPerWorker?: number;
72f041bd 41 logStatisticsInterval?: number;
e118beaa 42 logFormat?: string;
324fd4ee 43 logLevel?: string;
6bf6769e
JB
44 logRotate?: boolean;
45 logMaxFiles?: number;
e118beaa 46 logFile?: string;
7ec46a9a
JB
47 logErrorFile?: string;
48 logConsole?: boolean;
e118beaa 49}