From 77f292fdcca3aa3adde5fec7c3401dec6dee98c4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 15 Oct 2024 12:37:18 +0200 Subject: [PATCH] =?UTF-8?q?IOB-WIN=20ftp:=20-=20Fix=20x=20invio=20all'iniz?= =?UTF-8?q?io=20della=20machine=20CONF=20x=20FTP=20(senn=C3=B2=20non=20tra?= =?UTF-8?q?smette=20quando=20non=20trova=20in=20rete)=20-=20fix=20conf=20x?= =?UTF-8?q?=20port=2021=20FTP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini | 1 + IOB-WIN-NEXT/DATA/CONF/IMI_SONATEST.ini | 1 + IOB-WIN-NEXT/IobNet/Ftp.cs | 63 +++++++++++++------------ 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini b/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini index 9e19b689..61c0bbe1 100644 --- a/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini +++ b/IOB-WIN-NEXT/DATA/CONF/FTP_SONATEST.ini @@ -10,6 +10,7 @@ MODEL=SONATEST_VEO [CNC] IP=10.74.82.204 +PORT=21 PING_IP=10.74.82.204 GETPRGNAME=false diff --git a/IOB-WIN-NEXT/DATA/CONF/IMI_SONATEST.ini b/IOB-WIN-NEXT/DATA/CONF/IMI_SONATEST.ini index 1ce31990..f5fa50ed 100644 --- a/IOB-WIN-NEXT/DATA/CONF/IMI_SONATEST.ini +++ b/IOB-WIN-NEXT/DATA/CONF/IMI_SONATEST.ini @@ -10,6 +10,7 @@ MODEL=VEO [CNC] IP=172.28.30.208 +PORT=21 PING_IP=172.28.30.208 GETPRGNAME=false diff --git a/IOB-WIN-NEXT/IobNet/Ftp.cs b/IOB-WIN-NEXT/IobNet/Ftp.cs index 728fec8f..e2879ada 100644 --- a/IOB-WIN-NEXT/IobNet/Ftp.cs +++ b/IOB-WIN-NEXT/IobNet/Ftp.cs @@ -88,6 +88,8 @@ namespace IOB_WIN_NEXT.IobNet } } } + // invio conf macchina all'inizio + SendMachineConf(); } #endregion Public Constructors @@ -248,36 +250,6 @@ namespace IOB_WIN_NEXT.IobNet return taskDone; } - /// - /// Rimuove eventuali file placeholder di ODL corrente preesistenti - /// - /// - /// - private bool RemPlaceholder(string remDir, string fNameOdl) - { - bool fatto = false; - try - { - Dictionary currActParam = new Dictionary(); - currActParam.Add("RemoteDir", remDir); - currActParam.Add("FileName2Del", fNameOdl); - ActionConfig currAct = new ActionConfig() - { - Id = "01", - Description = "Clean Curr ODL Files", - Action = ActType.RemoveFileByName, - ParamList = currActParam - }; - // eseguo step... - fatto = doStep(currAct); - } - catch (Exception exc) - { - lgError($"Eccezione in RemPlaceholder{Environment.NewLine}{exc}"); - } - return fatto; - } - /// /// Effettua processing CUSTOM x FTP: /// - prende ogni conf specifica @@ -376,7 +348,6 @@ namespace IOB_WIN_NEXT.IobNet B_input = 0; } - #if false // annullo lettura bit signal IN pre/post x evitare invio automatico... B_output = B_input; @@ -854,6 +825,36 @@ namespace IOB_WIN_NEXT.IobNet return answ; } + /// + /// Rimuove eventuali file placeholder di ODL corrente preesistenti + /// + /// + /// + private bool RemPlaceholder(string remDir, string fNameOdl) + { + bool fatto = false; + try + { + Dictionary currActParam = new Dictionary(); + currActParam.Add("RemoteDir", remDir); + currActParam.Add("FileName2Del", fNameOdl); + ActionConfig currAct = new ActionConfig() + { + Id = "01", + Description = "Clean Curr ODL Files", + Action = ActType.RemoveFileByName, + ParamList = currActParam + }; + // eseguo step... + fatto = doStep(currAct); + } + catch (Exception exc) + { + lgError($"Eccezione in RemPlaceholder{Environment.NewLine}{exc}"); + } + return fatto; + } + #endregion Private Methods } } \ No newline at end of file