Commit | Line | Data |
---|---|---|
edf4bd64 | 1 | import { AvailabilityStatus, ChargingProfileStatus, ClearChargingProfileStatus, ConfigurationStatus, DefaultStatus, UnlockStatus } from '../types/ocpp/1.6/RequestResponses'; |
9ac86a7e | 2 | |
3f40bc9c | 3 | export default class Constants { |
10570d97 JB |
4 | static readonly ENTITY_CHARGING_STATION = 'ChargingStation'; |
5 | static readonly ENTITY_AUTOMATIC_TRANSACTION_GENERATOR = 'AutomaticTransactionGenerator'; | |
6 | ||
f738a0e9 JB |
7 | static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: DefaultStatus.ACCEPTED }); |
8 | static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: DefaultStatus.REJECTED }); | |
9ac86a7e JB |
9 | static readonly OCPP_CONFIGURATION_RESPONSE_ACCEPTED = Object.freeze({ status: ConfigurationStatus.ACCEPTED }); |
10 | static readonly OCPP_CONFIGURATION_RESPONSE_REJECTED = Object.freeze({ status: ConfigurationStatus.REJECTED }); | |
11 | static readonly OCPP_CONFIGURATION_RESPONSE_REBOOT_REQUIRED = Object.freeze({ status: ConfigurationStatus.REBOOT_REQUIRED }); | |
12 | static readonly OCPP_CONFIGURATION_RESPONSE_NOT_SUPPORTED = Object.freeze({ status: ConfigurationStatus.NOT_SUPPORTED }); | |
edf4bd64 JB |
13 | static readonly OCPP_SET_CHARGING_PROFILE_RESPONSE_ACCEPTED = Object.freeze({ status: ChargingProfileStatus.ACCEPTED }); |
14 | static readonly OCPP_SET_CHARGING_PROFILE_RESPONSE_REJECTED = Object.freeze({ status: ChargingProfileStatus.REJECTED }); | |
15 | static readonly OCPP_SET_CHARGING_PROFILE_RESPONSE_NOT_SUPPORTED = Object.freeze({ status: ChargingProfileStatus.NOT_SUPPORTED }); | |
16 | static readonly OCPP_CLEAR_CHARGING_PROFILE_RESPONSE_ACCEPTED = Object.freeze({ status: ClearChargingProfileStatus.ACCEPTED }); | |
17 | static readonly OCPP_CLEAR_CHARGING_PROFILE_RESPONSE_UNKNOWN = Object.freeze({ status: ClearChargingProfileStatus.UNKNOWN }); | |
9ac86a7e JB |
18 | static readonly OCPP_RESPONSE_UNLOCKED = Object.freeze({ status: UnlockStatus.UNLOCKED }); |
19 | static readonly OCPP_RESPONSE_UNLOCK_FAILED = Object.freeze({ status: UnlockStatus.UNLOCK_FAILED }); | |
20 | static readonly OCPP_RESPONSE_UNLOCK_NOT_SUPPORTED = Object.freeze({ status: UnlockStatus.NOT_SUPPORTED }); | |
4dff73b0 JB |
21 | static readonly OCPP_AVAILABILITY_RESPONSE_ACCEPTED = Object.freeze({ status: AvailabilityStatus.ACCEPTED }); |
22 | static readonly OCPP_AVAILABILITY_RESPONSE_REJECTED = Object.freeze({ status: AvailabilityStatus.REJECTED }); | |
edf4bd64 | 23 | static readonly OCPP_AVAILABILITY_RESPONSE_SCHEDULED = Object.freeze({ status: AvailabilityStatus.SCHEDULED }); |
2e6f5966 | 24 | |
10570d97 JB |
25 | static readonly OCPP_PROTOCOL_JSON = 'json'; |
26 | static readonly OCPP_PROTOCOL_SOAP = 'soap'; | |
27 | static readonly OCPP_VERSION_12 = '1.2'; | |
28 | static readonly OCPP_VERSION_15 = '1.5'; | |
29 | static readonly OCPP_VERSION_16 = '1.6'; | |
30 | static readonly OCPP_VERSION_20 = '2.0'; | |
0a60c33c | 31 | |
c55b9bc2 | 32 | static readonly OCPP_DEFAULT_BOOT_NOTIFICATION_INTERVAL = 60000; // Ms |
679125d9 | 33 | static readonly OCPP_ERROR_TIMEOUT = 60000; // 60 sec |
d2a64eb5 | 34 | |
10570d97 JB |
35 | static readonly CHARGING_STATION_DEFAULT_RESET_TIME = 60000; // Ms |
36 | static readonly CHARGING_STATION_ATG_WAIT_TIME = 2000; // Ms | |
9ac86a7e | 37 | |
5fdab605 | 38 | static readonly TRANSACTION_DEFAULT_TAGID = '00000000'; |
3d2ff9e4 | 39 | |
5fdab605 | 40 | static readonly START_WORKER_DELAY = 500; |
f7869514 | 41 | } |