Snippets

OICP 2.1 Authorize Remote Start | C#

Updated by Julius Poessnecker

File (0) OICP Modified

  • Ignore whitespace
  • Hide word diff
-The service descrciption can be found in the OICP 2.1.
+The service description can be found in the OICP 2.1.
 
 Section:
 3.1.3 eRoamingAuthorizeRemoteStart
Updated by Julius Poessnecker

File (0) OICP Added

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

File (1) Authorize Remote Start | C#.cs Added

  • Ignore whitespace
  • Hide word diff
+/// <summary>
+/// Initialize the OICP HTTP/SOAP/XML server using IPAddress.Any.
+/// </summary>
+/// <param name="TCPPort">The TCP listing port.</param>
+/// <param name="URIPrefix">An optional prefix for the HTTP URIs.</param>
+public CPOServer(IPPort  TCPPort,
+                 String  URIPrefix = "")
+
+
+/// <summary>
+/// Initiate a remote start of the given charging session at the given EVSE
+/// and for the given Provider/eMAId.
+/// </summary>
+/// <param name="Timestamp">The timestamp of the request.</param>
+/// <param name="RoamingNetworkId">The unique identification for the roaming network.</param>
+/// <param name="SessionId">The unique identification for this charging session.</param>
+/// <param name="PartnerSessionId">The unique identification for this charging session on the partner side.</param>
+/// <param name="ProviderId">The unique identification of the e-mobility service provider.</param>
+/// <param name="eMAId">The unique identification of the e-mobility account.</param>
+/// <param name="EVSEId">The unique identification of an EVSE.</param>
+/// <param name="ChargingProductId">The unique identification of the choosen charging product at the given EVSE.</param>
+/// <param name="CancellationToken">A token to cancel this task.</param>
+/// <returns>A RemoteStartResult task.</returns>
+public delegate Task<RemoteStartResult> OnRemoteStartDelegate(DateTime            Timestamp,
+                                                              RoamingNetwork_Id   RoamingNetworkId,
+                                                              ChargingSession_Id  SessionId,
+                                                              ChargingSession_Id  PartnerSessionId,
+                                                              EVSP_Id             ProviderId,
+                                                              eMA_Id              eMAId,
+                                                              EVSE_Id             EVSEId,
+                                                              ChargingProduct_Id  ChargingProductId,
+                                                              CancellationToken   CancellationToken);
+
+/// <summary>
+/// An event fired whenever a remote start command was received.
+/// </summary>
+public event OnRemoteStartDelegate OnRemoteStart;

File (2) Example.cs Added

  • Ignore whitespace
  • Hide word diff
+var CPOServer = new CPOServer(new IPPort(3103));
+
+CPOServer.OnRemoteStart(async (Timestamp,
+                               RoamingNetworkId,
+                               SessionId,
+                               PartnerSessionId,
+                               ProviderId,
+                               eMAId,
+                               EVSEId,
+                               ChargingProductId,
+                               CancellationToken) => {
+
+    Console.WriteLine("[" +                  Timestamp.        ToString() +
+                      "] RemoteStart in '" + RoamingNetworkId. ToString() +
+                      "' from '"           + ProviderId.       ToString() +
+                      "' for '"            + eMAId.            ToString() +
+                      "' at '"             + EVSEId.           ToString() +
+                      "' / '"              + ChargingProductId.ToString() +
+                      "'");
+
+    return await Task.FromResult(RemoteStartResult.Success);
+
+});

File Authorize Remote Start | C#.cs Deleted

  • Ignore whitespace
  • Hide word diff
-/// <summary>
-/// Initialize the OICP HTTP/SOAP/XML server using IPAddress.Any.
-/// </summary>
-/// <param name="TCPPort">The TCP listing port.</param>
-/// <param name="URIPrefix">An optional prefix for the HTTP URIs.</param>
-public CPOServer(IPPort  TCPPort,
-                 String  URIPrefix = "")
-
-
-/// <summary>
-/// Initiate a remote start of the given charging session at the given EVSE
-/// and for the given Provider/eMAId.
-/// </summary>
-/// <param name="Timestamp">The timestamp of the request.</param>
-/// <param name="RoamingNetworkId">The unique identification for the roaming network.</param>
-/// <param name="SessionId">The unique identification for this charging session.</param>
-/// <param name="PartnerSessionId">The unique identification for this charging session on the partner side.</param>
-/// <param name="ProviderId">The unique identification of the e-mobility service provider.</param>
-/// <param name="eMAId">The unique identification of the e-mobility account.</param>
-/// <param name="EVSEId">The unique identification of an EVSE.</param>
-/// <param name="ChargingProductId">The unique identification of the choosen charging product at the given EVSE.</param>
-/// <param name="CancellationToken">A token to cancel this task.</param>
-/// <returns>A RemoteStartResult task.</returns>
-public delegate Task<RemoteStartResult> OnRemoteStartDelegate(DateTime            Timestamp,
-                                                              RoamingNetwork_Id   RoamingNetworkId,
-                                                              ChargingSession_Id  SessionId,
-                                                              ChargingSession_Id  PartnerSessionId,
-                                                              EVSP_Id             ProviderId,
-                                                              eMA_Id              eMAId,
-                                                              EVSE_Id             EVSEId,
-                                                              ChargingProduct_Id  ChargingProductId,
-                                                              CancellationToken   CancellationToken);
-
-/// <summary>
-/// An event fired whenever a remote start command was received.
-/// </summary>
-public event OnRemoteStartDelegate OnRemoteStart;

