fix: fix phase rotation value helper return type
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPConstants.ts
index f6b9af807d5e0552adca1aae18f4c44c7fee699b..e4ac8d7ffce43dbfa19a66ade823e6792ed3df9d 100644 (file)
@@ -8,12 +8,16 @@ import {
   TriggerMessageStatus,
   UnlockStatus,
 } from '../../types';
+import { Constants } from '../../utils';
 
 export class OCPPConstants {
-  static readonly OCPP_REQUEST_EMPTY = Object.freeze({});
-  static readonly OCPP_RESPONSE_EMPTY = Object.freeze({});
-  static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: GenericStatus.ACCEPTED });
-  static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: GenericStatus.REJECTED });
+  static readonly OCPP_WEBSOCKET_TIMEOUT = 60000; // Ms
+  static readonly OCPP_TRIGGER_MESSAGE_DELAY = 500; // Ms
+
+  static readonly OCPP_REQUEST_EMPTY = Constants.EMPTY_FREEZED_OBJECT;
+  static readonly OCPP_RESPONSE_EMPTY = Constants.EMPTY_FREEZED_OBJECT;
+  static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: GenericStatus.Accepted });
+  static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: GenericStatus.Rejected });
 
   static readonly OCPP_CONFIGURATION_RESPONSE_ACCEPTED = Object.freeze({
     status: ConfigurationStatus.ACCEPTED,
@@ -88,7 +92,7 @@ export class OCPPConstants {
     status: DataTransferStatus.REJECTED,
   });
 
-  private constructor() {
+  protected constructor() {
     // This is intentional
   }
 }