Interface ChargeSessionManager

All Superinterfaces:
net.solarnetwork.service.Identifiable

public interface ChargeSessionManager extends net.solarnetwork.service.Identifiable
This API represents the set of functionality required by an OCPP Central System to manage charging sessions (OCPP transactions) for Charge Point clients.
Version:
2.2
Author:
matt
  • Method Details

    • startChargingSession

      ChargeSession startChargingSession(ChargeSessionStartInfo info) throws AuthorizationException
      Start a charging session.
      Parameters:
      info - the start charging session info
      Returns:
      the new charge session
      Throws:
      AuthorizationException - if any authorization error occurs
    • getActiveChargingSession

      ChargeSession getActiveChargingSession(ChargePointIdentity chargePointId, int transactionId) throws AuthorizationException
      Get an active charging session for a transaction ID.

      An active charging session is one that has not ended yet.

      Parameters:
      chargePointId - the charge point ID
      transactionId - the transaction ID
      Returns:
      the charge session
      Throws:
      AuthorizationException - if any no active charge session is available for the given criteria
    • getActiveChargingSessions

      Collection<ChargeSession> getActiveChargingSessions(ChargePointIdentity chargePointId)
      Get active charging sessions, optionally limited to a specific charge point ID.

      An active charging session is one that has not ended yet.

      Parameters:
      chargePointId - the charge point identifier to get sessions for, or null for all sessions for all charge points
      Returns:
      the active sessions, never null
    • getChargingSessionReadings

      Collection<SampledValue> getChargingSessionReadings(UUID sessionId)
      Get all available charge session readings.
      Parameters:
      sessionId - the charge session ID
      Returns:
      the readings, never null
    • addChargingSessionReadings

      void addChargingSessionReadings(ChargePointIdentity chargePointId, Integer connectorId, Iterable<SampledValue> readings)
      Add charge session readings.
      Parameters:
      chargePointId - the charge point identifier to get sessions for, or null for all sessions for all charge points
      connectorId - the connector ID, or null to use the active charge session's information
      readings - the readings to add
      Since:
      2.2
    • endChargingSession

      AuthorizationInfo endChargingSession(ChargeSessionEndInfo info)
      End a charging session.
      Parameters:
      info - the end charging session info
      Returns:
      info if needed, otherwise null