More typing.
[e-mobility-charging-stations-simulator.git] / src / utils / Constants.ts
CommitLineData
3f40bc9c 1export default class Constants {
10570d97
JB
2 static readonly ENTITY_CHARGING_STATION = 'ChargingStation';
3 static readonly ENTITY_AUTOMATIC_TRANSACTION_GENERATOR = 'AutomaticTransactionGenerator';
4
5 static readonly WS_UNSUPPORTED_DATA = 1007;
6
7 static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: 'Accepted' });
8 static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: 'Rejected' });
9 static readonly OCPP_RESPONSE_REBOOT_REQUIRED = Object.freeze({ status: 'RebootRequired' });
10 static readonly OCPP_SOCKET_TIMEOUT = 60000; // 60 sec
11 static readonly OCPP_JSON_CALL_MESSAGE = 2; // Caller to callee
12 static readonly OCPP_JSON_CALL_RESULT_MESSAGE = 3; // Callee to caller
13 static readonly OCPP_JSON_CALL_ERROR_MESSAGE = 4; // Callee to caller
7dde0b73 14 // Requested Action is not known by receiver
10570d97 15 static readonly OCPP_ERROR_NOT_IMPLEMENTED = 'NotImplemented';
7dde0b73 16 // Requested Action is recognized but not supported by the receiver
10570d97 17 static readonly OCPP_ERROR_NOT_SUPPORTED = 'NotSupported';
7dde0b73 18 // An internal error occurred and the receiver was not able to process the requested Action successfully
10570d97 19 static readonly OCPP_ERROR_INTERNAL_ERROR = 'InternalError';
7dde0b73 20 // Payload for Action is incomplete
10570d97 21 static readonly OCPP_ERROR_PROTOCOL_ERROR = 'ProtocolError';
7dde0b73 22 // During the processing of Action a security issue occurred preventing receiver from completing the Action successfully
10570d97 23 static readonly OCPP_ERROR_SECURITY_ERROR = 'SecurityError';
7dde0b73 24 // Payload for Action is syntactically incorrect or not conform the PDU structure for Action
10570d97 25 static readonly OCPP_ERROR_FORMATION_VIOLATION = 'FormationViolation';
7dde0b73 26 // Payload is syntactically correct but at least one field contains an invalid value
10570d97 27 static readonly OCPP_ERROR_PROPERTY_RAINT_VIOLATION = 'PropertyraintViolation';
7f134aca 28 // Payload for Action is syntactically correct but at least one of the fields violates occurrence raints
10570d97 29 static readonly OCPP_ERROR_OCCURENCE_RAINT_VIOLATION = 'OccurenceraintViolation';
6526f8c8 30 // Payload for Action is syntactically correct but at least one of the fields violates data type raints (e.g. “somestring” = 12)
10570d97 31 static readonly OCPP_ERROR_TYPERAINT_VIOLATION = 'TyperaintViolation';
7dde0b73 32 // Any other error not covered by the previous ones
10570d97 33 static readonly OCPP_ERROR_GENERIC_ERROR = 'GenericError';
2e6f5966 34
10570d97
JB
35 static readonly OCPP_PROTOCOL_JSON = 'json';
36 static readonly OCPP_PROTOCOL_SOAP = 'soap';
37 static readonly OCPP_VERSION_12 = '1.2';
38 static readonly OCPP_VERSION_15 = '1.5';
39 static readonly OCPP_VERSION_16 = '1.6';
40 static readonly OCPP_VERSION_20 = '2.0';
0a60c33c 41
10570d97
JB
42 static readonly CHARGING_STATION_DEFAULT_RESET_TIME = 60000; // Ms
43 static readonly CHARGING_STATION_ATG_WAIT_TIME = 2000; // Ms
f7869514 44}