refactor: organize constants
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPConstants.ts
index e4ac8d7ffce43dbfa19a66ade823e6792ed3df9d..5a271f5902f2a8f36e39d42cbdd407b32be97498 100644 (file)
@@ -5,6 +5,7 @@ import {
   ConfigurationStatus,
   DataTransferStatus,
   GenericStatus,
+  MeterValueMeasurand,
   TriggerMessageStatus,
   UnlockStatus,
 } from '../../types';
@@ -14,6 +15,14 @@ export class OCPPConstants {
   static readonly OCPP_WEBSOCKET_TIMEOUT = 60000; // Ms
   static readonly OCPP_TRIGGER_MESSAGE_DELAY = 500; // Ms
 
+  static readonly OCPP_MEASURANDS_SUPPORTED = Object.freeze([
+    MeterValueMeasurand.STATE_OF_CHARGE,
+    MeterValueMeasurand.VOLTAGE,
+    MeterValueMeasurand.POWER_ACTIVE_IMPORT,
+    MeterValueMeasurand.CURRENT_IMPORT,
+    MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER,
+  ]);
+
   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 });