ElectricEngine
public class ElectricEngine
A electric vehicle engine for route planning and consumption estimation.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Declaration
Swift
public init( consumption: ElectricVehicleConsumption? = nil, efficiency: ElectricVehicleEfficiency? = nil, chargeLevel: ChargeLevel? = nil, chargingParameters: ChargingParameters? = nil )Parameters
consumptionSpecifies the consumption model of the electric vehicle.
efficiencySpecifies the efficiency of the engine.
chargeLevelSpecifies the current and maximum charge of the vehicle.
chargingParametersSpecifies the charging parameters of the vehicle.
-
Describes capacity and the consumption of the EV.
Declaration
Swift
public let consumption: ElectricVehicleConsumption? -
Specifies the efficiency of the engine.
Declaration
Swift
public let efficiency: ElectricVehicleEfficiency? -
Specifies the current and maximum charge of the vehicle.
Declaration
Swift
public let chargeLevel: ChargeLevel? -
Specifies the charging parameters of the vehicle.
Declaration
Swift
public let chargingParameters: ChargingParameters?
-
Copies the current ElectricEngine with changes specified in build closure
Declaration
Swift
public func copy(build: (inout Builder) -> ()) -> ElectricEngineParameters
buildThis closure allows for change of ElectricEngine values
Return Value
ElectricEngine with the changes set on the closure
-
The
Buildercreates a new instance ofElectricEnginewith modified fields.Declaration
Swift
public struct Builder
ElectricEngine Class Reference