diff --git a/IOB-UT-NEXT/IobConfiguration.cs b/IOB-UT-NEXT/IobConfiguration.cs index a475c5f8..8ec8202e 100644 --- a/IOB-UT-NEXT/IobConfiguration.cs +++ b/IOB-UT-NEXT/IobConfiguration.cs @@ -5,10 +5,7 @@ using System.Collections.Generic; namespace IOB_UT_NEXT { /// - /// This Configuration class is basically just a set of properties with a couple of static - /// methods to manage the serialization to and deserialization from a simple XML file. - /// - /// ref: http://www.cambiaresearch.com/articles/33/how-can-i-easily-manage-an-xml-configuration-file-in-dotnet + /// Classe principale di configurazione di base per IOB, da cui derivano configurazioni + articolate x singoli IOB /// [Serializable] public class IobConfiguration @@ -22,6 +19,14 @@ namespace IOB_UT_NEXT { } + /// + /// Avvio configurazione da file di conf + /// + /// File di conf json/yaml valido + public IobConfiguration(string pathConfFile) + { + } + #endregion Public Constructors #region Public Properties diff --git a/IOB-WIN-PING/AdapterFormNext.cs b/IOB-WIN-PING/AdapterFormNext.cs index d4b03e39..fa3128f7 100644 --- a/IOB-WIN-PING/AdapterFormNext.cs +++ b/IOB-WIN-PING/AdapterFormNext.cs @@ -1,12 +1,12 @@ using IOB_UT_NEXT; -using IOB_WIN_PING.Iob; +using IOB_WIN_SHELLY.Iob; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace IOB_WIN_PING +namespace IOB_WIN_SHELLY { public class AdapterFormNext: IOB_WIN_FORM.AdapterForm { diff --git a/IOB-WIN-PING/Iob/GenericNext.cs b/IOB-WIN-PING/Iob/GenericNext.cs index 89815943..d5c6b110 100644 --- a/IOB-WIN-PING/Iob/GenericNext.cs +++ b/IOB-WIN-PING/Iob/GenericNext.cs @@ -1,6 +1,6 @@ using IOB_UT_NEXT; -namespace IOB_WIN_PING.Iob +namespace IOB_WIN_SHELLY.Iob { public class GenericNext : IOB_WIN_FORM.Iob.Generic { diff --git a/IOB-WIN-PING/MainFormNext.cs b/IOB-WIN-PING/MainFormNext.cs index 422d8335..d2ef6ea0 100644 --- a/IOB-WIN-PING/MainFormNext.cs +++ b/IOB-WIN-PING/MainFormNext.cs @@ -1,12 +1,12 @@ using IOB_UT_NEXT; -using IOB_WIN_PING.Iob; +using IOB_WIN_SHELLY.Iob; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace IOB_WIN_PING +namespace IOB_WIN_SHELLY { public class MainFormNext : IOB_WIN_FORM.MainForm { diff --git a/IOB-WIN-PING/Program.cs b/IOB-WIN-PING/Program.cs index 5671848f..e41ca546 100644 --- a/IOB-WIN-PING/Program.cs +++ b/IOB-WIN-PING/Program.cs @@ -1,7 +1,7 @@ using System; using System.Windows.Forms; -namespace IOB_WIN_PING +namespace IOB_WIN_SHELLY { internal static class Program { diff --git a/IOB-WIN-PING/Properties/Resources.Designer.cs b/IOB-WIN-PING/Properties/Resources.Designer.cs index 9c6ef2d4..1b872ccf 100644 --- a/IOB-WIN-PING/Properties/Resources.Designer.cs +++ b/IOB-WIN-PING/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace IOB_WIN_PING.Properties +namespace IOB_WIN_SHELLY.Properties { @@ -44,7 +44,7 @@ namespace IOB_WIN_PING.Properties { if ((resourceMan == null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_WIN_PING.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_WIN_SHELLY.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/IOB-WIN-PING/Properties/Settings.Designer.cs b/IOB-WIN-PING/Properties/Settings.Designer.cs index e329f97c..ee9726a4 100644 --- a/IOB-WIN-PING/Properties/Settings.Designer.cs +++ b/IOB-WIN-PING/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace IOB_WIN_PING.Properties +namespace IOB_WIN_SHELLY.Properties { diff --git a/IOB-WIN-SHELLY.sln b/IOB-WIN-SHELLY.sln new file mode 100644 index 00000000..2afa8dce --- /dev/null +++ b/IOB-WIN-SHELLY.sln @@ -0,0 +1,97 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32505.173 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.csproj", "{58E399F3-9D4E-49D3-AB35-9ED536543D50}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B52E3E86-1B82-4F4D-982C-0C8909CD2A28}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-UT-NEXT", "IOB-UT-NEXT\IOB-UT-NEXT.csproj", "{90512E12-29FC-460D-94CC-648C2A072DBD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-FORM", "IOB-WIN-FORM\IOB-WIN-FORM.csproj", "{9BA331BB-9BF1-40E0-AC03-74B43D73A097}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-PING", "IOB-WIN-PING\IOB-WIN-PING.csproj", "{6ADF1E82-124C-489C-99EF-A857C933D362}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-SHELLY", "IOB-WIN-SHELLY\IOB-WIN-SHELLY.csproj", "{7642AEAD-7A35-45A6-8761-81D97CD8905C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU + Remote_DEBUG|x86 = Remote_DEBUG|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.ActiveCfg = Debug|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.Build.0 = Debug|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.Build.0 = Release|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.ActiveCfg = Release|x86 + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.Build.0 = Release|x86 + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.ActiveCfg = Remote_DEBUG|x86 + {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.Build.0 = Remote_DEBUG|x86 + {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.ActiveCfg = Debug|x86 + {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.Build.0 = Debug|x86 + {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.Build.0 = Release|Any CPU + {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.ActiveCfg = Release|x86 + {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.Build.0 = Release|x86 + {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU + {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|x86.ActiveCfg = Release|x86 + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|x86.ActiveCfg = Debug|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|x86.Build.0 = Debug|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.Build.0 = Release|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.ActiveCfg = Release|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.Build.0 = Release|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU + {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.Build.0 = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.ActiveCfg = Debug|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.Build.0 = Debug|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.Build.0 = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.ActiveCfg = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.Build.0 = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU + {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.Build.0 = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Debug|x86.ActiveCfg = Debug|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Debug|x86.Build.0 = Debug|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Release|Any CPU.Build.0 = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Release|x86.ActiveCfg = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Release|x86.Build.0 = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C}.Remote_DEBUG|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {801DCDC5-B7D3-4EA5-B543-783D2C91765F} + EndGlobalSection +EndGlobal diff --git a/IOB-WIN-SHELLY/AdapterFormNext.cs b/IOB-WIN-SHELLY/AdapterFormNext.cs new file mode 100644 index 00000000..fa3128f7 --- /dev/null +++ b/IOB-WIN-SHELLY/AdapterFormNext.cs @@ -0,0 +1,56 @@ +using IOB_UT_NEXT; +using IOB_WIN_SHELLY.Iob; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IOB_WIN_SHELLY +{ + public class AdapterFormNext: IOB_WIN_FORM.AdapterForm + { + + /// + /// Avvio MainForm + /// + /// + public AdapterFormNext(string codIOB): base(codIOB) + { + } + /// + /// carica IOB richiesto + /// + protected override void loadIobType() + { + if (IOBConf != null) + { + switch (tipoScelto) + { + + case tipoAdapter.PingWatchdog: + iobObj = new IOB_WIN_FORM.Iob.PingWatchDog(this, IOBConf); + btnStart.Enabled = true; + break; + + case tipoAdapter.SIMULA: + case tipoAdapter.ND: + default: + iobObj = new IOB_WIN_FORM.Iob.Simula(this, IOBConf); + btnStart.Enabled = false; + break; + } + lblCncText = $"CNC: {IOBConf.tipoIob} [{IOBConf.cncIpAddr}:{IOBConf.cncPort}]"; + lblSrvUrlText = $"SRV: {IOBConf.serverData.MPIP} | URL: {IOBConf.serverData.MPURL}{IOBConf.serverData.CMDBASE}"; + + // aggancio evento refresh + iobObj.eh_refreshed += IobObj_eh_refreshed; + + // carico i default values su interfaccia + setDefaults(); + + displayTaskAndLog($"Caricata conf per adapter {tipoScelto}"); + } + } + } +} diff --git a/IOB-WIN-SHELLY/App.Debug.config b/IOB-WIN-SHELLY/App.Debug.config new file mode 100644 index 00000000..42297ccc --- /dev/null +++ b/IOB-WIN-SHELLY/App.Debug.config @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/App.Release.config b/IOB-WIN-SHELLY/App.Release.config new file mode 100644 index 00000000..0f80d173 --- /dev/null +++ b/IOB-WIN-SHELLY/App.Release.config @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/App.config b/IOB-WIN-SHELLY/App.config new file mode 100644 index 00000000..29b5255d --- /dev/null +++ b/IOB-WIN-SHELLY/App.config @@ -0,0 +1,186 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/DATA/CONF/IOB.ini b/IOB-WIN-SHELLY/DATA/CONF/IOB.ini new file mode 100644 index 00000000..9ac13668 --- /dev/null +++ b/IOB-WIN-SHELLY/DATA/CONF/IOB.ini @@ -0,0 +1,50 @@ +;Configurazione IOB-WIN +[IOB] +CNCTYPE=FANUC +;IDXMACC=3001 + +[CNC] +; TEST TORNOS! +;IP=192.168.1.80 +IP=172.16.199.10 +PORT=8193 + +[SERVER] +MPIP=http://10.74.82.219 +MPURL=/MP/IO +CMDBASE=/IOB/input/ +CMDFLOG=/IOB/flog/ +CMDALIVE=/IOB +CMDENABLED=/IOB/enabled/ +CMDADV1=?valore= +CMDREBO=/sendReboot.aspx?idxMacchina= + +[MEMORY] +BITRED=Y8.4 +BITYELLOW=Y8.5 +BITGREEN=Y8.6 + +[BLINK] +;MAX_COUNTER_BLINK = 30 +MAX_COUNTER_BLINK = 15 +;bit0 = 0 +;bit1 = 0 +;bit2 = 1 +;bit3 = 1 +;bit4 = 1 +;bit5 = 0 +;bit6 = 0 +;bit7 = 0 +BLINK_FILT=0 +;BLINK_FILT=28 + +[OPTPAR] +;PZCOUNT_MODE=STD|BIT +PZCOUNT_MODE=BIT +PZ_CAD_MADDR=1602 +PZ_REQ_MADDR=1603 +PZ_DONE_MADDR=1604 +PZ_GTOT_MADDR=1605 + +[BRANCH] +NAME=master diff --git a/IOB-WIN-SHELLY/DATA/CONF/MAIN.ini b/IOB-WIN-SHELLY/DATA/CONF/MAIN.ini new file mode 100644 index 00000000..f164ab5d --- /dev/null +++ b/IOB-WIN-SHELLY/DATA/CONF/MAIN.ini @@ -0,0 +1,24 @@ +;Configurazione IOB-WIN GENERALE +[BRANCH] +NAME=master + +[SERVER] + +; Server Steamware +MPIP=10.74.82.218 +MPURL=/MP/IO +CMDREBO=/IOB/sendRebootGateway?GWIP= +CMDIOB2CALL=/IOB/getIob2call?GWIP= + +;Client Install +CLI_INST=SteamWareSim + +[IOB] +;--- TEST sul campo +; SIMULAZIONE verso server ufficio +;STARTLIST=SIMUL_01,SIMUL_02,SIMUL_03,SIMUL_04 +;STARTLIST=SIMUL_01 +STARTLIST=SHELLY_01 + + +MAXCNC=10 \ No newline at end of file diff --git a/IOB-WIN-SHELLY/DATA/CONF/PING.ini b/IOB-WIN-SHELLY/DATA/CONF/PING.ini new file mode 100644 index 00000000..1a4c140e --- /dev/null +++ b/IOB-WIN-SHELLY/DATA/CONF/PING.ini @@ -0,0 +1,51 @@ +;Configurazione IOB-WIN +[IOB] +CNCTYPE=PingWatchdog +PING_MS_TIMEOUT=500 +;IOB_NAME=SIMUL_09 +IOB_NAME=SIMUL_01 + +[MACHINE] +VENDOR=STEAMWARE +MODEL=WATCHDOG + +[CNC] +IP=10.74.83.183 +;IP=10.74.82.253 +PORT=0000 + +[SERVER] +MPIP=http://10.74.82.218 +MPURL=/MP/IO +CMDBASE=/IOB/input/ +CMDFLOG=/IOB/flog/ +CMDALIVE=/IOB +CMDENABLED=/IOB/enabled/ +CMDADV1=?valore= +CMDREBO=/sendReboot.aspx?idxMacchina= +CMD_ODL_STARTED=/IOB/getCurrOdlStart/ +CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/ +CMD_IDLE_TIME=/IOB/getIdlePeriod/ + +[MEMORY] + +[BLINK] +MAX_COUNTER_BLINK = 15 +BLINK_FILT=0 + +[OPTPAR] +VETO_QUEUE_IN=15 +AUTO_CHANGE_ODL=false +POWEROFF_TIMEOUT_SEC=60 +DISABLE_PZCOUNT=TRUE +;; gestioni PING +;MAX_TRY_PING=3 +;VETO_QUEUE_IN=4 +;VETO_PING_SEC=4 +;VETO_CHECKDIR_SEC=10 +;MAX_ELAPSED_TIME_SEC=60 +;VETO_SEND_SNAPSHOT=3 + + +[BRANCH] +NAME=master \ No newline at end of file diff --git a/IOB-WIN-SHELLY/DATA/CONF/SHELLY_01.ini b/IOB-WIN-SHELLY/DATA/CONF/SHELLY_01.ini new file mode 100644 index 00000000..08975356 --- /dev/null +++ b/IOB-WIN-SHELLY/DATA/CONF/SHELLY_01.ini @@ -0,0 +1,120 @@ +;Configurazione IOB-WIN +[IOB] +CNCTYPE=SIMULA +PING_MS_TIMEOUT=500 +MinDeltaSec=5 +EnableRedisQueue=true +;IOB_NAME=TFT_RAMA_001 + +[MACHINE] +VENDOR=STEAMWARE +MODEL=DEMO_SIMULATOR + +[CNC] +IP=127.0.0.1 +PORT=0000 + +[SERVER] +MPIP=http://10.74.82.218 +MPURL=/MP/IO +CMDBASE=/IOB/input/ +CMDFLOG=/IOB/flog/ +CMDALIVE=/IOB +CMDENABLED=/IOB/enabled/ +CMDADV1=?valore= +CMDREBO=/sendReboot.aspx?idxMacchina= +CMD_ODL_STARTED=/IOB/getCurrOdlStart/ +CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/ +CMD_IDLE_TIME=/IOB/getIdlePeriod/ + +[MEMORY] + +[BLINK] +MAX_COUNTER_BLINK = 15 +BLINK_FILT=0 + +[OPTPAR] +DISABLE_SEND_WDST=TRUE +AUTO_CHANGE_ODL=true +AUTO_SNAPSHOT_DOSSIER=true +CHANGE_ODL_HOURS=24 +CHANGE_ODL_IDLE_MIN=0 +CHANGE_ODL_MODE=SIMUL +; gestione custom timer +timerIntMs=100 +;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice +PZCOUNT_MODE=BIT +ENABLE_PZ_RESET=TRUE +;gestione invio pezzi in blocco +ENABLE_SEND_PZC_BLOCK=TRUE +MIN_SEND_PZC_BLOCK=0 +MAX_SEND_PZC_BLOCK=100 +; gestione cambio ODL automatico (minuti minimi durata) +MIN_DURATA_ODL=960 +; per il simulatore: 50|1 = WAIT 50, DURATION 1 con riferimento al PERIODO base (PER_BASE in ms, default 10 secondi) +PER_BASE=10100 +SIM_PZCNT=5|1 +SIM_ALARM=100|10 +SIM_MANU=50|6 +; indica gestione e simulazione bit 5 --> slow +SIM_SLOW=3600|20 +; indica gestione e simulazione bit 6 --> warmup/cooldown +SIM_WUCD=8000|20 +; indica gestione e simulazione bit 7 --> emergenza +SIM_EMRG=4000|10 +; indica simulazione delle funzionalità power ON/ OFF +SIM_POW_ON_OFF=true +T_ON=7 +T_OFF=22 +; indica simulazione controlli utente +SIM_RC=81|1 +; indica simulazione registro scarti +SIM_RS=161|1 +; indica simulazione dichiarazioni (note) utente +SIM_DICH=261|1 +; indica matricola opr simulata +SIM_MATR_OPR=1 + +; test x datasync... +DATA_SYNC_AT_START=true +; test sim dossiers tipo Kepware +SIM_KWP=true + +; gestione DynData simulati +ENABLE_DYN_DATA=TRUE +FORCE_DYN_DATA=TRUE +NEW_DYN_DATA=TRUE +; indica parametri gestione TcMan +TC_MAX_TC_FACTOR=3.9 +TC_LAMBDA=0.4 +TC_MAX_INCR=5 +MAX_PZ_INCR_PERC=1000 +; conf parametri memoria READ/WRITE +PARAM_CONF=SIMUL_01.json +ALARM_CONF=SIMUL_01_alarm.json +;test gestione logfile (eg: soitaab) +EnabelPodlManFull=true +CodGruppoIob=STEAMWARE-SIM-FASE-01 +; invio flux alla lettura file +sendFluxOnRead=true + +;conf test FTP +FTP_SERVER=ftp.steamware.net +FTP_USER=testftpuser +FTP_PWD=we4reFromB3rghem! +FTP_CERT= +FTP_SKIP=TRUE +FTP_LOC_DIR=temp\csv +FTP_REM_DIR= +CSV_ADD_HEADER=true + + +[BRANCH] +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-SHELLY/DATA/CONF/SHELLY_01.json b/IOB-WIN-SHELLY/DATA/CONF/SHELLY_01.json new file mode 100644 index 00000000..d2895eb1 --- /dev/null +++ b/IOB-WIN-SHELLY/DATA/CONF/SHELLY_01.json @@ -0,0 +1,410 @@ +{ + "mMapWrite": { + "setArt": { + "name": "setArt", + "description": "Articolo", + "memAddr": "DB150.DBB12", + "tipoMem": "String", + "index": 12, + "size": 20, + "displOrdinal": 1 + }, + "setArtNum": { + "name": "setArtNum", + "description": "# Num Articolo", + "memAddr": "DB150.DBB112", + "tipoMem": "Int", + "index": 112, + "size": 4, + "displOrdinal": 1 + }, + "setComm": { + "name": "setComm", + "description": "Commessa", + "memAddr": "DB150.DBB32", + "tipoMem": "String", + "index": 32, + "size": 20, + "displOrdinal": 2 + }, + "setCommNum": { + "name": "setCommNum", + "description": "# NumCommessa", + "memAddr": "DB150.DBB132", + "tipoMem": "Int", + "index": 132, + "size": 4, + "displOrdinal": 2 + }, + "setPzComm": { + "name": "setPzComm", + "description": "Qta Richiesta", + "memAddr": "DB150.DBB8", + "tipoMem": "Int", + "index": 8, + "size": 4, + "displOrdinal": 3 + }, + "forceSetPzCount": { + "name": "forceSetPzCount", + "description": "Imposta Qta", + "memAddr": "DB150.DBB8", + "tipoMem": "Int", + "index": 8, + "size": 4, + "displOrdinal": 11 + }, + //"OPC_Set Point.Chain Spped": { + // "name": "OPC_Set Point.Chain Spped", + // "description": "Chain Spped", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Chain Spped", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Top Overfeeding": { + // "name": "OPC_Set Point.Top Overfeeding", + // "description": "Top Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Top Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Bottom Overfeeding": { + // "name": "OPC_Set Point.Bottom Overfeeding", + // "description": "Bottom Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Bottom Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Width Master": { + // "name": "OPC_Set Point.Width Master", + // "description": "Width Master", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Width Master", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Thermoset Time": { + // "name": "OPC_Set Point.Thermoset Time", + // "description": "Thermoset Time", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Thermoset Time", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Thermoset Temperature": { + // "name": "OPC_Set Point.Thermoset Temperature", + // "description": "Thermoset Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Thermoset Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Take Off Overfeeding": { + // "name": "OPC_Set Point.Take Off Overfeeding", + // "description": "Take Off Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Take Off Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Small Roller Overfeeding": { + // "name": "OPC_Set Point.Small Roller Overfeeding", + // "description": "Small Roller Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Small Roller Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Scroll Roller Overfeeding": { + // "name": "OPC_Set Point.Scroll Roller Overfeeding", + // "description": "Scroll Roller Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Scroll Roller Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Right Whell Overfeeding": { + // "name": "OPC_Set Point.Right Whell Overfeeding", + // "description": "Right Whell Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Right Whell Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Plaiter Overfeeding": { + // "name": "OPC_Set Point.Plaiter Overfeeding", + // "description": "Plaiter Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Plaiter Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Load cell Weight": { + // "name": "OPC_Set Point.Load cell Weight", + // "description": "Load cell Weight", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Load cell Weight", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Left Wheel Overfeeding": { + // "name": "OPC_Set Point.Left Wheel Overfeeding", + // "description": "Left Wheel Overfeeding", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Left Wheel Overfeeding", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Fan 105A Speed": { + // "name": "OPC_Set Point.Fan 105A Speed", + // "description": "Fan 105A Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Fan 105A Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Fan 105 Speed": { + // "name": "OPC_Set Point.Fan 105 Speed", + // "description": "Fan 105 Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Fan 105 Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Fan 103A Speed": { + // "name": "OPC_Set Point.Fan 103A Speed", + // "description": "Fan 103A Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Fan 103A Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Fan 103 Speed": { + // "name": "OPC_Set Point.Fan 103 Speed", + // "description": "Fan 103 Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Fan 103 Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Fan 101A Speed": { + // "name": "OPC_Set Point.Fan 101A Speed", + // "description": "Fan 101A Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Fan 101A Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Fan 101 Speed": { + // "name": "OPC_Set Point.Fan 101 Speed", + // "description": "Fan 101 Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Fan 101 Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Exhaust Fan 1 Speed": { + // "name": "OPC_Set Point.Exhaust Fan 1 Speed", + // "description": "Exhaust Fan 1 Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Exhaust Fan 1 Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Differentiation Spindle 5": { + // "name": "OPC_Set Point.Differentiation Spindle 5", + // "description": "Differentiation Spindle 5", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Differentiation Spindle 5", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Differentiation Spindle 4": { + // "name": "OPC_Set Point.Differentiation Spindle 4", + // "description": "Differentiation Spindle 4", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Differentiation Spindle 4", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Differentiation Spindle 3": { + // "name": "OPC_Set Point.Differentiation Spindle 3", + // "description": "Differentiation Spindle 3", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Differentiation Spindle 3", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Differentiation Spindle 2": { + // "name": "OPC_Set Point.Differentiation Spindle 2", + // "description": "Differentiation Spindle 2", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Differentiation Spindle 2", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Differentiation Spindle 1": { + // "name": "OPC_Set Point.Differentiation Spindle 1", + // "description": "Differentiation Spindle 1", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Differentiation Spindle 1", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Cooling Cell 1 Speed": { + // "name": "OPC_Set Point.Cooling Cell 1 Speed", + // "description": "Cooling Cell 1 Speed", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Cooling Cell 1 Speed", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Burner 6 Temperature": { + // "name": "OPC_Set Point.Burner 6 Temperature", + // "description": "Burner 6 Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Burner 6 Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Burner 5 Temperature": { + // "name": "OPC_Set Point.Burner 5 Temperature", + // "description": "Burner 5 Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Burner 5 Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Burner 4 Temperature": { + // "name": "OPC_Set Point.Burner 4 Temperature", + // "description": "Burner 4 Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Burner 4 Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Burner 3 Temperature": { + // "name": "OPC_Set Point.Burner 3 Temperature", + // "description": "Burner 3 Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Burner 3 Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Burner 2 Temperature": { + // "name": "OPC_Set Point.Burner 2 Temperature", + // "description": "Burner 2 Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Burner 2 Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Burner 1 Temperature": { + // "name": "OPC_Set Point.Burner 1 Temperature", + // "description": "Burner 1 Temperature", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Burner 1 Temperature", + // "index": 0, + // "size": 0 + //}, + //"OPC_Set Point.Air Humidity Preset Esa 1": { + // "name": "OPC_Set Point.Air Humidity Preset Esa 1", + // "description": "Air Humidity Preset Esa 1", + // "tipoMem": "String", + // "memAddr": "ns=2;s=RamosaETN21.RamosaCJ2.Recipe.Air Humidity Preset Esa 1", + // "index": 0, + // "size": 0 + //} + }, + "mMapRead": { + "TEMP_01": { + "name": "TEMP_01", + "description": "Temperatura 01", + "tipoMem": "Real", + "minVal": 18, + "maxVal": 24, + "displOrdinal": 4 + }, + "POWER_01": { + "name": "POWER_01", + "description": "Potenza impianto", + "tipoMem": "Int", + "minVal": 40, + "maxVal": 80, + "displOrdinal": 5 + }, + "FEED_OVER": { + "name": "FEED_OVER", + "description": "FEED override", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 100, + "displOrdinal": 6 + }, + "RAPID_OVER": { + "name": "RAPID_OVER", + "description": "RAPID override", + "tipoMem": "Int", + "minVal": 50, + "maxVal": 120, + "displOrdinal": 7 + }, + "POS_X": { + "name": "POS_X", + "description": "Asse X", + "tipoMem": "Int", + "minVal": -2000, + "maxVal": 2000, + "displOrdinal": 8 + }, + "POS_Y": { + "name": "POS_Y", + "description": "Asse Y", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 2000, + "displOrdinal": 9 + }, + "POS_Z": { + "name": "POS_Z", + "description": "Asse Z", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 1500, + "displOrdinal": 10 + } + }, + "optKVP": { + "fluxLogReduce": true, + "fluxLogRedDeadBand": 1.5, + "fluxLogResendPeriod": 15, + "hasRecipe": true, + "maxPodlQty": 530, + "useLocalRecipe": true, + "path-locBase": "C:\\MesData\\", + "path-00-Arch": "ArchivioRicette\\FIMAT", + "path-01-Temp": "01-Temp\\FIMAT", + "path-02-Sent": "02-Inviate\\FIMAT", + "path-03-Recv": "03-Ricevute\\FIMAT", + "path-04-remReq": "Y:\\", + "path-05-remExe": "C:\\MesData\\Remote\\Dosed", + "path-06-remRec": "R:\\", + "path-outReport": "C:\\MesData\\Report", + "path-confSetup": "C:\\MesData\\Setup\\setupConsumi.json", + "replace-": "{{PODL}}", + "replace-": "Kg{{Qty}} | {{Note}}" + }, //, + //"BaseKeyTranslate": "ns=2;s=RamosaETN21.RamosaCJ2", + //"RecipeKeyTranslate": { + // "Present Value.General Fan": "Recipe.Chain Spped", + // "Present Value.Bottom Overfeeding": "Recipe.Bottom Overfeeding", + // "Present Value.Top Overfeeding": "Recipe.Top Overfeeding" + //} + "mMapWriteLink": { + "setArt": "setArtNum", + "setComm": "setCommNum" + } +} \ No newline at end of file diff --git a/IOB-WIN-SHELLY/ILLink/ILLink.Descriptors.LibraryBuild.xml b/IOB-WIN-SHELLY/ILLink/ILLink.Descriptors.LibraryBuild.xml new file mode 100644 index 00000000..a42d7f0e --- /dev/null +++ b/IOB-WIN-SHELLY/ILLink/ILLink.Descriptors.LibraryBuild.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/IOB-WIN-SHELLY/IOB-WIN-SHELLY.csproj b/IOB-WIN-SHELLY/IOB-WIN-SHELLY.csproj new file mode 100644 index 00000000..78114c3e --- /dev/null +++ b/IOB-WIN-SHELLY/IOB-WIN-SHELLY.csproj @@ -0,0 +1,226 @@ + + + + + Debug + AnyCPU + {7642AEAD-7A35-45A6-8761-81D97CD8905C} + WinExe + IOB_WIN_SHELLY + IOB-WIN-SHELLY + v4.6.2 + 512 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\EgwProxy.Shelly.3.7.2502.1210\lib\EgwProxy.Shelly.dll + + + ..\packages\Flurl.4.0.0\lib\net461\Flurl.dll + + + ..\packages\Flurl.Http.4.0.2\lib\net461\Flurl.Http.dll + + + ..\packages\MapoSDK.6.14.2411.518\lib\MapoSDK.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\packages\Microsoft.Extensions.Logging.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + ..\packages\StackExchange.Redis.2.8.24\lib\net461\StackExchange.Redis.dll + + + + ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll + + + + ..\packages\System.Diagnostics.DiagnosticSource.9.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll + + + ..\packages\System.Diagnostics.PerformanceCounter.4.7.0\lib\net461\System.Diagnostics.PerformanceCounter.dll + + + ..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll + + + ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + + + ..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll + + + ..\packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll + + + ..\packages\System.Threading.Channels.9.0.0\lib\net462\System.Threading.Channels.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll + + + + + + + + + + + + + + VersGen.cs + + + Form + + + + + Form + + + + + + Always + + + Always + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + App.config + PreserveNewest + + + App.config + PreserveNewest + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + Always + + + + Always + + + + + Designer + PreserveNewest + + + + + Always + + + + Always + + + + Always + + + Always + + + + + + {90512e12-29fc-460d-94cc-648c2a072dbd} + IOB-UT-NEXT + + + {9ba331bb-9bf1-40e0-ac03-74b43d73a097} + IOB-WIN-FORM + + + + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/Iob/GenericNext.cs b/IOB-WIN-SHELLY/Iob/GenericNext.cs new file mode 100644 index 00000000..d5c6b110 --- /dev/null +++ b/IOB-WIN-SHELLY/Iob/GenericNext.cs @@ -0,0 +1,13 @@ +using IOB_UT_NEXT; + +namespace IOB_WIN_SHELLY.Iob +{ + public class GenericNext : IOB_WIN_FORM.Iob.Generic + { + + public GenericNext(AdapterFormNext caller, IobConfiguration IOBConf): base((IOB_WIN_FORM.AdapterForm)caller, IOBConf) + { + } + + } +} \ No newline at end of file diff --git a/IOB-WIN-SHELLY/Iob/ShellyClient.cs b/IOB-WIN-SHELLY/Iob/ShellyClient.cs new file mode 100644 index 00000000..6a18359d --- /dev/null +++ b/IOB-WIN-SHELLY/Iob/ShellyClient.cs @@ -0,0 +1,1028 @@ +using EgwProxy.Shelly; +using IOB_UT_NEXT; +using MapoSDK; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net.NetworkInformation; + +namespace IOB_WIN_SHELLY.Iob +{ + /// + /// Classe gestione oggetti Shelly + /// + public class ShellyClient : Iob.GenericNext + { + #region Public Constructors + + /// + /// Estende l'init della classe base, impiegando il pacchetto EgwProxy.Shelly + /// - gestione dei task da svolgere da configurazione json specifica + /// - specializzazione da conf e non da codice + /// + /// + /// + public ShellyClient(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf) + { + lgInfo("Init Iob.ShellyClient"); + // imposto + B_input = 0; + // init datetime counters + DateTime adesso = DateTime.Now; + lastPzCountSend = adesso; + lastWarnODL = adesso; + vetoCheckStatus = adesso; + // 2023.09.05 imposto anche primo ping e check disconnected... + lastPING = adesso; + lastDisconnCheck = adesso; + var VETO_PING_SEC = getOptPar("VETO_PING_SEC"); + if (!string.IsNullOrEmpty(VETO_PING_SEC)) + { + int.TryParse(VETO_PING_SEC, out vetoPingSec); + } + var VETO_CHECKDIR_SEC = getOptPar("VETO_CHECKDIR_SEC"); + if (!string.IsNullOrEmpty(VETO_CHECKDIR_SEC)) + { + int.TryParse(VETO_CHECKDIR_SEC, out vetoCheckDirSec); + } + var POWEROFF_TIMEOUT_SEC = getOptPar("POWEROFF_TIMEOUT_SEC"); + if (!string.IsNullOrEmpty(POWEROFF_TIMEOUT_SEC)) + { + int.TryParse(POWEROFF_TIMEOUT_SEC, out PoweroffTimeoutSec); + } + // fix coda ping + PingQueue = new DataQueue("000", "PingQueue", false); + // carico conf specifica steps FTP + string ftpConfFile = getOptPar("FTP_PARAM"); + if (!string.IsNullOrEmpty(ftpConfFile)) + { + loadFtpConfFile(ftpConfFile); +#if false + // mi calcolo ed imposto la ftpClientMan + Remote BaseDir... + string actKey = "RemoteDir"; + if (currFtpTaskList != null && currFtpTaskList.ListTask.Count > 0) + { + // prendo i task + foreach (var fTask in currFtpTaskList.ListTask) + { + if (string.IsNullOrEmpty(RemoteBaseDir)) + { + foreach (var fAct in fTask.StepsList) + { + // cerco nei parametri... + if (fAct.ParamList.ContainsKey(actKey)) + { + RemoteBaseDir = fAct.ParamList[actKey]; + break; + } + } + } + if (!ftpClientMan.IsConfigured) + { + // setup ftpClientMan! + ftpClientMan = new Manager(fTask.ServerAddr, fTask.ConnUser, fTask.ConnPasswd, fTask.RawCert, fTask.SkipCert); + } + } + } +#endif + } + forceMemMap(); + // invio conf macchina all'inizio + SendMachineConf(); + } + + #endregion Public Constructors + + #region Public Methods + + /// + /// Processo i task richiesti e li elimino dalla coda + /// + /// + public override Dictionary executeTasks(Dictionary task2exe) + { + /*--------------------------------------------------------------------------- + * va creata una folder x ogni ODL (una volta LANCIATO da tablet) APERTO + * - nella folder scriviamo un file con articolo, qta, commessa + * - la folder sarà usata x salvare OGNI file necessario e di rilevazione + * - per farlo si creeano degli ActionStep specifici e vengono poi richiamati... + *---------------------------------------------------------------------------*/ + + // Verificare il protocollo: dovrebbe togliere SOLO i task eseguiti... + Dictionary taskDone = new Dictionary(); + ActionConfig currAct = new ActionConfig(); + var currActParam = new Dictionary(); + string actKey = "RemoteDir"; + string newDir = ""; + bool taskOk = false; + string taskVal = ""; + string fNameOdl = "ODL_ATTIVO.txt"; + string basePath = System.Windows.Forms.Application.StartupPath; + string remFile = ""; + string fileContent = ""; + string locFile = ""; + // cerco task specifici: se ho startSetup --> imposto bit DBB701.DBB0.4 + foreach (var item in task2exe) + { + taskOk = false; + taskVal = ""; + // converto richiesta in enum... + taskType tName = taskType.nihil; + Enum.TryParse(item.Key, out tName); + // controllo sulla KEY... + switch (tName) + { +#if false + case taskType.setArt: + case taskType.setPzComm: + // L'articolo ed il numPz li salva nei dati di produzione... SE disponibili + // li indicherà nel file ODL ATTIVA... + upsertKey(item.Key, item.Value); + // salvo nei taskVal il valore acquisito... + taskVal = $"Saved {item.Key} = {item.Value} on ProdData"; + break; + + case taskType.setComm: + /*------------------------------------------------------------------ + * La commessa è la cartella DI BASE per poter poi procedere con acquisizione dati... + * - step 1: check folder + * - step 2: creazione folder + * - step 3: salva file ODL_attiva + * - step 4: salva parametro dell'ODL corrente + ------------------------------------------------------------------*/ + // compongo remDir dai 2 parametri... + actKey = "RemoteDir"; + newDir = $"{RemoteBaseDir}/{item.Value}"; + currActParam.Add(actKey, newDir); + currAct = new ActionConfig() + { + Id = "01", + Description = "Verifica esistenza directory", + Action = ActType.CheckDir, + ParamList = currActParam + }; + //eseguo step... + bool dirOk = doStep(currAct); + // se la cartella mancasse + if (!dirOk) + { + // nuovo act x crearla! + currAct = new ActionConfig() + { + Id = "02", + Description = "Creazione directory", + Action = ActType.CreateDir, + ParamList = currActParam + }; + //eseguo step... + dirOk = doStep(currAct); + if (dirOk) + { + taskVal = $"DIR Created: {item.Key} --> {item.Value}"; + } + } + else + { + taskVal = $"DIR Already Exists: {item.Key} --> {item.Value}"; + } + // ora creo il file interno... + remFile = $"{newDir}/{fNameOdl}"; + // cerco se disponibili info in prodData x art/pezzi + string setArt = getCurrProdData("setArt", "ND"); + string setPzComm = getCurrProdData("setPzComm", "?"); + fileContent = $"NEW ODL activated | {item.Value} | ART: {setArt} x {setPzComm} pz | {DateTime.Now}"; + locFile = Path.Combine(basePath, "temp", fNameOdl); + taskOk = SendOdlActFile(locFile, remFile, fileContent); + if (taskOk) + { + taskVal += $"{Environment.NewLine}File uploaded | locFile: {locFile} | remFile: {remFile}"; + } + else + { + lgError($"Error in startSetup | fileUpload | locFile: {locFile} | remFile: {remFile}"); + } + // salvo in currProd.. + upsertKey(item.Key, item.Value); + break; + + case taskType.startSetup: + case taskType.stopSetup: + //verifico odl x prima cosa... + pzCntReload(true); + // faccio pulizia preliminare della commessa corrente... + bool cleanDone = RemPlaceholder(RemoteBaseDir, fNameOdl); + if (cleanDone) + { + lgInfo($"Cleaned {fNameOdl} during startSetup | remDir: {RemoteBaseDir}"); + } + // verifico di avere già un ODL corrente... + if (currIdxODL == 0) + { + lgTrace($"Manca ODL corrente: non procedo con impostazione start/stop setup"); + } + else + { + string odlFolder = $"ODL{currIdxODL:00000000}"; + remFile = $"{RemoteBaseDir}/{odlFolder}/{fNameOdl}"; + fileContent = item.Value; + // scrivo file ultima richiesta setup + locFile = Path.Combine(basePath, "temp", fNameOdl); + taskOk = SendOdlActFile(locFile, remFile, fileContent); + if (taskOk) + { + taskVal = $"File uploaded: {item.Key} --> {item.Value} | locFile: {locFile} | remFile: {remFile}"; + } + else + { + lgError($"Error in startSetup | fileUpload | locFile: {locFile} | remFile: {remFile}"); + } + } + + break; + + case taskType.endProd: + bool okRemove = RemPlaceholder(RemoteBaseDir, fNameOdl); + if (okRemove) + { + taskVal = $"Cleaned CurrOdlFile: {item.Key} --> {item.Value} | remDir: {RemoteBaseDir} | fName: {fNameOdl}"; + } + else + { + lgError($"Error in CurrOdlFile | remDir: {RemoteBaseDir} | fName: {fNameOdl}"); + } + break; +#endif + + default: + taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC"; + lgInfo($"Chiamata senza processing: taskOk: {taskOk} | taskVal: {taskVal}"); + break; + } + // aggiungo task SE svolto! + if (!string.IsNullOrEmpty(taskVal)) + { + taskDone.Add(item.Key, taskVal); + } + } + return taskDone; + } + + /// + /// Effettua processing CUSTOM x FTP: + /// - prende ogni conf specifica + /// - esegue step + /// - registra eventuali DynData da salvare + /// + public override void processCustomTaskLF() + { + lgInfo($"Richiesto processCustomTaskLF"); +#if false + // verifico di avere compiti da svolgere... + if (currFtpTaskList != null && currFtpTaskList.ListTask != null && currFtpTaskList.ListTask.Count > 0) + { + foreach (var srvFtp in currFtpTaskList.ListTask) + { + // verifico eventuale veto all'esecuzione... + if (ActionEnabled(srvFtp)) + { + // imposto nuovo veto... + ActionResetVeto(srvFtp); + // ora setup server FTP x item... + ftpClientMan = new Manager(srvFtp.ServerAddr, srvFtp.ConnUser, srvFtp.ConnPasswd, srvFtp.RawCert, srvFtp.SkipCert); + // test server ok... + if (ftpClientMan.ServerOk()) + { + int stepDone = 0; + string srvType = ftpClientMan.ServerType(); + lgTrace($"Connesso a server {srvType} | {srvFtp.ServerAddr} | inizio processing {srvFtp.StepsList.Count} steps"); + // ciclo tra i vari steps! + foreach (var step in srvFtp.StepsList) + { + bool fatto = doStep(step); + stepDone += fatto ? 1 : 0; + } + lgInfo($"Completata esecuzione steps FTP | {srvFtp.ActionId} | {stepDone}/{srvFtp.StepsList.Count} Done/Req"); + } + else + { + // FixMe ToDo verificare se necessario... + //connectionOk = false; + //tryDisconnect(); + lgError($"Impossibile connettersi al server {srvFtp.ServerAddr}"); + } + } + else + { + lgTrace($"Saltata esecuzione {srvFtp.ActionId} | veto attivo"); + } + } + } +#endif + lastReadPLC = DateTime.Now; + } + + /// + /// Effettua lettura semafori principale Parametri da + /// aggiornare x display in form + /// + public override void readSemafori(ref newDisplayData currDispData) + { + DateTime adesso = DateTime.Now; +#if false + // procedo solo se ftp è configurato (altrimenti inutile controllare...)ù + if (ftpClientMan.IsConfigured) + { + // salto se fosse attivo il veto ping... + if (lastPING.AddSeconds(vetoPingSec) < adesso) + { + // lo stato è come ping machine, x ora puntato a IP unico (WiFi?) + byte[] MemBlock = new byte[2]; + try + { + currDispData.semIn = Semaforo.SV; + // in primis salvo data ping comunque... + lastPING = adesso; + + // salvo esito ping + bool pingOK = testPingMachine == IPStatus.Success; + addTest(pingOK); + bool ftpOk = ftpClientMan.ServerOk(); + // se passa il check ping + folder faccio il resto... + if (pingStatusOk() && ftpOk) + { + // 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)) + { + // verifico se ci sia... + ActionConfig currAct = new ActionConfig(); + var currActParam = new Dictionary(); + // compongo remDir dai 2 parametri... + currActParam.Add("RemoteDir", $"{RemoteBaseDir}/{reqFolder}"); + currAct = new ActionConfig() + { + Id = "01", + Description = "Verifica esistenza directory", + Action = ActType.CheckDir, + ParamList = currActParam + }; + //eseguo step... + bool dirOk = doStep(currAct); + if (dirOk) + { + numErroriCheck = numErroriCheck > 0 ? numErroriCheck-- : 0; + } + else + { + lgInfo($"Rilevata mancanza folder ODL: inizio ripristino tramite task setComm"); + numErroriCheck++; + // altrimenti eseguo task2exe x crearla... + Dictionary task2ExeSetOdl = new Dictionary(); + task2ExeSetOdl.Add($"setComm", reqFolder); + var res = executeTasks(task2ExeSetOdl); + } + } + } + + // se supero soglia errori lettura --> disconnetto e resetto + if (numErroriCheck > maxErroriCheck) + { + lgError($"numErroriCheck: {numErroriCheck} --> disconnessione adapter con tryDisconnect"); + + numErroriCheck = 0; + connectionOk = false; + tryDisconnect(); + } + else + { + connectionOk = true; + } + + lastReadPLC = adesso; + lastWatchDog = adesso; + } + else + { + connectionOk = false; + } + + if (connectionOk) + { + B_input = 3; + // aggiungo NON emergenza... + B_input += (1 << 7); + } + else + { + B_input = 0; + } + } + catch + { + currDispData.semIn = Semaforo.SR; + } + } + } +#endif + } + + public override void startAdapter(bool resetQueue) + { + base.startAdapter(resetQueue); + // 2023.09.05 imposto anche primo ping e check disconnected... + DateTime adesso = DateTime.Now; + lastWatchDog = adesso; + //lastPING = adesso; + lastReadPLC = adesso; + lastDisconnCheck = adesso; + // faccio un primo check POST ritardo + tryConnect(); + } + + /// + /// Override connessione + /// + public override void tryConnect() + { + bool doLog = (verboseLog || periodicLog); + lgDebug($"FTP: tryConnect step 01 | connectionOk: {connectionOk}"); + if (!connectionOk) + { + //// resetto coda... + //PingQueue = new DataQueue("000", "PingQueue", false); + // controllo che il ping sia stato tentato almeno pingTestSec fa... + if (DateTime.Now.Subtract(lastPING).TotalSeconds > vetoPingSec) + { + if (doLog) + { + lgInfo("FTP: ConnKO - tryConnect"); + } + lgDebug("FTP: tryConnect step 04"); + + lgDebug("FTP: Reset PingQueue"); + + bool pingOK = testPingMachine == IPStatus.Success; + addTest(pingOK); + + // se passa il ping faccio il resto... + if (pingStatusOk()) + { + // in primis salvo data ping... + lastPING = DateTime.Now; + connectionOk = true; + queueInEnabCurr = true; + lgInfo("FTP - ping OK"); + } + else + { + // loggo no risposta ping ... + lgError("FTP - ping KO"); + } + } + } + } + + /// + /// Override disconnessione + /// + public override void tryDisconnect() + { + lgInfo("Richiesta disconnessione adapter FTP!"); + connectionOk = false; + queueInEnabCurr = false; + } + + #endregion Public Methods + + #region Protected Methods + + /// + /// Imposta la memoria PLC in modo forzato (es x oggetti gestiti da FTP come setComm) + /// + protected override void forceMemMap() + { + // simulo setup mappa memoria in scrittura... + memMap = new plcMemMapExt(); + // area READ + Dictionary ftpMemRead = new Dictionary(); + ftpMemRead.Add("FtpSync", new dataConfTSVC() + { + description = "Last FTP sync", + name = "FtpSync", + tipoMem = plcDataType.String, + displOrdinal = 10 + }); + memMap.mMapRead = ftpMemRead; + // area WRITE + Dictionary ftpMemWrite = new Dictionary(); + 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(); + } + + #endregion Protected Methods + + #region Private Fields + + private static Stopwatch sw = new Stopwatch(); + + /// + /// Ultima verifica presenza dir corrente + /// + private DateTime lastCheckDir = DateTime.Now.AddHours(-1); + + /// + /// Dimensione coda di ping x valutazione + /// + private int maxQueuePing = 11; + + /// + /// Coda degli esiti di ping x calcolo stato macchina + /// + private DataQueue PingQueue = new DataQueue("000", "PingQueue", false); + + private int PoweroffTimeoutSec = 100; + + /// + /// Dizionario dei divieti di esecuzione x i vari step + /// + private Dictionary StepsVeto = new Dictionary(); + + /// + /// Periodo veto controllo directory FTP corrente + /// + private int vetoCheckDirSec = 5; + + /// + /// Veto controllo status x log... + /// + private DateTime vetoCheckStatus = DateTime.Now; + + #endregion Private Fields + + #region Private Properties + +#if false + /// + /// Oggetto configurazione gestione FTP + /// + private FtpTaskList currFtpTaskList { get; set; } = new FtpTaskList(); + + /// + /// CLient connessioni FTP + /// + private Manager ftpClientMan { get; set; } = new Manager("", "", "", "", false); + + /// + /// Directpry remota di abse + /// + private string RemoteBaseDir { get; set; } = ""; +#endif + + #endregion Private Properties + + #region Private Methods + +#if false + /// + /// Verifica se l'azione sia permessa o in stato veto a tempo + /// + /// + /// + private bool ActionEnabled(FtpActConf currAct) + { + bool enabled = true; + // se veto presente + if (StepsVeto.ContainsKey(currAct.ActionId)) + { + // controllo scadenza + enabled = StepsVeto[currAct.ActionId] < DateTime.Now; + } + return enabled; + } + + /// + /// Imposta veto azione corrente + /// + /// + /// + private bool ActionResetVeto(FtpActConf currAct) + { + bool fatto = false; + if (StepsVeto.ContainsKey(currAct.ActionId)) + { + StepsVeto[currAct.ActionId] = DateTime.Now.AddSeconds(currAct.ReExecVeto); + } + else + { + StepsVeto.Add(currAct.ActionId, DateTime.Now.AddSeconds(currAct.ReExecVeto)); + } + return fatto; + } + +#endif + private void addTest(bool pingOk) + { + int score = pingOk ? 1 : 0; + // controllo: se era spenta e risulta ping ok --> reset coda! + if (B_input == 0 && pingOk) + { + B_input = 1; + PingQueue = new DataQueue("000", "PingQueue", false); + lgTrace($"PingQueue resetted on addTest"); + } + PingQueue.Enqueue($"{score}"); + while (PingQueue.Count > maxQueuePing) + { + string res = ""; + PingQueue.TryDequeue(out res); + } + } + + /// + /// Esegue l'azione configurata + /// + /// + /// + /// + private bool doStep(ActionConfig step) + { + bool fatto = false; + string remoteVal = ""; + string localVal = ""; + string sVal = ""; + string actKey = ""; + string actVal = ""; +#if false + // faccio switch in base al tipo di azione da eseguire... + switch (step.Action) + { + case ActType.CheckDir: + if (step.ParamList != null && step.ParamList.Count > 0) + { + sw.Restart(); + remoteVal = step.ParamList["RemoteDir"] ?? ""; + //verifico dir remota + fatto = ftpClientMan.DirExists(remoteVal); + } + else + { + lgError("Error: missing parameters!"); + } + sw.Stop(); + if (fatto) + { + lgInfo($"Check RemDir: {remoteVal} | {sw.ElapsedMilliseconds:N1} ms"); + } + break; + + case ActType.CheckFile: + break; + + case ActType.CreateDir: + if (step.ParamList != null && step.ParamList.Count > 0) + { + sw.Restart(); + remoteVal = step.ParamList["RemoteDir"] ?? ""; + //verifico dir remota + bool dirExist = ftpClientMan.DirExists(remoteVal); + if (dirExist) + { + lgTrace("Error: Folder already exists!"); + } + else + { + fatto = ftpClientMan.CreateDir(remoteVal); + } + } + else + { + lgError("Error: missing parameters!"); + } + sw.Stop(); + if (fatto) + { + lgInfo($"Directory {remoteVal} created!| {sw.ElapsedMilliseconds:N1} ms"); + } + break; + + case ActType.DelDir: + break; + + case ActType.DelFile: + break; + + case ActType.DownloadDir: + + break; + + case ActType.DownloadFile: + break; + + case ActType.GenRandomDir: + break; + + case ActType.ListContent: + break; + + case ActType.MirrorDirL2R: + break; + + case ActType.MirrorDirR2L: + // eseguo mirroring directory + actKey = "FtpSync"; + actVal = "SRC --> DEST | Size"; + if (step.ParamList != null && step.ParamList.Count > 1) + { + sw.Restart(); + remoteVal = step.ParamList["RemoteDir"] ?? ""; + localVal = step.ParamList["LocalDir"] ?? ""; + // verifico esistenza dir locale... + if (!Directory.Exists(localVal)) + { + Directory.CreateDirectory(localVal); + } + //verifico dir remota + var preTest = ftpClientMan.DirExists(remoteVal); + if (preTest) + { + // chiamo metodo MIRROR x calcolare esattamente se ci siano stati + // download di sync... + var mirResult = ftpClientMan.MirrorRemoteDir(localVal, remoteVal, FluentFTP.FtpFolderSyncMode.Mirror); + // ciclo cercando eventuali info da emttere in DynData... + foreach (var result in mirResult) + { + // 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 + { + lgTrace($"Skipped sync | {actVal}"); + } + } + // risultato sintetico come successi... + fatto = mirResult != null && mirResult.Where(x => !x.IsSuccess).Count() == 0; + + if (!fatto) + { + lgError($"Error: {remoteVal} NOT mirrored!"); + } + } + else + { + lgError($"Dir remota non trovata! RemDir: {remoteVal}"); + } + } + else + { + lgError("Error: missing parameters!"); + } + sw.Stop(); + if (fatto) + { + lgInfo($"Mirror Rem2Loc | RemDir: {remoteVal} | {sw.ElapsedMilliseconds:N1} ms"); + } + + break; + + case ActType.PingServer: + break; + + case ActType.RemoveFileByName: + string fName2Del = ""; + int numRem = 0; + if (step.ParamList != null && step.ParamList.Count > 1) + { + sw.Restart(); + remoteVal = step.ParamList["RemoteDir"] ?? ""; + fName2Del = step.ParamList["FileName2Del"] ?? ""; + //verifico dir remota + fatto = ftpClientMan.DirExists(remoteVal); + if (fatto) + { + // recupero elenco di TUTTI i file presenti + List resList = ftpClientMan.GetRemoteList(remoteVal, true); + List list2del = new List(); + // cerco tutti i file che indicano ODL attivo e li elimino + foreach (var flItem in resList) + { + if (flItem.Type == FluentFTP.FtpObjectType.File && flItem.Name.EndsWith(fName2Del)) + { + list2del.Add(flItem); + } + } + // elimino quelli trovati + if (list2del.Count > 0) + { + var fList = list2del.Select(x => x.FullName).ToList(); + numRem = ftpClientMan.DeleteFileList(fList); + } + } + } + else + { + lgError("Error: missing parameters!"); + } + sw.Stop(); + if (fatto) + { + lgInfo($"RemoveFileByName | path: {remoteVal} | name: {fName2Del} | # del: {numRem} | {sw.ElapsedMilliseconds:N1} ms"); + } + + break; + + case ActType.UploadDir: + break; + + case ActType.UploadFile: + if (step.ParamList != null && step.ParamList.Count > 1) + { + sw.Restart(); + localVal = step.ParamList["LocalFile"] ?? ""; + remoteVal = step.ParamList["RemoteFile"] ?? ""; + + //verifico dir remota + string remoteDir = remoteVal.Substring(0, remoteVal.LastIndexOf("/")); + bool dirExist = ftpClientMan.DirExists(remoteDir); + if (!dirExist) + { + fatto = ftpClientMan.CreateDir(remoteDir); + } + + fatto = ftpClientMan.SendFile(localVal, remoteVal); + if (!fatto) + { + lgError($"Error: {localVal} NOT uploaded!"); + } + } + else + { + lgError("Error: missing parameters!"); + } + sw.Stop(); + if (fatto) + { + lgInfo($"Upload File: {remoteVal} | {sw.ElapsedMilliseconds:N1} ms"); + } + break; + + default: + break; + } +#endif + return fatto; + } + + /// + /// Effettuo lettura file di conf + /// + /// + private void loadFtpConfFile(string fileName) + { + string jsonFullPath = Path.Combine(System.Windows.Forms.Application.StartupPath, "DATA", "CONF", fileName); + lgInfo($"Apertura file {jsonFullPath}"); + using (StreamReader reader = new StreamReader(jsonFullPath)) + { + string jsonData = reader.ReadToEnd().Replace("\n", "").Replace("\r", ""); +#if false + if (!string.IsNullOrEmpty(jsonData)) + { + lgDebug($"File json composto da {jsonData.Length} caratteri"); + try + { + currFtpTaskList = JsonConvert.DeserializeObject(jsonData); + lgDebug($"Decodifica aree FtpTaskList: trovati {currFtpTaskList.ListTask.Count} gruppi di task FTP"); + } + catch (Exception exc) + { + lgError($"Eccezione in decodifica conf json FTP:{Environment.NewLine}{exc}"); + } + } + else + { + lgError("Errore in loadFtpConfFile: file json vuoto!"); + } +#endif + } + } + + /// + /// Calcola status ping: + /// - se ha ‹ 50% coda richiesta --› true + /// - se ha › 50% coda richiesta --› true se è maggior parte a 1 (true) + /// + /// + private bool pingStatusOk() + { + bool answ = false; + int numVal = PingQueue.Count; + if (numVal > maxQueuePing / 2) + { + var listaValori = PingQueue.ToList(); + int numOk = listaValori.Where(x => x == "1").Count(); + int numKo = numVal - numOk; + answ = numOk >= numKo; + lgTrace($"PING ok per: {numOk} > {numKo}"); + } + else + { + lgTrace($"PING check: {answ} per mancanza dati minimi test"); + } + return answ; + } + +#if false + /// + /// 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; + } + + /// + /// Invia il file dell'ODL attivo + /// + /// + /// + /// + private bool SendOdlActFile(string locFile, string remFile, string fileContent) + { + bool taskOk = false; + Dictionary currActParam = new Dictionary(); + // creo file locale + File.WriteAllText(locFile, fileContent); + // invio file x ODL attivo + currActParam.Add("LocalFile", locFile); + currActParam.Add("RemoteFile", remFile); + ActionConfig currAct = new ActionConfig() + { + Id = "01", + Description = "Upload File", + Action = ActType.UploadFile, + ParamList = currActParam + }; + // eseguo step... + taskOk = doStep(currAct); + return taskOk; + } +#endif + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/IOB-WIN-SHELLY/MainFormNext.cs b/IOB-WIN-SHELLY/MainFormNext.cs new file mode 100644 index 00000000..d2ef6ea0 --- /dev/null +++ b/IOB-WIN-SHELLY/MainFormNext.cs @@ -0,0 +1,40 @@ +using IOB_UT_NEXT; +using IOB_WIN_SHELLY.Iob; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IOB_WIN_SHELLY +{ + public class MainFormNext : IOB_WIN_FORM.MainForm + { + + /// + /// Avvio MainForm + /// + /// + public MainFormNext(string[] args) : base(args) + { + } + + /// + /// Apre la finestra child con conf + /// + protected override void openChild(string IOB) + { + if (IOB == null) + { + throw new ArgumentNullException(nameof(IOB)); + } + + AdapterFormNext child = new AdapterFormNext(IOB); + child.MdiParent = this; + child.Text = IOB; + child.Show(); + child.Shown += Child_Shown; + child.FormClosed += Child_FormClosed; + } + } +} diff --git a/IOB-WIN-SHELLY/NLog.config b/IOB-WIN-SHELLY/NLog.config new file mode 100644 index 00000000..cd1bcc98 --- /dev/null +++ b/IOB-WIN-SHELLY/NLog.config @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + diff --git a/IOB-WIN-SHELLY/Program.cs b/IOB-WIN-SHELLY/Program.cs new file mode 100644 index 00000000..e41ca546 --- /dev/null +++ b/IOB-WIN-SHELLY/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Windows.Forms; + +namespace IOB_WIN_SHELLY +{ + internal static class Program + { + #region Private Methods + + /// + /// Punto di ingresso principale dell'applicazione. + /// Parametri di avvio + /// + [STAThread] + private static void Main(string[] args) + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainFormNext(args)); + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/IOB-WIN-SHELLY/Properties/AssemblyInfo.cs b/IOB-WIN-SHELLY/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..3811e376 --- /dev/null +++ b/IOB-WIN-SHELLY/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("IOB-WIN-SHELLY")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyProduct("IOB-WIN-SHELLY")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7642aead-7a35-45a6-8761-81d97cd8905c")] + diff --git a/IOB-WIN-SHELLY/Properties/Resources.Designer.cs b/IOB-WIN-SHELLY/Properties/Resources.Designer.cs new file mode 100644 index 00000000..1b872ccf --- /dev/null +++ b/IOB-WIN-SHELLY/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace IOB_WIN_SHELLY.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_WIN_SHELLY.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/IOB-WIN-SHELLY/Properties/Resources.resx b/IOB-WIN-SHELLY/Properties/Resources.resx new file mode 100644 index 00000000..af7dbebb --- /dev/null +++ b/IOB-WIN-SHELLY/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/Properties/Settings.Designer.cs b/IOB-WIN-SHELLY/Properties/Settings.Designer.cs new file mode 100644 index 00000000..ee9726a4 --- /dev/null +++ b/IOB-WIN-SHELLY/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace IOB_WIN_SHELLY.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/IOB-WIN-SHELLY/Properties/Settings.settings b/IOB-WIN-SHELLY/Properties/Settings.settings new file mode 100644 index 00000000..39645652 --- /dev/null +++ b/IOB-WIN-SHELLY/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/IOB-WIN-SHELLY/Readme/ToDo.txt b/IOB-WIN-SHELLY/Readme/ToDo.txt new file mode 100644 index 00000000..161ff489 --- /dev/null +++ b/IOB-WIN-SHELLY/Readme/ToDo.txt @@ -0,0 +1,61 @@ +------------------------------------- +- 2017.10.19 +------------------------------------- +OK - da testare ora invio URL a MoonPro +OK - ALIVE +OK - ENABLED +OK - INPUT +OK - FARE lettura VERA da FANUC almeno della bitmap +OK - fare gestione come rPI-IOB, ovvero +OK - gestione QUEUE eventi +OK - salvataggio su file dello storico eventi rilevati +OK - gestione dei segnali ballerini (BITMASK!) +OK - gestione contapezzi CUSTOM + - fare gestione configurabile lettura FANUC +OK - gestione dati G43 +OK - togliere dati F (E0 | 90) + - fare integrazione ALTRI varori FANUC, tra cui + - allarmi +OK - load/speed +OK - overrides (G12, G30) + +OK - nuovo metodo chiamata x MP/IO (che dovrà avere nuovo comando x accettare queste chiamate e salvare su tabella SENZA processing, come eventi o come extra... evento NOTA?) + - verificare segnali: (vedi doc gsheet) + - F001.0: ALARM_PRESENT + - F001.7: CN_READY / POWER_ON + - STL000.5: AUTO (vers 1) + - STL000.7: AUTO (vers 2) +- Cambiare ordine valutazione eventi frequenza VLF-->VHF +- Azzerare I contatori quanto si arriva al più lento (quando si azzera lui ripartono comunque tutti...) -> in questo modo scatta un contatore QUANDO GENERAL_COUNTER MOD periodo_Ccntatore == 0 +- rendere parametrica l'assegnazione delle funzioni al diverso ambito frequenza tra i 5 (VHF, HF, NF, LF, VLF) +- procedura x gestione dati REALTIME (da NON salvare su db ma al limite su REDIS, simil EQN con 2 tab x eliminare dati scaduti) + +OK FINIRE SISTEMAZIONE JETCO: +OK - install servers +OK - install DB +OK - conf acquisitore togliendo parti abbozzate x contapezzi/fineciclo +OK - part program name MAIN con nuova funzione + +CREARE NUOVO SW (o configurazione? o ramo alternativo a develop?) x mapping INIZIALE della macchina... ad esempio + - si collega a ns server + - chiede cosa deve fare (es mappa memorie D da 0 a 9999) + - effettua testing e poi fa upload risultati + - il ns sw fa i check/controlli modifica +in questo modo ad esmepio possiamo cercare i contapezzi, i segnali ceh cambiano con il fineciclo nelle aree Y, i contatori STANDARD nelle memorie D, ... + + +GESTIONE LIVE DATA +L'idea è ceh quando una macchina è "sotto osservazione" ovvero live viene aperta pagina questa debba inviare PIU' DATI di tipo realtime e mostrarli nel browser. Per farlo ci saranno questi elementi +- si apre una pagina di dettaglio macchina (da tablet? da SITE principale?) +- questo causa la modifica di una chiave su DB (e/o redis) di stato macchina, del tipo "OnAir=true", e potrebbe essere una chiave a tempo (30 sec poi scade?) e mentre la pagina è aperta e si aggiorna (ogni 1-2 sec oppure Signal-R) questo valore viene confermato (e prorigato) +- ogni IOB-WIN fa una chiamata "extra" all'URL dedicato al checl "OnAir", e se trova che è abilitato passa in modalità letture frequenti (1/2 al sec?) dei parametri LIVE (es: feed, speed, posizioni assi, load istantanei) +- se passa inq eusta modalità live invia DI CONTINUO il dato al server IO +- il server IO salva SU REDIS questi valori sia come "lastVal" che come serie storica +- le pagine che mostrano i dati si continuano ad aggiornare (da redis) con grafici (chartJs come PIC) e/o valori istantanei +- le serie storiche vengono ripulite periodicamente (ogni ora? valori + vecchi di 24h ad esempio?) +- struttura dati REDIS da creare SIMILE a struttura info URL... +- struttura dati LIVE: ../LIVE/COD_MACC/CURR_VAL (contiene TUTTI i dati LIVE, ultimi ricevuti...) +- struttura dati TimeSeries: ../LIVE/COD_MACC/DATA_NAME (contiene TUTTI i dati come timeseries, es SPEEDRATE, FEEDRATE, POS_X1, POS_X2, ...) +- operazione SAVE aggiorna SURR e accoda NUOVO valore... +- LOAD (rilettura9 POTREBBE fare pulizia se + vecchi di 24h...) +- la trasmissione verso IO deve avvenire con "multisend, nel \ No newline at end of file diff --git a/IOB-WIN-SHELLY/Resources/ChangeLog.html b/IOB-WIN-SHELLY/Resources/ChangeLog.html new file mode 100644 index 00000000..7ab91d78 --- /dev/null +++ b/IOB-WIN-SHELLY/Resources/ChangeLog.html @@ -0,0 +1,120 @@ + +

MAPO-IOB-WIN

+ v: {{CURRENT-REL}} +
+ Acquisitore MAPO-IOB per sistemi Windows +
+ Note di rilascio: +
    +
  • + v.3.1.* → v.3.2.* +
      +
    • Nuovi simulatori con gestione emergenza
    • +
    • Fix gestione invio dati Redis
    • +
    • Implementazione IOB Eurom63
    • +
    +
  • +
  • + v.2.6.* → v.3.0.* +
      +
    • revisione sistema metodi invio in blocco
    • +
    • Gestione invio contapezzi in step > 1
    • +
    • Gestione eventi in blocco (indipendente e prioritario su EvBlock)
    • +
    • Gestione limite eventi memorizzabili
    • +
    • Integrazione REDIS
    • +
    • Integrazione IOB-MAN
    • +
    +
  • +
  • + v.2.5.* → v.2.6.* +
      +
    • revisione sistema timeout Ping
    • +
    • Gestione AutoODL in prod generale (non solo SIM)
    • +
    +
  • +
  • + v.2.4.* → v.2.5.* +
      +
    • Aggiunto adapter MTConnect
    • +
    • Ottimizzazione gestione SIEMENS
    • +
    +
  • +
  • + v.2.3.* → v.2.4.* +
      +
    • inserita gestione conf json x Flog acquisiti
    • +
    • gestione invio Json blocchi dati FLog
    • +
    • ottimizzazioni varie adapter Siemens
    • +
    • ottimizzazione processo svuotamento code
    • +
    • riduzione interferenza e interblocchi in fase di PLC assente
    • +
    +
  • +
  • + Ultime modifiche: +
      {{LAST-CHANGES}}
    +
  • +
  • + v.1.18.* → v.2.3.* +
      +
    • inserimento WPS x acontrolli WebPage human readable
    • +
    • fix gestione task2exe
    • +
    • aggiunte varie versioni PLC siemens
    • +
    • aggiunto PLC WPS x generiche web pages
    • +
    • revisitazione LOG ODL e contapezzi
    • +
    • modifica pagina presentazione dati (master) x resize
    • +
    • Attivazione IOB SIMULATOR per test di carico (sostituito type DEMO)
    • +
    • Aggiunto simulatore macchine MULTI pallet
    • +
    • Ottimizzazione simulatore
    • +
    • Ottimizzazioni PLC Siemens x riavvio post disconnessione (es spegnimento notturno)
    • +
    • Ottimizzazione processo chiusura in update applicazione
    • +
    • Aggiunta simulazione spegnimento con WU/CD
    • +
    +
  • +
  • + v.1.11.* → v.1.18.* +
      +
    • Inserimento controller SIEMENS con S7+ library
    • +
    • Inserimento nuove letture FANUC x programmi
    • +
    • Inserimento nuove letture FANUC x SysEx (informazioni sistema)
    • +
    • Inserimento invio FluxLog x parametri estesi (es SysEx, ProgName,...)
    • +
    • FIX visualizzazione dati FluxLog e URL inviati
    • +
    • FIX MAIN program da FANUC (non il current)
    • +
    • Inserita modalita' DUMP memoria (iniziale full + periodica)
    • +
    • Inserimento gestione contapezzi standard/checkBit in IOB.cfg
    • +
    • Inserimento contapezzi da area memoria X
    • +
    • NUOVA Gestione rami cliente e URL di update
    • +
    • Gestione modi CNC
    • +
    • Lettura dari dinamycs FANUC (feed, speed)
    • +
    • aggiunta gestione aree G0..G30 (overrides?)
    • +
    • fix errore disconnessione FANUC (allo spegnimento dl CNC) e memoria valori persistente a 1
    • +
    • fix globali x gestione log IN / FLOG + ottimizzaizone check FANUC (PING)
    • +
    • ottimizzazione fasi di restart in caso di assenza del server (evita reinvii inutili e migliora tempo ripartenza invio)
    • +
    • review procedure controllo connessione x FANUC (es Tornos II)
    • +
    • non richeide più privilegi admin x fare update
    • +
    • gestione segnali inverted
    • +
    • completata gestione configurabilità parametrica segnali (Tornos, CMZ, Biglia)
    • +
    • revisitazione LOG x distinguere processi IOB
    • +
    +
  • +
  • + v.0.1.* → v.0.10.* +
      +
    • Testato in produzione x update ad avvio e su richiesta
    • +
    • Testato in produzione x lettura dati da Fanuc
    • +
    • Inizio deploy con copia file su area IIS
    • +
    • Prima versione con autoupdate
    • +
    • Test PrettyBin x spostamento dll
    • +
    • Base acquisitore FANUC
    • +
    • Sistema base sw controllo in tray
    • +
    +
  • +
+ + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/Resources/Circuit.ico b/IOB-WIN-SHELLY/Resources/Circuit.ico new file mode 100644 index 00000000..a05b27a6 Binary files /dev/null and b/IOB-WIN-SHELLY/Resources/Circuit.ico differ diff --git a/IOB-WIN-SHELLY/Resources/Net.ico b/IOB-WIN-SHELLY/Resources/Net.ico new file mode 100644 index 00000000..a33a9eca Binary files /dev/null and b/IOB-WIN-SHELLY/Resources/Net.ico differ diff --git a/IOB-WIN-SHELLY/Resources/STEAM-IOB-WIN.xml b/IOB-WIN-SHELLY/Resources/STEAM-IOB-WIN.xml new file mode 100644 index 00000000..ba4e78f6 Binary files /dev/null and b/IOB-WIN-SHELLY/Resources/STEAM-IOB-WIN.xml differ diff --git a/IOB-WIN-SHELLY/Resources/Start-IOB-WIN.bat b/IOB-WIN-SHELLY/Resources/Start-IOB-WIN.bat new file mode 100644 index 00000000..3f8ecaa1 --- /dev/null +++ b/IOB-WIN-SHELLY/Resources/Start-IOB-WIN.bat @@ -0,0 +1,15 @@ +@ECHO OFF + +SET EXEName=IOB-WIN.exe +SET EXEFullPath=C:\Steamware\IOB-WIN\IOB-WIN.exe + +TASKLIST | FINDSTR /I "%EXEName%" +IF ERRORLEVEL 1 GOTO :StartIobWin + +REM "Programma ancora in run, nessuna azione necessaria" +timeout /T 2 +GOTO :EOF + +:StartIobWin +START "" "%EXEFullPath%" +GOTO :EOF diff --git a/IOB-WIN-SHELLY/Resources/SteamWare.ico b/IOB-WIN-SHELLY/Resources/SteamWare.ico new file mode 100644 index 00000000..70ccadaf Binary files /dev/null and b/IOB-WIN-SHELLY/Resources/SteamWare.ico differ diff --git a/IOB-WIN-SHELLY/Resources/logoSteamware.png b/IOB-WIN-SHELLY/Resources/logoSteamware.png new file mode 100644 index 00000000..0958b50a Binary files /dev/null and b/IOB-WIN-SHELLY/Resources/logoSteamware.png differ diff --git a/IOB-WIN-SHELLY/Resources/manifest.xml b/IOB-WIN-SHELLY/Resources/manifest.xml new file mode 100644 index 00000000..f66a7e99 --- /dev/null +++ b/IOB-WIN-SHELLY/Resources/manifest.xml @@ -0,0 +1,7 @@ + + + 1.0.0.0 + http://seriate.steamware.net:8083/SWS/MAPO/IOB-WIN/{{BRANCHNAME}}/MAPO-IOB-WIN.zip + http://seriate.steamware.net:8083/SWS/MAPO/IOB-WIN/{{BRANCHNAME}}/ChangeLog.html + false + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/docfx.json b/IOB-WIN-SHELLY/docfx.json new file mode 100644 index 00000000..bacb80c9 --- /dev/null +++ b/IOB-WIN-SHELLY/docfx.json @@ -0,0 +1,68 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "*.csproj" + ], + "cwd": ".", + "exclude": [ + "**/obj/**", + "**/bin/**", + "_site/**" + ] + } + ], + "dest": "obj/api" + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml" + ], + "cwd": "obj" + }, + { + "files": [ + "api/*.md", + "articles/**.md", + "toc.yml", + "*.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "template": [ + "default" + ] + } +} \ No newline at end of file diff --git a/IOB-WIN-SHELLY/index.md b/IOB-WIN-SHELLY/index.md new file mode 100644 index 00000000..fdb4be99 --- /dev/null +++ b/IOB-WIN-SHELLY/index.md @@ -0,0 +1,11 @@ +# IOB-WIN-PING + +Documentazione relativa all'applicativo IOB-WIN-PING + +## Articles + +Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles + +## Api + +Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione Api Documentation \ No newline at end of file diff --git a/IOB-WIN-SHELLY/logs/.placeholder.txt b/IOB-WIN-SHELLY/logs/.placeholder.txt new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/IOB-WIN-SHELLY/logs/.placeholder.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/packages.config b/IOB-WIN-SHELLY/packages.config new file mode 100644 index 00000000..721e45af --- /dev/null +++ b/IOB-WIN-SHELLY/packages.config @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/postBuildTgt.bat b/IOB-WIN-SHELLY/postBuildTgt.bat new file mode 100644 index 00000000..6bcfa2f4 --- /dev/null +++ b/IOB-WIN-SHELLY/postBuildTgt.bat @@ -0,0 +1,52 @@ +@echo off +echo Inizio processing After Build: configurazione %1 , directory %2 + +if %1 == "Release" goto ReleaseExec +if %1 == Release goto ReleaseExec +if %1 == "Debug" goto DebugExec +if %1 == Debug goto DebugExec +if %1 == "Remote_DEBUG" goto RemoteDebugExec +if %1 == Remote_DEBUG goto RemoteDebugExec + +:ReleaseExec +echo Release processing... +del /S %2"*.pdb"" +del /S %2"*.xml"" +del /S %2"lib/*.pdb"" +echo Release: eliminato pdb + xml!!! +goto END + +:DebugExec +echo Debug processing... + +goto END + + +:RemoteDebugExec +echo Remote_DEBUG processing, effettuo copia script verso server remoto (ROBOCOPY) +REM copia script verso server remoto +REM echo Debug remoto: effettuo robocopy sync (verificare remote per cliente) + +REM FINASSI +REM ROBOCOPY %2 \\10.150.0.1\Steamware\IOB-WIN-SHELLY-DEB /MIR +REM Baglietto +REM ROBOCOPY %2 \\192.168.60.15\Steamware\IOB-WIN-SHELLY-DEB /MIR +REM GIACOVELLI LOCOROTONDO +REM ROBOCOPY %2 \\192.168.1.93\Steamware\IOB-WIN-SHELLY-DEB /MIR +REM IMI Remosa +REM ROBOCOPY %2 \\192.168.0.12\Steamware\IOB-WIN-SHELLY-DEB /MIR + +REM IOB-WIN-SIM +REM ROBOCOPY %2 \\IOB-WIN-SIMULA\Steamware\IOB-WIN-SHELLY-DEB /MIR + +REM IOBVPN4MACHINE +REM ROBOCOPY %2 \\10.51.90.5\Steamware\IOB-WIN-SHELLY-DEB /MIR +REM ROBOCOPY %2 \\10.51.90.5\Steamware\IOB-WIN-SHELLY-DEB /MIR /log:RobocopyTransfer.log +REM ROBOCOPY %2 Z:\IOB-WIN-SHELLY-DEB /MIR +REM ROBOCOPY %2 \\10.51.90.10\Steamware\IOB-WIN-SHELLY-DEB /MIR +ROBOCOPY %2 \\10.51.90.9\Steamware\IOB-WIN-SHELLY-DEB /MIR + +goto END + +:END +echo Fatto! \ No newline at end of file diff --git a/IOB-WIN-SHELLY/setupTgt.bat b/IOB-WIN-SHELLY/setupTgt.bat new file mode 100644 index 00000000..ba685c02 --- /dev/null +++ b/IOB-WIN-SHELLY/setupTgt.bat @@ -0,0 +1,25 @@ +@echo off +echo Effettua setup dei file specifici per i vari ambienti pre build installer: verifica da nome configurazione %1 + + +if %1 == "Release" goto Release +if %1 == "Debug" goto Debug +if %1 == "Remote_DEBUG" goto RemoteDebug + +:Release +echo Release: nulla da copiare +goto END + +:Debug +echo Debug: copia file ini x simulazione Debug +REM del %2"DATA\CONF\EsaKvara.ini" +REM copy %2"Resources\SCM\EsaKvara_SIM.ini" %2"DATA\CONF\EsaKvara.ini" +goto END + + +:RemoteDebug +echo RemoteDebug: nulla da copiare +goto END + +:END +echo Fatto! \ No newline at end of file diff --git a/IOB-WIN-SHELLY/temp/.placeholder b/IOB-WIN-SHELLY/temp/.placeholder new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/IOB-WIN-SHELLY/temp/.placeholder @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/IOB-WIN-SHELLY/toc.yml b/IOB-WIN-SHELLY/toc.yml new file mode 100644 index 00000000..7eee9ffb --- /dev/null +++ b/IOB-WIN-SHELLY/toc.yml @@ -0,0 +1,6 @@ + +- name: Articles + href: articles/ +- name: API Documentation + href: obj/api/ + homepage: api/index.md