/// <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>publicCPOServer(IPPortTCPPort,StringURIPrefix="")/// <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>publicdelegateTask<RemoteStartResult>OnRemoteStartDelegate(DateTimeTimestamp,RoamingNetwork_IdRoamingNetworkId,ChargingSession_IdSessionId,ChargingSession_IdPartnerSessionId,EVSP_IdProviderId,eMA_IdeMAId,EVSE_IdEVSEId,ChargingProduct_IdChargingProductId,CancellationTokenCancellationToken);/// <summary>/// An event fired whenever a remote start command was received./// </summary>publiceventOnRemoteStartDelegateOnRemoteStart;
varCPOServer=newCPOServer(newIPPort(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()+"'");returnawaitTask.FromResult(RemoteStartResult.Success);});
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.