fix: add missing type definition file
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / MeterValues.ts
1 import type { EmptyObject, JsonObject } from '../../internal';
2
3 export enum MeterValueUnit {
4 WATT_HOUR = 'Wh',
5 KILO_WATT_HOUR = 'kWh',
6 VAR_HOUR = 'varh',
7 KILO_VAR_HOUR = 'kvarh',
8 WATT = 'W',
9 KILO_WATT = 'kW',
10 VOLT_AMP = 'VA',
11 KILO_VOLT_AMP = 'kVA',
12 VAR = 'var',
13 KILO_VAR = 'kvar',
14 AMP = 'A',
15 VOLT = 'V',
16 TEMP_CELSIUS = 'Celsius',
17 TEMP_FAHRENHEIT = 'Fahrenheit',
18 TEMP_KELVIN = 'K',
19 PERCENT = 'Percent',
20 }
21
22 export enum MeterValueContext {
23 INTERRUPTION_BEGIN = 'Interruption.Begin',
24 INTERRUPTION_END = 'Interruption.End',
25 OTHER = 'Other',
26 SAMPLE_CLOCK = 'Sample.Clock',
27 SAMPLE_PERIODIC = 'Sample.Periodic',
28 TRANSACTION_BEGIN = 'Transaction.Begin',
29 TRANSACTION_END = 'Transaction.End',
30 TRIGGER = 'Trigger',
31 }
32
33 export enum OCPP16MeterValueMeasurand {
34 CURRENT_EXPORT = 'Current.Export',
35 CURRENT_IMPORT = 'Current.Import',
36 CURRENT_OFFERED = 'Current.Offered',
37 ENERGY_ACTIVE_EXPORT_REGISTER = 'Energy.Active.Export.Register',
38 ENERGY_ACTIVE_IMPORT_REGISTER = 'Energy.Active.Import.Register',
39 ENERGY_REACTIVE_EXPORT_REGISTER = 'Energy.Reactive.Export.Register',
40 ENERGY_REACTIVE_IMPORT_REGISTER = 'Energy.Reactive.Import.Register',
41 ENERGY_ACTIVE_EXPORT_INTERVAL = 'Energy.Active.Export.Interval',
42 ENERGY_ACTIVE_IMPORT_INTERVAL = 'Energy.Active.Import.Interval',
43 ENERGY_REACTIVE_EXPORT_INTERVAL = 'Energy.Reactive.Export.Interval',
44 ENERGY_REACTIVE_IMPORT_INTERVAL = 'Energy.Reactive.Import.Interval',
45 FREQUENCY = 'Frequency',
46 POWER_ACTIVE_EXPORT = 'Power.Active.Export',
47 POWER_ACTIVE_IMPORT = 'Power.Active.Import',
48 POWER_FACTOR = 'Power.Factor',
49 POWER_OFFERED = 'Power.Offered',
50 POWER_REACTIVE_EXPORT = 'Power.Reactive.Export',
51 POWER_REACTIVE_IMPORT = 'Power.Reactive.Import',
52 FAN_RPM = 'RPM',
53 STATE_OF_CHARGE = 'SoC',
54 TEMPERATURE = 'Temperature',
55 VOLTAGE = 'Voltage',
56 }
57
58 export enum MeterValueLocation {
59 BODY = 'Body',
60 CABLE = 'Cable',
61 EV = 'EV',
62 INLET = 'Inlet',
63 OUTLET = 'Outlet',
64 }
65
66 export enum OCPP16MeterValuePhase {
67 L1 = 'L1',
68 L2 = 'L2',
69 L3 = 'L3',
70 N = 'N',
71 L1_N = 'L1-N',
72 L2_N = 'L2-N',
73 L3_N = 'L3-N',
74 L1_L2 = 'L1-L2',
75 L2_L3 = 'L2-L3',
76 L3_L1 = 'L3-L1',
77 }
78
79 enum MeterValueFormat {
80 RAW = 'Raw',
81 SIGNED_DATA = 'SignedData',
82 }
83
84 export interface OCPP16SampledValue extends JsonObject {
85 value: string;
86 unit?: MeterValueUnit;
87 context?: MeterValueContext;
88 measurand?: OCPP16MeterValueMeasurand;
89 phase?: OCPP16MeterValuePhase;
90 location?: MeterValueLocation;
91 format?: MeterValueFormat;
92 }
93
94 export interface OCPP16MeterValue extends JsonObject {
95 timestamp: Date;
96 sampledValue: OCPP16SampledValue[];
97 }
98
99 export interface OCPP16MeterValuesRequest extends JsonObject {
100 connectorId: number;
101 transactionId?: number;
102 meterValue: OCPP16MeterValue[];
103 }
104
105 export type OCPP16MeterValuesResponse = EmptyObject;