update test x sizing profile + fix conf porta tcp

This commit is contained in:
S.E.Locatelli
2022-05-20 17:31:59 +02:00
parent 66d68bd235
commit 6dd2c9afb9
2 changed files with 10 additions and 3 deletions
+7 -3
View File
@@ -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();
+3
View File
@@ -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);
}