refactor(simulator): rename checkTemplateFile() -> checkTemplate()
[e-mobility-charging-stations-simulator.git] / src / utils / Constants.ts
CommitLineData
268a74bb 1export class Constants {
7d34a2f4 2 static readonly DEFAULT_BOOT_NOTIFICATION_INTERVAL = 60000; // Ms
c3da35d4
JB
3 static readonly DEFAULT_HEARTBEAT_INTERVAL = 60000; // Ms
4 static readonly DEFAULT_METER_VALUES_INTERVAL = 60000; // Ms
d2a64eb5 5
10570d97 6 static readonly CHARGING_STATION_DEFAULT_RESET_TIME = 60000; // Ms
a4cc42ea 7 static readonly CHARGING_STATION_ATG_INITIALIZATION_TIME = 1000; // Ms
7d75bee1 8 static readonly CHARGING_STATION_ATG_DEFAULT_STOP_AFTER_HOURS = 0.25; // Hours
9ac86a7e 9
b25b8684 10 // See https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
3637ca2c
JB
11 static readonly SEMVER_PATTERN =
12 '^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$';
b25b8684 13
9a15316c 14 static readonly DEFAULT_CIRCULAR_BUFFER_CAPACITY = 1024;
1e080116 15
3f94cab5
JB
16 static readonly DEFAULT_HASH_ALGORITHM = 'sha384';
17
c69294f7 18 static readonly DEFAULT_IDTAG = '00000000';
3d2ff9e4 19
291cb255 20 static readonly DEFAULT_CONNECTION_TIMEOUT = 30;
9ccca265 21
25f5a959
JB
22 static readonly DEFAULT_LOG_STATISTICS_INTERVAL = 60; // Seconds
23
9ccca265 24 static readonly DEFAULT_FLUCTUATION_PERCENT = 5;
2a370053 25
a6b3c6c3 26 static readonly DEFAULT_PERFORMANCE_RECORDS_FILENAME = 'performanceRecords.json';
7f774a55 27 static readonly DEFAULT_PERFORMANCE_RECORDS_DB_NAME = 'e-mobility-charging-stations-simulator';
ae8ee665 28 static readonly PERFORMANCE_RECORDS_TABLE = 'performance_records';
6a49ad23 29
adbddcb4
JB
30 static readonly DEFAULT_UI_SERVER_HOST = 'localhost';
31 static readonly DEFAULT_UI_SERVER_PORT = 8080;
4db8406c 32
2a232a18
JB
33 static readonly UNKNOWN_COMMAND = 'unknown command';
34
59395dc1
JB
35 static readonly MAX_RANDOM_INTEGER = 281474976710654;
36
59b6ed8d
JB
37 static readonly EMPTY_FREEZED_OBJECT = Object.freeze({});
38 static readonly EMPTY_FUNCTION = Object.freeze(() => {
39 /* This is intentional */
40 });
41
4db8406c
JB
42 private constructor() {
43 // This is intentional
44 }
f7869514 45}