From 6dd2c9afb9466005a154cb93197d8a2eb11cdbca Mon Sep 17 00:00:00 2001 From: "S.E.Locatelli" Date: Fri, 20 May 2022 17:31:59 +0200 Subject: [PATCH] update test x sizing profile + fix conf porta tcp --- EgwProxy.Icoel.Test/Program.cs | 10 +++++++--- EgwProxy.Icoel/Connector.cs | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/EgwProxy.Icoel.Test/Program.cs b/EgwProxy.Icoel.Test/Program.cs index 68936465..5b820510 100644 --- a/EgwProxy.Icoel.Test/Program.cs +++ b/EgwProxy.Icoel.Test/Program.cs @@ -187,7 +187,7 @@ namespace EgwProxy.Icoel.Test setup.Load(); string userInput = ""; // oggetto x connessione - Connector IcoelSizer = new Connector(setup.IndirizzoIpSizer, setup.TcpPortSizerClient); + Connector IcoelSizer = new Connector(setup.IndirizzoIpSizer, setup.SizerTcpPort); // ora effettua un pò di letture/scritture try @@ -234,8 +234,12 @@ namespace EgwProxy.Icoel.Test GrowerInfo GrowerData = new GrowerInfo(); IcoelSizer.EnqueueBatch(GrowerData, varGuid, layGuid); - IcoelSizer.GetCurrentBatch(); - + currBatch = IcoelSizer.GetCurrentBatch(); + foreach (var item in currBatch) + { + string lato = item.Key == 1 ? "SX" : "DX"; + Console.WriteLine($"[{item.Key}-{lato}] Grower code: {item.Value.GrowerCode} | Layout Name: {item.Value.LayoutName} | Totalling: [{item.Value.TotallingVarietyCode}] {item.Value.TotallingVariety} | Sizing: {item.Value.SizingProfileName} | Start {item.Value.StartTime} | End {item.Value.EndTime}"); + } Console.WriteLine("Test completato"); Console.WriteLine("Premere un tasto x chiudere"); Console.ReadKey(); diff --git a/EgwProxy.Icoel/Connector.cs b/EgwProxy.Icoel/Connector.cs index a9ca98ca..30bb284e 100644 --- a/EgwProxy.Icoel/Connector.cs +++ b/EgwProxy.Icoel/Connector.cs @@ -47,7 +47,10 @@ namespace EgwProxy.Icoel { using (var Client = new ComClient(ipAddress, tcpPort)) { + // va bene anche se vuoto! come lo torna ora... string sizingProfile = Client.GetCurrentBatch().SizingProfileName; + //var rawData = Client.GetCurrentBatchByLane(1); + //var rawData2 = Client.GetCurrentBatchByLane(2); Batch newBatch = CreateBatch(GrowerData, varGuid, layGuid, sizingProfile); Client.MettiLottoInCoda(newBatch); }