Enhance log message on supervision url distribution
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / MeterValues.ts
CommitLineData
c12b43d0
JB
1import { EmptyObject } from '../../EmptyObject';
2
10570d97
JB
3export 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
22export 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
c0560973 33export enum OCPP16MeterValueMeasurand {
10570d97
JB
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
58export enum MeterValueLocation {
59 BODY = 'Body',
60 CABLE = 'Cable',
61 EV = 'EV',
62 INLET = 'Inlet',
63 OUTLET = 'Outlet'
64}
65
9ccca265 66export enum OCPP16MeterValuePhase {
10570d97
JB
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
79export enum MeterValueFormat {
80 RAW = 'Raw',
81 SIGNED_DATA = 'SignedData',
82}
83
c0560973 84export interface OCPP16SampledValue {
10570d97
JB
85 value?: string;
86 unit?: MeterValueUnit;
87 context?: MeterValueContext;
c0560973 88 measurand?: OCPP16MeterValueMeasurand;
9ccca265 89 phase?: OCPP16MeterValuePhase;
10570d97
JB
90 location?: MeterValueLocation;
91 format?: MeterValueFormat;
92}
93
fd0c36fa 94export interface OCPP16MeterValue {
f738a0e9 95 timestamp: string;
c0560973 96 sampledValue: OCPP16SampledValue[];
f738a0e9
JB
97}
98
99export interface MeterValuesRequest {
100 connectorId: number;
101 transactionId?: number;
b02ab215 102 meterValue: OCPP16MeterValue[];
f738a0e9
JB
103}
104
c12b43d0 105export type MeterValuesResponse = EmptyObject;
f738a0e9 106