X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConnectors.ts;h=d2c262409a3b9d4260daa209ad83084edd7c209f;hb=331e20bbca5a7f404551666c4a3609ae92fc5e86;hp=38bebf336dbdd2c16c6cc567e708bbed695bc8e7;hpb=c0560973d259dbce64a24d10bab46246596fa1d5;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Connectors.ts b/src/types/Connectors.ts index 38bebf33..d2c26240 100644 --- a/src/types/Connectors.ts +++ b/src/types/Connectors.ts @@ -1,21 +1,26 @@ +import { MeterValue, SampledValue } from './ocpp/MeterValues'; + import { AvailabilityType } from './ocpp/Requests'; import { ChargePointStatus } from './ocpp/ChargePointStatus'; import { ChargingProfile } from './ocpp/ChargingProfile'; -import { SampledValue } from './ocpp/MeterValues'; -export interface Connector { +export interface SampledValueTemplate extends SampledValue { + fluctuationPercent?: number; +} + +export interface ConnectorStatus { 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[] -} - -export default interface Connectors { - [id: string]: Connector; + transactionIdTag?: string; + energyActiveImportRegisterValue?: number; // In Wh + transactionEnergyActiveImportRegisterValue?: number; // In Wh + transactionBeginMeterValue?: MeterValue; + chargingProfiles?: ChargingProfile[]; }