LocalBusinessService.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using EVCB_OCPP.Packet.Messages.SubTypes;
  2. using EVCB_OCPP.WSServer.Dto;
  3. using Newtonsoft.Json.Linq;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Configuration;
  7. using System.Net;
  8. using System.Threading.Tasks;
  9. namespace EVCB_OCPP.WSServer.Service
  10. {
  11. public class LocalBusinessService : IBusinessService
  12. {
  13. string customerId = string.Empty;
  14. public LocalBusinessService(string customerId)
  15. {
  16. this.customerId = customerId;
  17. }
  18. async public Task<IdTagInfo> Authorize(string chargeBoxId, string idTag)
  19. {
  20. await Task.Delay(10);
  21. return new IdTagInfo() { expiryDate = DateTime.UtcNow.AddDays(1), status = AuthorizationStatus.Accepted };
  22. }
  23. async public Task NotifyConnectorUnplugged(string chargeBoxId, string data)
  24. {
  25. await Task.Delay(10);
  26. }
  27. async public Task NotifyFaultStatus(ErrorDetails details)
  28. {
  29. await Task.Delay(10);
  30. }
  31. }
  32. }