X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConnectors.ts;h=ad669c8715000d0d1253cad04111dd7ad236ca21;hb=48132636528412b0d48b22baf35414ab2e917bd1;hp=290a29a5561ad1f69ec07f5c13a9fbe1a86fb431;hpb=b95523058c121b22e086339675407f5266250b7b;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Connectors.ts b/src/types/Connectors.ts index 290a29a5..ad669c87 100644 --- a/src/types/Connectors.ts +++ b/src/types/Connectors.ts @@ -1,21 +1,28 @@ -import { AvailabilityType } from './ocpp/1.6/Requests'; -import { ChargePointStatus } from './ocpp/1.6/ChargePointStatus'; -import { ChargingProfile } from './ocpp/1.6/ChargingProfile'; -import { SampledValue } from './ocpp/1.6/MeterValues'; +import { MeterValue, SampledValue } from './ocpp/MeterValues'; + +import { AvailabilityType } from './ocpp/Requests'; +import { ChargePointStatus } from './ocpp/ChargePointStatus'; +import { ChargingProfile } from './ocpp/ChargingProfile'; + +export interface SampledValueTemplate extends SampledValue { + fluctuationPercent?: number; +} export interface Connector { availability: AvailabilityType; bootStatus?: ChargePointStatus; status?: ChargePointStatus; - MeterValues: SampledValue[]; + MeterValues: SampledValueTemplate[]; + authorizeIdTag?: string; + authorized?: boolean; transactionStarted?: boolean; transactionId?: number; transactionSetInterval?: NodeJS.Timeout; - idTag?: string; - lastEnergyActiveImportRegisterValue?: number; - chargingProfiles?: ChargingProfile[] + transactionIdTag?: string; + energyActiveImportRegisterValue?: number; // In Wh + transactionEnergyActiveImportRegisterValue?: number; // In Wh + transactionBeginMeterValue?: MeterValue; + chargingProfiles?: ChargingProfile[]; } -export default interface Connectors { - [id: string]: Connector; -} +export type Connectors = Record;