-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeter-values.ts
187 lines (185 loc) · 5.41 KB
/
meter-values.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Sampled_ Value. Context. Reading_ Context_ Code
* urn:x-oca:ocpp:uid:1:569261
* Type of detail value: start, end or sample. Default = "Sample.Periodic"
*
*/
export type ReadingContextEnumType =
| "Interruption.Begin"
| "Interruption.End"
| "Other"
| "Sample.Clock"
| "Sample.Periodic"
| "Transaction.Begin"
| "Transaction.End"
| "Trigger";
/**
* Sampled_ Value. Measurand. Measurand_ Code
* urn:x-oca:ocpp:uid:1:569263
* Type of measurement. Default = "Energy.Active.Import.Register"
*
*/
export type MeasurandEnumType =
| "Current.Export"
| "Current.Import"
| "Current.Offered"
| "Energy.Active.Export.Register"
| "Energy.Active.Import.Register"
| "Energy.Reactive.Export.Register"
| "Energy.Reactive.Import.Register"
| "Energy.Active.Export.Interval"
| "Energy.Active.Import.Interval"
| "Energy.Active.Net"
| "Energy.Reactive.Export.Interval"
| "Energy.Reactive.Import.Interval"
| "Energy.Reactive.Net"
| "Energy.Apparent.Net"
| "Energy.Apparent.Import"
| "Energy.Apparent.Export"
| "Frequency"
| "Power.Active.Export"
| "Power.Active.Import"
| "Power.Factor"
| "Power.Offered"
| "Power.Reactive.Export"
| "Power.Reactive.Import"
| "SoC"
| "Voltage";
/**
* Sampled_ Value. Phase. Phase_ Code
* urn:x-oca:ocpp:uid:1:569264
* Indicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value.
*
*/
export type PhaseEnumType = "L1" | "L2" | "L3" | "N" | "L1-N" | "L2-N" | "L3-N" | "L1-L2" | "L2-L3" | "L3-L1";
/**
* Sampled_ Value. Location. Location_ Code
* urn:x-oca:ocpp:uid:1:569265
* Indicates where the measured value has been sampled. Default = "Outlet"
*
*
*/
export type LocationEnumType = "Body" | "Cable" | "EV" | "Inlet" | "Outlet";
/**
* Request_ Body
* urn:x-enexis:ecdm:uid:2:234744
*
*/
export interface MeterValuesRequestV201 {
customData?: CustomDataType;
/**
* Request_ Body. EVSEID. Numeric_ Identifier
* urn:x-enexis:ecdm:uid:1:571101
* This contains a number (>0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter.
*
*/
evseId: number;
/**
* @minItems 1
*/
meterValue: [MeterValueType, ...MeterValueType[]];
}
/**
* This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.
*/
export interface CustomDataType {
vendorId: string;
[k: string]: unknown;
}
/**
* Meter_ Value
* urn:x-oca:ocpp:uid:2:233265
* Collection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time.
*
*/
export interface MeterValueType {
customData?: CustomDataType;
/**
* @minItems 1
*/
sampledValue: [SampledValueType, ...SampledValueType[]];
/**
* Meter_ Value. Timestamp. Date_ Time
* urn:x-oca:ocpp:uid:1:569259
* Timestamp for measured value(s).
*
*/
timestamp: string;
}
/**
* Sampled_ Value
* urn:x-oca:ocpp:uid:2:233266
* Single sampled value in MeterValues. Each value can be accompanied by optional fields.
*
* To save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units.
*
*/
export interface SampledValueType {
customData?: CustomDataType;
/**
* Sampled_ Value. Value. Measure
* urn:x-oca:ocpp:uid:1:569260
* Indicates the measured value.
*
*
*/
value: number;
context?: ReadingContextEnumType;
measurand?: MeasurandEnumType;
phase?: PhaseEnumType;
location?: LocationEnumType;
signedMeterValue?: SignedMeterValueType;
unitOfMeasure?: UnitOfMeasureType;
}
/**
* Represent a signed version of the meter value.
*
*/
export interface SignedMeterValueType {
customData?: CustomDataType;
/**
* Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.
*
*/
signedMeterData: string;
/**
* Method used to create the digital signature.
*
*/
signingMethod: string;
/**
* Method used to encode the meter values before applying the digital signature algorithm.
*
*/
encodingMethod: string;
/**
* Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_.
*
*/
publicKey: string;
}
/**
* Represents a UnitOfMeasure with a multiplier
*
*/
export interface UnitOfMeasureType {
customData?: CustomDataType;
/**
* Unit of the value. Default = "Wh" if the (default) measurand is an "Energy" type.
* This field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices.
* If an applicable unit is available in that list, otherwise a "custom" unit might be used.
*
*/
unit?: string;
/**
* Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0.
*
*/
multiplier?: number;
}