(connectorId: number, power: number, energy: number)
| 201 | } |
| 202 | |
| 203 | async meterValues(connectorId: number, power: number, energy: number): Promise<any> { |
| 204 | return this.call("MeterValues", { |
| 205 | connectorId, |
| 206 | meterValue: [ |
| 207 | { |
| 208 | timestamp: new Date().toISOString(), |
| 209 | sampledValue: [ |
| 210 | { |
| 211 | value: power.toString(), |
| 212 | context: "Sample.Periodic", |
| 213 | format: "Raw", |
| 214 | measurand: "Power.Active.Import", |
| 215 | phase: null, |
| 216 | location: "Outlet", |
| 217 | unit: "W", |
| 218 | }, |
| 219 | { |
| 220 | value: energy.toString(), |
| 221 | context: "Sample.Periodic", |
| 222 | format: "Raw", |
| 223 | measurand: "Energy.Active.Import.Register", |
| 224 | phase: null, |
| 225 | location: "Outlet", |
| 226 | unit: "Wh", |
| 227 | }, |
| 228 | ], |
| 229 | }, |
| 230 | ], |
| 231 | }); |
| 232 | } |
| 233 | |
| 234 | disconnect(): void { |
| 235 | this.shouldReconnect = false; |
no test coverage detected