4 ClearChargingProfileStatus
,
12 import { Constants
} from
'../../utils';
14 export class OCPPConstants
{
15 static readonly OCPP_WEBSOCKET_TIMEOUT
= 60000; // Ms
16 static readonly OCPP_TRIGGER_MESSAGE_DELAY
= 500; // Ms
18 static readonly OCPP_MEASURANDS_SUPPORTED
= Object.freeze([
19 MeterValueMeasurand
.STATE_OF_CHARGE
,
20 MeterValueMeasurand
.VOLTAGE
,
21 MeterValueMeasurand
.POWER_ACTIVE_IMPORT
,
22 MeterValueMeasurand
.CURRENT_IMPORT
,
23 MeterValueMeasurand
.ENERGY_ACTIVE_IMPORT_REGISTER
,
26 static readonly OCPP_REQUEST_EMPTY
= Constants
.EMPTY_FREEZED_OBJECT
;
27 static readonly OCPP_RESPONSE_EMPTY
= Constants
.EMPTY_FREEZED_OBJECT
;
28 static readonly OCPP_RESPONSE_ACCEPTED
= Object.freeze({ status: GenericStatus
.Accepted
});
29 static readonly OCPP_RESPONSE_REJECTED
= Object.freeze({ status: GenericStatus
.Rejected
});
31 static readonly OCPP_CONFIGURATION_RESPONSE_ACCEPTED
= Object.freeze({
32 status: ConfigurationStatus
.ACCEPTED
,
35 static readonly OCPP_CONFIGURATION_RESPONSE_REJECTED
= Object.freeze({
36 status: ConfigurationStatus
.REJECTED
,
39 static readonly OCPP_CONFIGURATION_RESPONSE_REBOOT_REQUIRED
= Object.freeze({
40 status: ConfigurationStatus
.REBOOT_REQUIRED
,
43 static readonly OCPP_CONFIGURATION_RESPONSE_NOT_SUPPORTED
= Object.freeze({
44 status: ConfigurationStatus
.NOT_SUPPORTED
,
47 static readonly OCPP_SET_CHARGING_PROFILE_RESPONSE_ACCEPTED
= Object.freeze({
48 status: ChargingProfileStatus
.ACCEPTED
,
51 static readonly OCPP_SET_CHARGING_PROFILE_RESPONSE_REJECTED
= Object.freeze({
52 status: ChargingProfileStatus
.REJECTED
,
55 static readonly OCPP_SET_CHARGING_PROFILE_RESPONSE_NOT_SUPPORTED
= Object.freeze({
56 status: ChargingProfileStatus
.NOT_SUPPORTED
,
59 static readonly OCPP_CLEAR_CHARGING_PROFILE_RESPONSE_ACCEPTED
= Object.freeze({
60 status: ClearChargingProfileStatus
.ACCEPTED
,
63 static readonly OCPP_CLEAR_CHARGING_PROFILE_RESPONSE_UNKNOWN
= Object.freeze({
64 status: ClearChargingProfileStatus
.UNKNOWN
,
67 static readonly OCPP_RESPONSE_UNLOCKED
= Object.freeze({ status: UnlockStatus
.UNLOCKED
});
68 static readonly OCPP_RESPONSE_UNLOCK_FAILED
= Object.freeze({
69 status: UnlockStatus
.UNLOCK_FAILED
,
72 static readonly OCPP_RESPONSE_UNLOCK_NOT_SUPPORTED
= Object.freeze({
73 status: UnlockStatus
.NOT_SUPPORTED
,
76 static readonly OCPP_AVAILABILITY_RESPONSE_ACCEPTED
= Object.freeze({
77 status: AvailabilityStatus
.ACCEPTED
,
80 static readonly OCPP_AVAILABILITY_RESPONSE_REJECTED
= Object.freeze({
81 status: AvailabilityStatus
.REJECTED
,
84 static readonly OCPP_AVAILABILITY_RESPONSE_SCHEDULED
= Object.freeze({
85 status: AvailabilityStatus
.SCHEDULED
,
88 static readonly OCPP_TRIGGER_MESSAGE_RESPONSE_ACCEPTED
= Object.freeze({
89 status: TriggerMessageStatus
.ACCEPTED
,
92 static readonly OCPP_TRIGGER_MESSAGE_RESPONSE_REJECTED
= Object.freeze({
93 status: TriggerMessageStatus
.REJECTED
,
96 static readonly OCPP_TRIGGER_MESSAGE_RESPONSE_NOT_IMPLEMENTED
= Object.freeze({
97 status: TriggerMessageStatus
.NOT_IMPLEMENTED
,
100 static readonly OCPP_DATA_TRANSFER_RESPONSE_ACCEPTED
= Object.freeze({
101 status: DataTransferStatus
.ACCEPTED
,
104 static readonly OCPP_DATA_TRANSFER_RESPONSE_REJECTED
= Object.freeze({
105 status: DataTransferStatus
.REJECTED
,
108 static readonly OCPP_DATA_TRANSFER_RESPONSE_UNKNOWN_VENDOR_ID
= Object.freeze({
109 status: DataTransferStatus
.UNKNOWN_VENDOR_ID
,
112 protected constructor() {
113 // This is intentional