Merge branch 'release/AddFtpIob09'
This commit is contained in:
@@ -13,6 +13,7 @@ using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace IOB_WIN_NEXT.IobNet
|
||||
@@ -93,6 +94,44 @@ namespace IOB_WIN_NEXT.IobNet
|
||||
}
|
||||
}
|
||||
}
|
||||
// simulo setup mappa memoria in scrittura...
|
||||
memMap = new plcMemMapExt();
|
||||
// area READ
|
||||
Dictionary<string, dataConfTSVC> ftpMemRead = new Dictionary<string, dataConfTSVC>();
|
||||
ftpMemRead.Add("FtpSync", new dataConfTSVC()
|
||||
{
|
||||
description = "Last FTP sync",
|
||||
name = "FtpSync",
|
||||
tipoMem = plcDataType.String,
|
||||
displOrdinal = 10
|
||||
});
|
||||
memMap.mMapRead = ftpMemRead;
|
||||
// area WRITE
|
||||
Dictionary<string, dataConf> ftpMemWrite = new Dictionary<string, dataConf>();
|
||||
ftpMemWrite.Add("setComm", new dataConf()
|
||||
{
|
||||
description = "Commessa",
|
||||
name = "setComm",
|
||||
tipoMem = plcDataType.String,
|
||||
displOrdinal = 1
|
||||
});
|
||||
ftpMemWrite.Add("setArt", new dataConf()
|
||||
{
|
||||
description = "Articolo",
|
||||
name = "setArt",
|
||||
tipoMem = plcDataType.String,
|
||||
displOrdinal = 2
|
||||
});
|
||||
ftpMemWrite.Add("setPzComm", new dataConf()
|
||||
{
|
||||
description = "Qta Richiesta",
|
||||
name = "setPzComm",
|
||||
tipoMem = plcDataType.Int,
|
||||
displOrdinal = 3
|
||||
});
|
||||
memMap.mMapWrite = ftpMemWrite;
|
||||
// eseguo setup + invio info configurazione...
|
||||
setupMemMap();
|
||||
// invio conf macchina all'inizio
|
||||
SendMachineConf();
|
||||
}
|
||||
@@ -342,6 +381,7 @@ namespace IOB_WIN_NEXT.IobNet
|
||||
// salto se fosse attivo il veto controllo folder...
|
||||
if (lastCheckDir.AddSeconds(vetoCheckDirSec) < adesso)
|
||||
{
|
||||
lastCheckDir = adesso;
|
||||
// verifico SE HO una folder da ODL in currProdData e se è disponibile...
|
||||
string reqFolder = getCurrProdData("setComm", "");
|
||||
if (!string.IsNullOrEmpty(reqFolder))
|
||||
@@ -710,12 +750,12 @@ namespace IOB_WIN_NEXT.IobNet
|
||||
// ciclo cercando eventuali info da emttere in DynData...
|
||||
foreach (var result in mirResult)
|
||||
{
|
||||
string objSize = MeasureUtils.SizeSuffix(result.Size, 3);
|
||||
actVal = $"Rem2Loc | {result.Name} | {objSize} | {result.RemotePath}";
|
||||
sVal = $"{actKey} | {actVal}";
|
||||
|
||||
if (result.IsDownload && result.IsSuccess && !result.IsSkipped)
|
||||
// processo solo se size > 0...
|
||||
if (result.Size > 0 && result.IsDownload && result.IsSuccess && !result.IsSkipped)
|
||||
{
|
||||
string objSize = MeasureUtils.SizeSuffix(result.Size, 3);
|
||||
actVal = $"Rem2Loc | {result.Name} | {objSize} | {result.RemotePath}";
|
||||
sVal = $"{actKey} | {actVal}";
|
||||
accodaFLog(sVal, qEncodeFLog(actKey, actVal));
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user