X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils%2FConstants.ts;h=d704c15ddff2a377c9d39a6ca553f5a0409b85c9;hb=6a4032b5d8f3cbaa18d3beddcdfe9d335c1cba90;hp=2a184016371efa766b3d633051a1a17c9ff951d2;hpb=3e888c6560f1a59e1d34f06d465e698305c90aea;p=e-mobility-charging-stations-simulator.git diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 2a184016..d704c15d 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -1,6 +1,36 @@ -import type { AutomaticTransactionGeneratorConfiguration } from '../types'; +import { + type AutomaticTransactionGeneratorConfiguration, + type ChargingStationInfo, + CurrentType, + OCPPVersion, + VendorParametersKey, +} from '../types'; export class Constants { + static readonly DEFAULT_STATION_INFO: Partial = Object.freeze({ + enableStatistics: false, + remoteAuthorization: true, + currentOutType: CurrentType.AC, + mainVoltageMeterValues: true, + phaseLineToLineVoltageMeterValues: false, + customValueLimitationMeterValues: true, + ocppStrictCompliance: true, + outOfOrderEndMeterValues: false, + beginEndMeterValues: false, + meteringPerTransaction: true, + transactionDataMeterValues: false, + supervisionUrlOcppConfiguration: false, + supervisionUrlOcppKey: VendorParametersKey.ConnectionUrl, + ocppVersion: OCPPVersion.VERSION_16, + ocppPersistentConfiguration: true, + stationInfoPersistentConfiguration: true, + automaticTransactionGeneratorPersistentConfiguration: true, + autoReconnectMaxRetries: -1, + registrationMaxRetries: -1, + reconnectExponentialDelay: false, + stopTransactionsOnStopped: true, + }); + static readonly DEFAULT_BOOT_NOTIFICATION_INTERVAL = 60000; // Ms static readonly DEFAULT_HEARTBEAT_INTERVAL = 60000; // Ms static readonly DEFAULT_METER_VALUES_INTERVAL = 60000; // Ms @@ -49,14 +79,14 @@ export class Constants { static readonly MAX_RANDOM_INTEGER = 281474976710654; - static readonly STOP_SIMULATOR_TIMEOUT = 120000; // Ms + static readonly STOP_CHARGING_STATIONS_TIMEOUT = 120000; // Ms static readonly EMPTY_FROZEN_OBJECT = Object.freeze({}); static readonly EMPTY_FUNCTION = Object.freeze(() => { /* This is intentional */ }); - static readonly DEFAULT_RESERVATION_EXPIRATION_INTERVAL = 60000; // Ms + static readonly DEFAULT_MESSAGE_BUFFER_FLUSH_INTERVAL = 60000; // Ms private constructor() { // This is intentional