123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- using EVCB_OCPP.Domain;
- using EVCB_OCPP.Packet.Features;
- using EVCB_OCPP.Packet.Messages;
- using EVCB_OCPP.Packet.Messages.Security;
- using OCPPServer.Protocol;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace EVCB_OCPP.WSServer.Message
- {
- internal partial class ProfileHandler
- {
- internal MessageResult ExecuteSecurityRequest(Actions action, ClientData session, IRequest request)
- {
- MessageResult result = new MessageResult() { Success = false };
- try
- {
- switch (action)
- {
-
-
- default:
- {
- Console.WriteLine(string.Format("Not Implement {0} Logic(ExecuteCoreRequest)", request.GetType().ToString().Replace("OCPPPackage.Messages.Core.", "")));
- }
- break;
- }
- }
- catch (Exception ex)
- {
- logger.Fatal(string.Format("chargeBoxId:{0} {1}", session.ChargeBoxId, action));
- logger.Fatal(string.Format("Data {0}", request.ToString()));
- logger.Fatal(string.Format("Error {0}", ex.ToString()));
- result.Exception = ex;
- }
-
- return result;
- }
- internal MessageResult ExecuteSecurityConfirm(Actions action, ClientData session, IConfirmation confirm, string requestId)
- {
- MessageResult result = new MessageResult() { Success = false };
- switch (action)
- {
-
- default:
- {
- Console.WriteLine(string.Format("Not Implement {0} Logic", confirm.GetType().ToString().Replace("OCPPPackage.Messages.RemoteTrigger.", "")));
- }
- break;
- }
- return result;
- }
- internal MessageResult ReceivedSecurityError(Actions action, string errorMsg, ClientData session, string requestId)
- {
- MessageResult result = new MessageResult() { Success = true };
- switch (action)
- {
-
- default:
- {
- Console.WriteLine(string.Format("Not Implement {0} Logic", action));
- }
- break;
- }
- return result;
- }
- }
- }
|