EvChargingMediatorService

Service responsible for providing access to e-Mobility Service Providers (eMSPs) in the system. One or more eMSPs may be available and can be used to charge the vehicle. There can be only a single eMSP authenticated at the same time.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class CurrentChargingProgressInfo(val currentBatteryChargeLevel: Energy, val maximumBatteryChargeLevel: Energy, val remainingRange: Distance, @FloatRange(from = 0.0, to = 100.0) val targetBatteryChargePercentage: Float?) : Parcelable

A data class that represents information on current battery charge level and remaining range.

Link copied to clipboard

Properties

Link copied to clipboard

Provides charging progress information including the current battery charge level and the current vehicle range. null if the vehicle is not currently charging.

Link copied to clipboard

This will contain the details of the charging station requested by calling retrieveChargingStationDetails.

Link copied to clipboard

The authentication status of each eMSP known to the system.

Link copied to clipboard

The properties of each eMSP known to the system.

Link copied to clipboard

Indicates if the charging cable is plugged into the vehicle.

Link copied to clipboard
abstract val sessionInfo: SessionInfo?

Session information: session status, charging station id, charging point, and receipt of the charging session. This information will be updated during a session once more information is available.

Functions

Link copied to clipboard
abstract suspend fun finishCharging(): EvChargingResult

Concludes the charging session. This function ends the current charging session and resets the internal states. Should be called when a charging session has completed or there has been a failure.

Link copied to clipboard
abstract suspend fun logIn(serviceIdentifier: EmspIdentifier): EvChargingResult

Request to start the authentication process for the specified eMSP. serviceIdentifiers are the keys returned by EvChargingMediatorService.emspInfo. The exact flow of events that form the authentication process is dependent upon the eMSP integration.

Link copied to clipboard
abstract suspend fun logOut(serviceIdentifier: EmspIdentifier): EvChargingResult

Request to log out of the eMSP service. The actual handling of this request should be implemented in the eMSP service plugin. See also EvChargingService.

Link copied to clipboard
abstract suspend fun postFailure(reason: FailureReason)

Post a failure to the listeners of EvChargingEventListener. This should be called when a failure has happened during the charging process, and the failure is not handled by the callee.

Link copied to clipboard

Clients should call this API to inform the platform of the result of the authentication process initiated by logIn if the authentication process was Open ID.

Link copied to clipboard
abstract suspend fun retrieveChargingStationDetails(chargingStationId: ChargingStationId): EvChargingResult

This function will retrieve detailed information about the charging station. This information contains e.g. the charging points with its connectors and the tariffs and restrictions of the charging station. The resulting detailed information is stored in currentChargingStation.

Link copied to clipboard
abstract suspend fun setTargetBatteryCharge(minimalTargetBatteryChargePercentage: Float)

Set the target percentage to which the battery should be charged during the current charging session. This target is not enforced by the EvChargingMediatorService.

Link copied to clipboard
abstract suspend fun showCurrentChargingProgress()

Request the current charging progress information to be shown to the user. This method can be used by non-user interface components to request the user interface to show the current charging progress.

Link copied to clipboard
abstract suspend fun startCharging(chargingStationId: ChargingStationId, chargingPointId: ChargingPointId, connectorId: ConnectorId): EvChargingResult

Initiate a charging session. The state of the current charging session can be monitored on sessionInfo.

Link copied to clipboard
abstract suspend fun stopCharging(): EvChargingResult

Called when the user has interacted with the UI to stop an active charging session.