Battery

data class Battery(var capacity: Float, var remainingCapacity: Float, var chargingCurve: Map<Double, Double>) : Parcelable

Constructors

Link copied to clipboard
fun Battery(capacity: Float, remainingCapacity: Float, chargingCurve: Map<Double, Double>)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard

total battery capacity in kilowatt hours

Link copied to clipboard

map of charging_values. Specifies how quickly the battery charges depending of the current charging state. key - Battery charging state in kWh, for which the charging power is valid. value - Charging power in kW, how quickly the battery is charging at the specified state. Must contain at least one value, otherwise will be ignored Must be sorted from lowest to highest values To predict the values inside the specified range, interpolation between the closest points will be used. To predict the values outside the specified range, the closest specified value will be used.

Link copied to clipboard

remaining battery capacity in kilowatt hours, must be <= capacity