File Example.cs Deleted

  • Ignore whitespace
  • Hide word diff
-var CPOServer = new CPOServer(new IPPort(3103));
-
-CPOServer.OnRemoteStart(async (Timestamp,
-                               RoamingNetworkId,
-                               SessionId,
-                               PartnerSessionId,
-                               ProviderId,
-                               eMAId,
-                               EVSEId,
-                               ChargingProductId,
-                               CancellationToken) => {
-
-    Console.WriteLine("[" +                  Timestamp.        ToString() +
-                      "] RemoteStart in '" + RoamingNetworkId. ToString() +
-                      "' from '"           + ProviderId.       ToString() +
-                      "' for '"            + eMAId.            ToString() +
-                      "' at '"             + EVSEId.           ToString() +
-                      "' / '"              + ChargingProductId.ToString() +
-                      "'");
-
-    return await Task.FromResult(RemoteStartResult.Success);
-
-});
Updated by Gregor Schermuly

File Authorize Remote Start | C#.cs Modified

  • Ignore whitespace
  • Hide word diff
 /// <summary>
 /// An event fired whenever a remote start command was received.
 /// </summary>
-public event OnRemoteStartDelegate OnRemoteStart;
-
+public event OnRemoteStartDelegate OnRemoteStart;

File Example.cs Modified

  • Ignore whitespace
  • Hide word diff
-
 var CPOServer = new CPOServer(new IPPort(3103));
 
 CPOServer.OnRemoteStart(async (Timestamp,
Updated by Gregor Schermuly

File Authorize Remote Start | C#.cs Modified

  • Ignore whitespace
  • Hide word diff
 /// </summary>
 public event OnRemoteStartDelegate OnRemoteStart;
 
-
-
-///Example
-
-var CPOServer = new CPOServer(new IPPort(3103));
-
-CPOServer.OnRemoteStart(async (Timestamp,
-                               RoamingNetworkId,
-                               SessionId,
-                               PartnerSessionId,
-                               ProviderId,
-                               eMAId,
-                               EVSEId,
-                               ChargingProductId,
-                               CancellationToken) => {
-
-    Console.WriteLine("[" +                  Timestamp.        ToString() +
-                      "] RemoteStart in '" + RoamingNetworkId. ToString() +
-                      "' from '"           + ProviderId.       ToString() +
-                      "' for '"            + eMAId.            ToString() +
-                      "' at '"             + EVSEId.           ToString() +
-                      "' / '"              + ChargingProductId.ToString() +
-                      "'");
-
-    return await Task.FromResult(RemoteStartResult.Success);
-
-});

File Example.cs Added

  • Ignore whitespace
  • Hide word diff
+
+var CPOServer = new CPOServer(new IPPort(3103));
+
+CPOServer.OnRemoteStart(async (Timestamp,
+                               RoamingNetworkId,
+                               SessionId,
+                               PartnerSessionId,
+                               ProviderId,
+                               eMAId,
+                               EVSEId,
+                               ChargingProductId,
+                               CancellationToken) => {
+
+    Console.WriteLine("[" +                  Timestamp.        ToString() +
+                      "] RemoteStart in '" + RoamingNetworkId. ToString() +
+                      "' from '"           + ProviderId.       ToString() +
+                      "' for '"            + eMAId.            ToString() +
+                      "' at '"             + EVSEId.           ToString() +
+                      "' / '"              + ChargingProductId.ToString() +
+                      "'");
+
+    return await Task.FromResult(RemoteStartResult.Success);
+
+});
  1. 1
  2. 2
HTTPS SSH

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