Snippets

OICP 2.1 Remote Reservation Stop | Java

Updated by Julius Poessnecker

File (2) Example.java Added

  • Ignore whitespace
  • Hide word diff
+CPOServer HubjectCPOServer = new CPOServer(RoamingNetwork_Id.Parse("Playground"));
+
+HubjectCPOServer.OnRemoteReservationStop((Timestamp,
+                               RoamingNetworkId,
+                               SessionId,
+                               PartnerSessionId,
+                               ProviderId,
+                               EVSEId) -> {
+
+    System.out.println("[" + Timestamp.                          toString() +
+                          "] RemoteStop in '" + RoamingNetworkId.toString() +
+                          "' from '"          + ProviderId.      toString() +
+                          "' at '"            + EVSEId.          toString() +
+                          "'");
+
+    return RemoteReservationStopResult.Success;
+
+});

File (2) Expected Response.java Deleted

  • Ignore whitespace
  • Hide word diff
-CPOServer HubjectCPOServer = new CPOServer(RoamingNetwork_Id.Parse("Playground"));
-
-HubjectCPOServer.OnRemoteReservationStop((Timestamp,
-                               RoamingNetworkId,
-                               SessionId,
-                               PartnerSessionId,
-                               ProviderId,
-                               EVSEId) -> {
-
-    System.out.println("[" + Timestamp.                          toString() +
-                          "] RemoteStop in '" + RoamingNetworkId.toString() +
-                          "' from '"          + ProviderId.      toString() +
-                          "' at '"            + EVSEId.          toString() +
-                          "'");
-
-    return RemoteReservationStopResult.Success;
-
-});
Created by Julius Poessnecker

File (0) OICP Added

  • Ignore whitespace
  • Hide word diff
+The service description can be found in the OICP 2.1.
+
+Section:
+3.2.2 eRoamingAuthorizeRemoteReservationStop
+
+To download the latest OICP Version, please visit our website:
+https://www.hubject.com/downloads/

File (1) Remote Reservation Stop.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Initiate a remote reservation stop of the given charging session at the given EVSE.
+ *
+ * @param Timestamp The timestamp of the request.
+ * @param RoamingNetworkId The unique identification for the roaming network.
+ * @param SessionId The unique identification for this charging session.
+ * @param PartnerSessionId The unique identification for this charging session on the partner side.
+ * @param ProviderId The unique identification of the e-mobility service provider.
+ * @param EVSEId The unique identification of an EVSE.
+ * @return A remote stop result object.
+ */
+public RemoteReservationStopResult Invoke(Instant             Timestamp,
+                               RoamingNetwork_Id   RoamingNetworkId,
+                               ChargingSession_Id  SessionId,
+                               ChargingSession_Id  PartnerSessionId,
+                               EVSP_Id             ProviderId,
+                               EVSE_Id             EVSEId);
+
+
+/**
+ * Register an event callback for incoming remote reservation stop requests.
+ *
+ * @param RemoteReservationStopHandler an implementation of the remote reservation stop functional interface.
+ */
+public void OnRemoteReservationStop(IRemoteReservationStop RemoteReservationStopHandler)
+{ ... }

File (2) Expected Response.java Added

  • Ignore whitespace
  • Hide word diff
+CPOServer HubjectCPOServer = new CPOServer(RoamingNetwork_Id.Parse("Playground"));
+
+HubjectCPOServer.OnRemoteReservationStop((Timestamp,
+                               RoamingNetworkId,
+                               SessionId,
+                               PartnerSessionId,
+                               ProviderId,
+                               EVSEId) -> {
+
+    System.out.println("[" + Timestamp.                          toString() +
+                          "] RemoteStop in '" + RoamingNetworkId.toString() +
+                          "' from '"          + ProviderId.      toString() +
+                          "' at '"            + EVSEId.          toString() +
+                          "'");
+
+    return RemoteReservationStopResult.Success;
+
+});
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.