using EVCB_OCPP.Packet.Features; using EVCB_OCPP.Packet.Messages.Basic; using EVCB_OCPP.Packet.Messages.Core; using EVCB_OCPP.WSServer.Message; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EVCB_OCPP.WSServer { class Program { static void Main(string[] args) { //[2,"2185519c-18ef-4455-a968-4a219126bbd0","DataTransfer",{"vendorId":"Phihong Technology","messageId":"ID_FirmwareVersion","data":"{ "CsuBootLoadFwRev": "01.01", "CsuKernelFwRev": "4.9.59-ga75d8e9305\n", "CsuRootFsFwRev": "B0.30.60.1770.B0", "CsuPrimFwRev": "D0.53.60.1770.B0" }"}] var ff = new { CsuBootLoadFwRev = "01.01", CsuKernelFwRev = "4.9.59-ga75d8e9305\n", CsuRootFsFwRev = "B0.30.60.1770.B0", CsuPrimFwRev = "D0.53.60.1770.B0" }; BasicMessageHandler msgAnalyser = new BasicMessageHandler(); DataTransferRequest req = new DataTransferRequest { vendorId = "Phihong Technology", messageId = "ID_FirmwareVersion", data = JsonConvert.SerializeObject(ff) }; CallMessage message = new CallMessage(); // var ttttttttttttt =JsonConvert.SerializeObject(req); var tttttttt= msgAnalyser.GenerateRequest(Guid.NewGuid().ToString(),Actions.DataTransfer.ToString(), req); var array = JsonConvert.DeserializeObject(tttttttt); ProtalServer s = new ProtalServer(); Console.WriteLine("Starting Server..."); s.Start(); Console.Read(); } } }