Class: ChargingTime

bemap.ChargingTime(context, optionsopt)

new ChargingTime(context, optionsopt)

BeNomad BeMap JavaScript API - ChargingTime service (v1.5) Promise-based wrapper around `POST service/chargingTime/1.0` — estimates how long it takes to charge an EV from one battery level to another at a given charger. Auth: `ROLE_CHARGINGTIME`. Note: the BeMap server does NOT expose a per-vehicle "curve" endpoint. Customers who need a charging curve to plot call `estimate()` repeatedly with different `remainingBatteryLevel` values (e.g. 10, 20, 30, …, 90) and derive instantaneous power from the differences. Typical usage: var ct = new bemap.ChargingTime(ctx); var req = new bemap.ChargingTimeRequest({ vehicle: 'a204c816-...', chargingPointPower: 50, chargingCurrentType: bemap.ChargingCurrentType.DC, remainingBatteryLevel: 20, chargingBatteryLevel: 80 }); ct.estimate(req).then(function(resp) { console.log('charging time:', resp.getChargingTime(), 's'); console.log('knee at:', resp.getOptimumBatteryChargeLevel(), '%'); }).catch(function(err) { if (err.getCode() === bemap.Error.CHARGING_TIME_FAILED) ...; });
Parameters:
Name Type Attributes Description
context bemap.Context
options Object <optional>
Since:
  • 1.5.0
Source:

Extends

  • bemap.ServiceV2

Methods

estimate(request, optionsopt) → {Promise.<bemap.ChargingTimeResponse>}

Estimate a charging duration.
Parameters:
Name Type Attributes Description
request bemap.ChargingTimeRequest
options Object <optional>
Properties
Name Type Attributes Description
signal AbortSignal <optional>
Source:
Returns:
Type
Promise.<bemap.ChargingTimeResponse>