onEVDataUpdated
Invoke when any component of EV data is changed so that it can be used in refresh requests. You can pass only changed components of EV data via data, all the previous values that have not changed will be cached on the SDK side. NOTE: Only provide parameters that are compatible with an EV route refresh. If you pass any other parameters via this method, the route refresh request will fail.
Example:
mapOf(
"ev_initial_charge" to "90",
"energy_consumption_curve" to "0,300;20,120;40,150",
"auxiliary_consumption" to "300"
)If you previously invoked this function, and then the charge changes to 80, you can also invoke it again with only one parameter:
mapOf("ev_initial_charge" to "80")as an argument. This way "ev_initial_charge" will be updated and the following parameters will be used from the previous invocation. It would be equivalent to passing the following map:
mapOf(
"ev_initial_charge" to "80",
"energy_consumption_curve" to "0,300;20,120;40,150",
"auxiliary_consumption" to "300"
)Of the battery preconditioning model parameters, only ev_battery_temperature (the current battery temperature in °C, e.g. "25.0") is compatible with an EV route refresh and can be passed via this method. The other model parameters (ev_battery_charging_power_at_temperature, ev_battery_charging_power_optimal_temperature, ev_battery_heating_parameters) are valid only on the directions request: set them in the initial RouteOptions instead, as passing them here makes the refresh request fail.
Parameters
Map describing the changed EV data