ChargeLevel

public struct ChargeLevel

Describes capacity and current charge of the EV.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Declaration

    Swift

    public init
        (
            currentCharge: Measurement<UnitEnergy>,
            maxCharge: Measurement<UnitEnergy>
        ) throws

    Parameters

    currentCharge

    Specifies the current electric energy supply in kilowatt hours (kWh).

    maxCharge

    Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle’s battery.

Public

  • Specifies the current electric energy supply in kilowatt hours (kWh).

    Declaration

    Swift

    public let currentCharge: Measurement<UnitEnergy>
  • Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle’s battery.

    Declaration

    Swift

    public let maxCharge: Measurement<UnitEnergy>