X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConnectors.ts;h=027ac645d7f22336e399b79d0793f7ef85b51ac4;hb=de3dbcf58f56e0b7cc36762c6a03bdf908ca3df8;hp=8e04989c7fc828daeea6f0c71efa3a908aa780de;hpb=10570d974fe84597ed0067bb41edc104ffa64167;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/Connectors.ts b/src/types/Connectors.ts index 8e04989c..027ac645 100644 --- a/src/types/Connectors.ts +++ b/src/types/Connectors.ts @@ -1,17 +1,29 @@ -import { ChargePointStatus } from './ChargePointStatus'; -import MeterValue from './MeterValue'; +import { MeterValue, SampledValue } from './ocpp/MeterValues'; -export interface Connector { +import { AvailabilityType } from './ocpp/Requests'; +import { ChargePointStatus } from './ocpp/ChargePointStatus'; +import { ChargingProfile } from './ocpp/ChargingProfile'; + +export interface SampledValueTemplate extends SampledValue { + fluctuationPercent?: number; +} + +export interface ConnectorStatus { + availability: AvailabilityType; bootStatus?: ChargePointStatus; status?: ChargePointStatus; - MeterValues: MeterValue[]; + MeterValues: SampledValueTemplate[]; + authorizeIdTag?: string; + idTagAuthorized?: boolean; + localAuthorizeIdTag?: string; + idTagLocalAuthorized?: boolean; + transactionRemoteStarted?: boolean; transactionStarted?: boolean; transactionId?: number; transactionSetInterval?: NodeJS.Timeout; - idTag?: string; - lastEnergyActiveImportRegisterValue?: number; -} - -export default interface Connectors { - [id: string]: Connector; + transactionIdTag?: string; + energyActiveImportRegisterValue?: number; // In Wh + transactionEnergyActiveImportRegisterValue?: number; // In Wh + transactionBeginMeterValue?: MeterValue; + chargingProfiles?: ChargingProfile[]; }