init(timestamp:device:venueID:status:stateOfCharge:energy:estimatedRange:chargingTarget:sessionIdentifier:)
Creates an electric vehicle status event.
Declaration
init(timestamp: Date, device: ElectricalLoadDevice, venueID: UUID, status: ElectricVehicleStatusEvent.Status, stateOfCharge: Int, energy: Measurement<UnitEnergy>, estimatedRange: Measurement<UnitLength>? = nil, chargingTarget: ElectricVehicleStatusEvent.ChargingTarget? = nil, sessionIdentifier: UUID? = nil)Parameters
- timestamp:
The time when the status event occurs.
- device:
The device identifier that Electricalloaddevice creates.
- venueID:
An identifier for the venue in which the event occurs.
- status:
The current status of the vehicle relative to charger connection.
- stateOfCharge:
The state of charge percentage (0-100) at the time of the event.
- energy:
The state of charge in milliwatt-hours at the time of the event.
- estimatedRange:
The estimated range based on current state, or
nilif the range is unavailable. - chargingTarget:
The target information for the charging session, or
nilif the information is unavailable. - sessionIdentifier:
An identifier for the Electricvehicleloadevent session, or
nilif not applicable.