X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FMeterValues.ts;h=e8d14ef9a845f2c0dae2be6add33a66651208468;hb=f5a1ff8ce8f87a149791c2c98fe7c5e8a20b5392;hp=0d9d3263f755d184639bef69d041b10142eca758;hpb=844e496b3482e49145467af3f74df54811e91cb6;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/1.6/MeterValues.ts b/src/types/ocpp/1.6/MeterValues.ts index 0d9d3263..e8d14ef9 100644 --- a/src/types/ocpp/1.6/MeterValues.ts +++ b/src/types/ocpp/1.6/MeterValues.ts @@ -1,7 +1,7 @@ -import { EmptyObject } from '../../EmptyObject'; -import { JsonObject } from '../../JsonType'; +import type { EmptyObject } from '../../EmptyObject.js'; +import type { JsonObject } from '../../JsonType.js'; -export enum MeterValueUnit { +export enum OCPP16MeterValueUnit { WATT_HOUR = 'Wh', KILO_WATT_HOUR = 'kWh', VAR_HOUR = 'varh', @@ -20,7 +20,7 @@ export enum MeterValueUnit { PERCENT = 'Percent', } -export enum MeterValueContext { +export enum OCPP16MeterValueContext { INTERRUPTION_BEGIN = 'Interruption.Begin', INTERRUPTION_END = 'Interruption.End', OTHER = 'Other', @@ -56,7 +56,7 @@ export enum OCPP16MeterValueMeasurand { VOLTAGE = 'Voltage', } -export enum MeterValueLocation { +export enum OCPP16MeterValueLocation { BODY = 'Body', CABLE = 'Cable', EV = 'EV', @@ -77,23 +77,23 @@ export enum OCPP16MeterValuePhase { L3_L1 = 'L3-L1', } -export enum MeterValueFormat { +enum OCPP16MeterValueFormat { RAW = 'Raw', SIGNED_DATA = 'SignedData', } export interface OCPP16SampledValue extends JsonObject { value: string; - unit?: MeterValueUnit; - context?: MeterValueContext; + unit?: OCPP16MeterValueUnit; + context?: OCPP16MeterValueContext; measurand?: OCPP16MeterValueMeasurand; phase?: OCPP16MeterValuePhase; - location?: MeterValueLocation; - format?: MeterValueFormat; + location?: OCPP16MeterValueLocation; + format?: OCPP16MeterValueFormat; } export interface OCPP16MeterValue extends JsonObject { - timestamp: string; + timestamp: Date; sampledValue: OCPP16SampledValue[]; }