/// <summary>/// Initialize the OICP HTTP/SOAP/XML server using IPAddress.Any.
/// </summary>/// <paramname="TCPPort">The TCP listing port.</param>/// <paramname="URIPrefix">An optional prefix for the HTTP URIs.</param>public CPOServer(IPPort TCPPort,
String URIPrefix = "")
/// <summary>/// A delegate fired whenever a remote stop command was received.
/// </summary>/// <paramname="Timestamp">The timestamp of the request.</param>/// <paramname="RoamingNetworkId">The unique identification for the roaming network.</param>/// <paramname="SessionId">The unique identification for this charging session.</param>/// <paramname="PartnerSessionId">The unique identification for this charging session on the partner side.</param>/// <paramname="ProviderId">The unique identification of the e-mobility service provider.</param>/// <paramname="EVSEId">The unique identification of an EVSE.</param>/// <paramname="CancellationToken">A token to cancel this task.</param>/// <returns>A RemoteStopResult task.</returns>public delegate Task<RemoteStopResult> OnRemoteStopDelegate(DateTime Timestamp,
RoamingNetwork_Id RoamingNetworkId,
ChargingSession_Id SessionId,
ChargingSession_Id PartnerSessionId,
EVSP_Id ProviderId,
EVSE_Id EVSEId,
CancellationToken CancellationToken);
/// <summary>/// An event fired whenever a remote stop command was received.
/// </summary>public event OnRemoteStopDelegate OnRemoteStop;
varCPOServer=newCPOServer(newIPPort(3103));CPOServer.OnRemoteStop(async(Timestamp,RoamingNetworkId,SessionId,PartnerSessionId,ProviderId,eMAId,EVSEId,CancellationToken)=>{Console.WriteLine("["+Timestamp.ToString()+"] RemoteStop in '"+RoamingNetworkId.ToString()+"' from '"+ProviderId.ToString()+"' at '"+EVSEId.ToString()+"'");returnawaitTask.FromResult(RemoteStopResult.Success);});
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.