Snippets

OICP 2.1 Push EVSE Status | Java

Updated by Julius Poessnecker

File (0) OICP Added

  • Ignore whitespace
  • Hide word diff
+The service description can be found in the OICP 2.1 (CPO).
+
+Section:
+3.4.1 eRoamingPushEVSEStatus
+
+To download the latest OICP Version, please visit our website:
+https://www.hubject.com/downloads/
Updated by Gregor Schermuly

File (1) Push EVSE Status | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Creates a new PushEVSEStatus request.
+ *
+ * @param EVSEStatus a mapping of EVSEIds to EVSEStatus values.
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param EVSEOperatorName the unique name of the EVSE operator for this request.
+ * @param Action the server side data management operation for this request.
+ * @return a new PushEVSEStatus request builder object.
+ */
+public PushEVSEStatusRequest PushEVSEStatus(final Map<EVSE_Id, EVSEStatus>  EVSEStatus,
+                                            final ActionType                Action,
+                                            final EVSEOperator_Id           EVSEOperatorId,
+                                            final String                    EVSEOperatorName)
+{ ... }

File (2) Example.java Added

  • Ignore whitespace
  • Hide word diff
+Map<EVSE_Id, EVSEStatus> EVSEStatusMap = new HashMap<EVSE_Id, EVSEStatus>();
+EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*1"), EVSEStatus.Available);
+EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*2"), EVSEStatus.Occupied);
+
+CompletableFuture req = new CPOClient("api.playground.hubject.com").
+
+    PushEVSEStatus(EVSEStatusMap,
+                   ActionType.insert,
+                   EVSEOperator_Id.Parse("DE*GEF"),
+                   "Test CPO 1").
+
+    Run(ack -> {
+
+        if (ack.hasResult())
+            System.out.println("success!");
+
+        else {
+            System.out.println(ack.getStatusCode().getCode());
+            System.out.println(ack.getStatusCode().getDescription());
+            System.out.println(ack.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();

File Example.java Deleted

  • Ignore whitespace
  • Hide word diff
-Map<EVSE_Id, EVSEStatus> EVSEStatusMap = new HashMap<EVSE_Id, EVSEStatus>();
-EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*1"), EVSEStatus.Available);
-EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*2"), EVSEStatus.Occupied);
-
-CompletableFuture req = new CPOClient("api.playground.hubject.com").
-
-    PushEVSEStatus(EVSEStatusMap,
-                   ActionType.insert,
-                   EVSEOperator_Id.Parse("DE*GEF"),
-                   "Test CPO 1").
-
-    Run(ack -> {
-
-        if (ack.hasResult())
-            System.out.println("success!");
-
-        else {
-            System.out.println(ack.getStatusCode().getCode());
-            System.out.println(ack.getStatusCode().getDescription());
-            System.out.println(ack.getStatusCode().getAdditionalInfo());
-        }
-
-    });
-
-// Wait for the future to complete...
-req.get();

File Push EVSE Status | Java.java Deleted

  • Ignore whitespace
  • Hide word diff
-/**
- * Creates a new PushEVSEStatus request.
- *
- * @param EVSEStatus a mapping of EVSEIds to EVSEStatus values.
- * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
- * @param EVSEOperatorName the unique name of the EVSE operator for this request.
- * @param Action the server side data management operation for this request.
- * @return a new PushEVSEStatus request builder object.
- */
-public PushEVSEStatusRequest PushEVSEStatus(final Map<EVSE_Id, EVSEStatus>  EVSEStatus,
-                                            final ActionType                Action,
-                                            final EVSEOperator_Id           EVSEOperatorId,
-                                            final String                    EVSEOperatorName)
-{ ... }
Updated by Gregor Schermuly

File Example Deleted

  • Ignore whitespace
  • Hide word diff
-Map<EVSE_Id, EVSEStatus> EVSEStatusMap = new HashMap<EVSE_Id, EVSEStatus>();
-EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*1"), EVSEStatus.Available);
-EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*2"), EVSEStatus.Occupied);
-
-CompletableFuture req = new CPOClient("api.playground.hubject.com").
-
-    PushEVSEStatus(EVSEStatusMap,
-                   ActionType.insert,
-                   EVSEOperator_Id.Parse("DE*GEF"),
-                   "Test CPO 1").
-
-    Run(ack -> {
-
-        if (ack.hasResult())
-            System.out.println("success!");
-
-        else {
-            System.out.println(ack.getStatusCode().getCode());
-            System.out.println(ack.getStatusCode().getDescription());
-            System.out.println(ack.getStatusCode().getAdditionalInfo());
-        }
-
-    });
-
-// Wait for the future to complete...
-req.get();

File Example.java Added

  • Ignore whitespace
  • Hide word diff
+Map<EVSE_Id, EVSEStatus> EVSEStatusMap = new HashMap<EVSE_Id, EVSEStatus>();
+EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*1"), EVSEStatus.Available);
+EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*2"), EVSEStatus.Occupied);
+
+CompletableFuture req = new CPOClient("api.playground.hubject.com").
+
+    PushEVSEStatus(EVSEStatusMap,
+                   ActionType.insert,
+                   EVSEOperator_Id.Parse("DE*GEF"),
+                   "Test CPO 1").
+
+    Run(ack -> {
+
+        if (ack.hasResult())
+            System.out.println("success!");
+
+        else {
+            System.out.println(ack.getStatusCode().getCode());
+            System.out.println(ack.getStatusCode().getDescription());
+            System.out.println(ack.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();
Created by Gregor Schermuly

File Example Added

  • Ignore whitespace
  • Hide word diff
+Map<EVSE_Id, EVSEStatus> EVSEStatusMap = new HashMap<EVSE_Id, EVSEStatus>();
+EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*1"), EVSEStatus.Available);
+EVSEStatusMap.put(EVSE_Id.Parse("DE*GEF*E123456789*2"), EVSEStatus.Occupied);
+
+CompletableFuture req = new CPOClient("api.playground.hubject.com").
+
+    PushEVSEStatus(EVSEStatusMap,
+                   ActionType.insert,
+                   EVSEOperator_Id.Parse("DE*GEF"),
+                   "Test CPO 1").
+
+    Run(ack -> {
+
+        if (ack.hasResult())
+            System.out.println("success!");
+
+        else {
+            System.out.println(ack.getStatusCode().getCode());
+            System.out.println(ack.getStatusCode().getDescription());
+            System.out.println(ack.getStatusCode().getAdditionalInfo());
+        }
+
+    });
+
+// Wait for the future to complete...
+req.get();

File Push EVSE Status | Java.java Added

  • Ignore whitespace
  • Hide word diff
+/**
+ * Creates a new PushEVSEStatus request.
+ *
+ * @param EVSEStatus a mapping of EVSEIds to EVSEStatus values.
+ * @param EVSEOperatorId the unique identification of the EVSE operator for this request.
+ * @param EVSEOperatorName the unique name of the EVSE operator for this request.
+ * @param Action the server side data management operation for this request.
+ * @return a new PushEVSEStatus request builder object.
+ */
+public PushEVSEStatusRequest PushEVSEStatus(final Map<EVSE_Id, EVSEStatus>  EVSEStatus,
+                                            final ActionType                Action,
+                                            final EVSEOperator_Id           EVSEOperatorId,
+                                            final String                    EVSEOperatorName)
+{ ... }
HTTPS SSH

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