MapboxEVPlatformClientApi

class MapboxEVPlatformClientApi(evPlatformClient: MapboxEvPlatformClient, shouldSimulate: Boolean = false)

This is the higher level client API class for interacting with the Mapbox EV platform.

Parameters

evPlatformClient

Constructors

Link copied to clipboard
constructor(evPlatformClient: MapboxEvPlatformClient, shouldSimulate: Boolean = false)

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun getSessionState(sessionId: String): SessionStatusFlow

When the flow exposed by SessionStatusFlow is collected the session will periodically be refreshed by making a call to the server for the latest status.

Link copied to clipboard
suspend fun startSessionProcess(locationId: String, evseId: String): SessionCommandFlow

Initiates an EV charging session for the charging location. The return of a session ID does not necessarily indicate a session has been created. It's important to look at the CommandResponseType in the returned SessionCommandResponse in order to understand if a session was created successfully.

Link copied to clipboard

Submits a stop session command.

Link copied to clipboard