diff --git a/IOB-UT-NEXT/Eurom63.cs b/IOB-UT-NEXT/Eurom63.cs index d601eabe..0ffba8c9 100644 --- a/IOB-UT-NEXT/Eurom63.cs +++ b/IOB-UT-NEXT/Eurom63.cs @@ -1,8 +1,5 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; namespace IOB_UT_NEXT { @@ -39,7 +36,8 @@ namespace IOB_UT_NEXT TimeSet, /// - /// Verificato il canale di comunicazione è OK, fatta pulizia con AbortAll, NON ci sono report attivi + /// Verificato il canale di comunicazione è OK, fatta pulizia con AbortAll, NON ci sono + /// report attivi /// ChannelOk, @@ -135,7 +133,8 @@ namespace IOB_UT_NEXT public int PzPallet { get; set; } = 1; /// - /// Indica se sia possibile impostare i pezzi pallet dal server, ed in tal caso moltiplica i pezzi letti dalla macchina per il valore pzPallet (vedi sopra) + /// Indica se sia possibile impostare i pezzi pallet dal server, ed in tal caso + /// moltiplica i pezzi letti dalla macchina per il valore pzPallet (vedi sopra) /// public bool SetPzPalletFromSrv { get; set; } = false; @@ -170,7 +169,8 @@ namespace IOB_UT_NEXT public List FileList { get; set; } = new List(); /// - /// Numero MAX di esecuzioni da mantenere in HIST prima di eliminare i + vecchi (fare folder HIST\SESSnnnn) + /// Numero MAX di esecuzioni da mantenere in HIST prima di eliminare i + vecchi (fare + /// folder HIST\SESSnnnn) /// public int Max2Keep { get; set; } = 50; @@ -190,7 +190,7 @@ namespace IOB_UT_NEXT public string RespOk { get; set; } = "PROCESSED"; /// - /// Seconds before do a new retry (default = 0 --> no veto) + /// Seconds before do a new retry (default = 0 --> no veto) /// public double RetrySec { get; set; } = 0; diff --git a/IOB-UT-NEXT/IOB-UT-NEXT.csproj b/IOB-UT-NEXT/IOB-UT-NEXT.csproj index f9425e43..14903e11 100644 --- a/IOB-UT-NEXT/IOB-UT-NEXT.csproj +++ b/IOB-UT-NEXT/IOB-UT-NEXT.csproj @@ -134,7 +134,6 @@ - diff --git a/IOB-UT-NEXT/IniFile.cs b/IOB-UT-NEXT/IniFile.cs index 1ea22447..a23f2453 100644 --- a/IOB-UT-NEXT/IniFile.cs +++ b/IOB-UT-NEXT/IniFile.cs @@ -1,7 +1,7 @@ using System; +using System.Globalization; using System.Runtime.InteropServices; using System.Text; -using System.Globalization; namespace IOB_UT_NEXT { @@ -16,9 +16,6 @@ namespace IOB_UT_NEXT #endregion Public Fields - // INI filename - - // import windows dll functions #region Public Constructors @@ -33,25 +30,6 @@ namespace IOB_UT_NEXT #endregion Public Constructors - #region Private Methods - - [DllImport("kernel32")] - private static extern int GetPrivateProfileInt(string section, string key, int def, string filePath); - - [DllImport("kernel32")] - private static extern int GetPrivateProfileSection(string section, IntPtr retVal, uint size, string filePath); - - [DllImport("kernel32")] - private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); - - [DllImport("kernel32")] - private static extern bool WritePrivateProfileSection(string section, string value, string filePath); - - [DllImport("kernel32", CharSet = CharSet.Auto, BestFitMapping = false)] - private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); - - #endregion Private Methods - #region Public Methods /// @@ -149,7 +127,9 @@ namespace IOB_UT_NEXT /// /// /// Section name - /// restituisce delle stringhe keys=values da suddividere appunto come key/val successivamente + /// + /// restituisce delle stringhe keys=values da suddividere appunto come key/val successivamente + /// public string[] ReadSection(string Section) { const int bufferSize = 2048; // max is 32767 @@ -270,5 +250,68 @@ namespace IOB_UT_NEXT } #endregion Public Methods + + #region Private Methods + + + // INI filename + + /// + /// GetPrivateProfileInt: import windows dll functions + /// + /// + /// + /// + /// + /// + [DllImport("kernel32")] + private static extern int GetPrivateProfileInt(string section, string key, int def, string filePath); + + /// + /// GetPrivateProfileSection: import windows dll functions + /// + /// + /// + /// + /// + /// + [DllImport("kernel32")] + private static extern int GetPrivateProfileSection(string section, IntPtr retVal, uint size, string filePath); + + /// + /// GetPrivateProfileString: import windows dll functions + /// + /// + /// + /// + /// + /// + /// + /// + [DllImport("kernel32")] + private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); + + /// + /// WritePrivateProfileSection: import windows dll functions + /// + /// + /// + /// + /// + [DllImport("kernel32")] + private static extern bool WritePrivateProfileSection(string section, string value, string filePath); + + /// + /// WritePrivateProfileString: import windows dll functions + /// + /// + /// + /// + /// + /// + [DllImport("kernel32", CharSet = CharSet.Auto, BestFitMapping = false)] + private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); + + #endregion Private Methods } } \ No newline at end of file diff --git a/IOB-UT-NEXT/Logging.cs b/IOB-UT-NEXT/Logging.cs index ab425119..795dfd44 100644 --- a/IOB-UT-NEXT/Logging.cs +++ b/IOB-UT-NEXT/Logging.cs @@ -1,15 +1,10 @@ using NLog; using NLog.Config; using NLog.Targets; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace IOB_UT_NEXT {/// - /// Classe helper x LOG basata su NLog - /// + /// Classe helper x LOG basata su NLog public static class Logging { #region Public Constructors diff --git a/IOB-UT-NEXT/RedisMan.cs b/IOB-UT-NEXT/RedisMan.cs index 5bda2a2e..73f0cb7a 100644 --- a/IOB-UT-NEXT/RedisMan.cs +++ b/IOB-UT-NEXT/RedisMan.cs @@ -2,68 +2,12 @@ using StackExchange.Redis; using System; using System.Collections.Generic; -using System.Linq; using System.Text; namespace IOB_UT_NEXT { public class RedisIobCache { - #region Private Fields - - /// - /// Connessione lazy a redis... - /// - private Lazy lazyConnection = new Lazy(() => - { - string RedisConn = baseUtils.CRS("RedisConn"); - if (string.IsNullOrEmpty(RedisConn)) - { - RedisConn = "localhost,abortConnect=false,ssl=false"; - } - - return ConnectionMultiplexer.Connect(RedisConn); - }); - - /// - /// Connessione lazy a redis... - /// - private Lazy lazyConnectionAdmin = new Lazy(() => - { - string RedisConnAdmin = baseUtils.CRS("RedisConnAdmin"); - if (string.IsNullOrEmpty(RedisConnAdmin)) - { - RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true"; - } - - return ConnectionMultiplexer.Connect(RedisConnAdmin); - }); - - #endregion Private Fields - - #region Protected Fields - - /// - /// Cod IOB - /// - protected string currCodIob = "000"; - /// - /// Tipo IOB - /// - protected string currIobType = "ND"; - - /// - /// Hash redis x dati IOB - /// - protected string redIobKey = ""; - - /// - /// Hash redis x dati server - /// - protected string redServKey = ""; - - #endregion Protected Fields - #region Public Constructors /// @@ -97,7 +41,7 @@ namespace IOB_UT_NEXT IobWinStatus newIobStatus = new IobWinStatus() { CodIob = currCodIob, - IobType= currIobType, + IobType = currIobType, online = false }; // salvo in area REDIS @@ -137,15 +81,6 @@ namespace IOB_UT_NEXT #endregion Public Enums - #region Private Properties - - /// - /// Oggetto currentDb locale - /// - private IDatabase _currDB { get; set; } - - #endregion Private Properties - #region Public Properties /// @@ -216,7 +151,7 @@ namespace IOB_UT_NEXT answ = new IobWinStatus() { CodIob = currCodIob, - IobType=currIobType, + IobType = currIobType, online = false }; // salvo serializzando... @@ -298,39 +233,6 @@ namespace IOB_UT_NEXT #endregion Public Properties - #region Private Methods - - /// - /// Effettua comaprazione x CHIAVE in KVP ASC - /// - /// - /// - /// - private int CompareKey(KeyValuePair x, KeyValuePair y) - { - return x.Key.CompareTo(y.Key); - } - - /// - /// Effettua comaprazione x CHIAVE in KVP DESC - /// - /// - /// - /// - private int CompareKeyDesc(KeyValuePair x, KeyValuePair y) - { - return y.Key.CompareTo(x.Key); - } - - private void initHashKeys() - { - // init dati di base... - redServKey = redHash($"MP"); - redIobKey = redHash($"IOB:{currCodIob}"); - } - - #endregion Private Methods - #region Public Methods /// @@ -477,8 +379,7 @@ namespace IOB_UT_NEXT public int redCountKey(string keyPattern) { int answ = 0; - // cerco se ci sia valore in redis... - // se vuoto = ALL... + // cerco se ci sia valore in redis... se vuoto = ALL... keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; try { @@ -528,8 +429,7 @@ namespace IOB_UT_NEXT public bool redFlushKey(string keyPattern) { bool answ = false; - // cerco se ci sia valore in redis... - // se vuoto = ALL... + // cerco se ci sia valore in redis... se vuoto = ALL... keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; try { @@ -702,7 +602,8 @@ namespace IOB_UT_NEXT } /// - /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto... + /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da + /// funzionalita' DbConfig) + keyName richiesto... /// public string redHash(string keyName) { @@ -834,7 +735,9 @@ namespace IOB_UT_NEXT /// /// chiave /// valori - /// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade) + /// + /// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade) + /// /// public bool redSaveHash(string hashKey, KeyValuePair[] hashFields, double expireSeconds = -1) { @@ -891,7 +794,9 @@ namespace IOB_UT_NEXT /// /// chiave /// valori - /// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade) + /// + /// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade) + /// /// public bool redSaveHashDict(string hashKey, Dictionary hashFields, double expireSeconds = -1) { @@ -1058,7 +963,7 @@ namespace IOB_UT_NEXT } /// - /// Salva un set KVP (Key Value Pair) in RedisCache + /// Salva un set KVP (Key Value Pair) in RedisCache /// /// Set KVP chiave-valore da salvare /// @@ -1123,5 +1028,103 @@ namespace IOB_UT_NEXT } #endregion Public Methods + + #region Protected Fields + + /// + /// Cod IOB + /// + protected string currCodIob = "000"; + + /// + /// Tipo IOB + /// + protected string currIobType = "ND"; + + /// + /// Hash redis x dati IOB + /// + protected string redIobKey = ""; + + /// + /// Hash redis x dati server + /// + protected string redServKey = ""; + + #endregion Protected Fields + + #region Private Fields + + /// + /// Connessione lazy a redis... + /// + private Lazy lazyConnection = new Lazy(() => + { + string RedisConn = baseUtils.CRS("RedisConn"); + if (string.IsNullOrEmpty(RedisConn)) + { + RedisConn = "localhost,abortConnect=false,ssl=false"; + } + + return ConnectionMultiplexer.Connect(RedisConn); + }); + + /// + /// Connessione lazy a redis... + /// + private Lazy lazyConnectionAdmin = new Lazy(() => + { + string RedisConnAdmin = baseUtils.CRS("RedisConnAdmin"); + if (string.IsNullOrEmpty(RedisConnAdmin)) + { + RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true"; + } + + return ConnectionMultiplexer.Connect(RedisConnAdmin); + }); + + #endregion Private Fields + + #region Private Properties + + /// + /// Oggetto currentDb locale + /// + private IDatabase _currDB { get; set; } + + #endregion Private Properties + + #region Private Methods + + /// + /// Effettua comaprazione x CHIAVE in KVP ASC + /// + /// + /// + /// + private int CompareKey(KeyValuePair x, KeyValuePair y) + { + return x.Key.CompareTo(y.Key); + } + + /// + /// Effettua comaprazione x CHIAVE in KVP DESC + /// + /// + /// + /// + private int CompareKeyDesc(KeyValuePair x, KeyValuePair y) + { + return y.Key.CompareTo(x.Key); + } + + private void initHashKeys() + { + // init dati di base... + redServKey = redHash($"MP"); + redIobKey = redHash($"IOB:{currCodIob}"); + } + + #endregion Private Methods } } \ No newline at end of file diff --git a/IOB-UT-NEXT/TCMan.cs b/IOB-UT-NEXT/TCMan.cs index 0a8c1937..c513a8c0 100644 --- a/IOB-UT-NEXT/TCMan.cs +++ b/IOB-UT-NEXT/TCMan.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace IOB_UT_NEXT { @@ -27,50 +24,6 @@ namespace IOB_UT_NEXT #endregion Public Constructors - #region Protected Properties - - /// - /// Fattore lambda (innovazione) per calcolo EWMA valore TCiclo corrente - /// - protected double _lambda { get; set; } = 0.4; - - /// - /// Ultimo TCiclo osservato in SECONDI - /// - protected double _lastTC { get; set; } = 0; - - /// - /// ULTIMO Contapezzi IOB VALIDO - /// - protected int _lastValidPzCountIOB { get; set; } = 0; - - /// - /// ULTIMO Contapezzi PLC VALIDO - /// - protected int _lastValidPzCountPLC { get; set; } = 0; - - /// - /// Fattore massimo ammesso di delay x il TCiclo - /// - protected double _maxDelayFactor { get; set; } = 1.2; - - /// - /// Incremento amssimo pezzi per cui fare calcolo del tempociclo attuale - /// - protected double _maxIncrPz { get; set; } = 2; - - /// - /// Contapezzi IOB - /// - protected int _pzCountIOB { get; set; } = 0; - - /// - /// Contapezzi PLC - /// - protected int _pzCountPLC { get; set; } = 0; - - #endregion Protected Properties - #region Public Properties /// @@ -171,5 +124,49 @@ namespace IOB_UT_NEXT } #endregion Public Properties + + #region Protected Properties + + /// + /// Fattore lambda (innovazione) per calcolo EWMA valore TCiclo corrente + /// + protected double _lambda { get; set; } = 0.4; + + /// + /// Ultimo TCiclo osservato in SECONDI + /// + protected double _lastTC { get; set; } = 0; + + /// + /// ULTIMO Contapezzi IOB VALIDO + /// + protected int _lastValidPzCountIOB { get; set; } = 0; + + /// + /// ULTIMO Contapezzi PLC VALIDO + /// + protected int _lastValidPzCountPLC { get; set; } = 0; + + /// + /// Fattore massimo ammesso di delay x il TCiclo + /// + protected double _maxDelayFactor { get; set; } = 1.2; + + /// + /// Incremento amssimo pezzi per cui fare calcolo del tempociclo attuale + /// + protected double _maxIncrPz { get; set; } = 2; + + /// + /// Contapezzi IOB + /// + protected int _pzCountIOB { get; set; } = 0; + + /// + /// Contapezzi PLC + /// + protected int _pzCountPLC { get; set; } = 0; + + #endregion Protected Properties } } \ No newline at end of file diff --git a/IOB-UT-NEXT/ToMapo.cs b/IOB-UT-NEXT/ToMapo.cs index f91154da..56a1011b 100644 --- a/IOB-UT-NEXT/ToMapo.cs +++ b/IOB-UT-NEXT/ToMapo.cs @@ -1,11 +1,7 @@ using MapoSDK; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using System; -using System.Collections; using System.Collections.Generic; -using System.Linq; -using System.Text; namespace IOB_UT_NEXT { @@ -14,7 +10,23 @@ namespace IOB_UT_NEXT /// public class BaseAlarmConf { - #region Public Fields + #region Public Properties + + /// + /// Elenco dei contatori blink x gestione caso fronte salita/discesa segnale che blinka + /// + public int[] alarmsBlinkCounter { get; set; } + + /// + /// BitMask 16bit (1 = valido, 0 = filtro) degli allarmi silenziati/disabilitati (se + /// iniziano per ##) come valore da sottrarre x check + /// + public uint[] alarmsMask { get; set; } + + /// + /// Array dei valori allarme correnti + /// + public uint[] alarmsState { get; set; } /// /// valore di partenza x un segnale di blink in caso di fine variazione (fronte discesa) @@ -26,25 +38,6 @@ namespace IOB_UT_NEXT /// public int blinkUpVal { get; set; } = 3; - #endregion Public Fields - - #region Public Properties - - /// - /// Elenco dei contatori blink x gestione caso fronte salita/discesa segnale che blinka - /// - public int[] alarmsBlinkCounter { get; set; } - - /// - /// BitMask 16bit (1 = valido, 0 = filtro) degli allarmi silenziati/disabilitati (se iniziano per ##) come valore da sottrarre x check - /// - public uint[] alarmsMask { get; set; } - - /// - /// Array dei valori allarme correnti - /// - public uint[] alarmsState { get; set; } - /// /// Descrizione area allarmi /// @@ -177,7 +170,8 @@ namespace IOB_UT_NEXT alarmsState = new uint[size / 2]; alarmsMask = new uint[size / 2]; - // una volta inizializzata la classe di base sistemo vettori allarmi disabilitati ed il contatore blink dei fronti di discesa + // una volta inizializzata la classe di base sistemo vettori allarmi disabilitati ed il + // contatore blink dei fronti di discesa alarmsBlinkCounter = new int[messages.Count]; int idx = 0; int bank = 0; @@ -217,7 +211,8 @@ namespace IOB_UT_NEXT } /// - /// Classe gestione configurazione parametri di base x configuraizone estesa (es MTConnect, OPC-UA, ...) + /// Classe gestione configurazione parametri di base x configuraizone estesa (es MTConnect, + /// OPC-UA, ...) /// public class BaseParamConf { @@ -229,14 +224,13 @@ namespace IOB_UT_NEXT public List condWork { get; set; } = new List(); /// - /// Indica se l'emergenza armata va riportata verso Mapo come bit a TRUE - /// True --> armata = 1 / triggered = 0 - /// False --> triggered = 1 / armata = 0 + /// Indica se l'emergenza armata va riportata verso Mapo come bit a TRUE True --> armata + /// = 1 / triggered = 0 False --> triggered = 1 / armata = 0 /// public bool emergencyArmedTrue { get; set; } = true; /// - /// Elenco items FILTRATI da invio come dynData --> FluxLog (events o samples) + /// Elenco items FILTRATI da invio come dynData --> FluxLog (events o samples) /// public List fluxLogVeto { get; set; } = new List(); @@ -309,7 +303,8 @@ namespace IOB_UT_NEXT } /// - /// Classe per rappresentare una lista di oggetti chiave/valore target x controlo condizioni multiple + indicazione modalità di controllo (AND/OR/...) + /// Classe per rappresentare una lista di oggetti chiave/valore target x controlo condizioni + /// multiple + indicazione modalità di controllo (AND/OR/...) /// public class diCheckCondSetup { @@ -326,13 +321,75 @@ namespace IOB_UT_NEXT public boolCheckMode checkMode { get; set; } = boolCheckMode.AND; /// - /// indica se il check vada NEGATO (esempio se cerco la condizione opposta, esempio num allarmi 0 --> se true NEGO la condizione HO ALLARMI) + /// indica se il check vada NEGATO (esempio se cerco la condizione opposta, esempio num + /// allarmi 0 --> se true NEGO la condizione HO ALLARMI) /// public bool negateValue { get; set; } = false; #endregion Public Properties } + /// + /// Classe x definizione delle azioni in fase di setup macchina + /// + public class MachineSetupAction + { + #region Public Properties + + /// + /// Indica se vada disabilitato il contapezzi quando la condizione NotEqual sia soddisfatta + /// + public bool DisablePzCountNotEqual { get; set; } = false; + + /// + /// Parametro target dell'azione + /// + public string TargetParam { get; set; } = ""; + + /// + /// parametro da impostare SE il check da esito EQUAL + /// + public int TargetValEqual { get; set; } = 0; + + /// + /// parametro da impostare SE il check da esito NOT EQUAL + /// + public int TargetValNotEqual { get; set; } = 1; + + #endregion Public Properties + } + + /// + /// Definizione parametri di setup incrociato... + /// + public class MachineSetupConf + { + #region Public Properties + + /// + /// Dizionario dei parametri di corrispondenza tra variabili MES e variabili Macchina MES = + /// scritte dal MES Macchina = scritte da macchina + /// + public Dictionary checkParList { get; set; } = new Dictionary(); + + /// + /// Abilitazione gestione Setup Avanzato (= scrittura) + /// + public bool EnableAdvSetup { get; set; } = false; + + /// + /// Modalità gestione setup + /// + public MachineSetupMode SetupMode { get; set; } = MachineSetupMode.ND; + + /// Dizionario dei parametri da scrivere quando si rilevano differenze tra i + /// parametri MES/Macchina string (key) --> memoria da scrivere tuple --> valori da scrivere quando uguali o diversi + public List writeParAction { get; set; } = new List(); + + #endregion Public Properties + } + /// /// COnfigurazione blocchi x accesso memoria ottimizzato /// @@ -360,84 +417,6 @@ namespace IOB_UT_NEXT #endregion Public Properties } - /// - /// Definizione parametri watchdog - /// - public class WatchDogConf - { - /// - /// Abilitazione WatchDog - /// - public bool IsEnabled { get; set; } = false; - /// - /// Conf memoria x lettura WatchDog (ToMes), se !="" è gestito - /// - public string MemConfRead { get; set; } = ""; - /// - /// Conf memoria x scrittura WatchDog (FromMes), se !="" è gestito - /// - public string MemConfWrite { get; set; } = ""; - /// - /// Valore max contatore prima di resettare - /// - public int MaxVal { get; set; } = 9999; - } - - /// - /// Definizione parametri di setup incrociato... - /// - public class MachineSetupConf - { - /// - /// Modalità gestione setup - /// - public MachineSetupMode SetupMode { get; set; } = MachineSetupMode.ND; - - /// - /// Abilitazione gestione Setup Avanzato (= scrittura) - /// - public bool EnableAdvSetup { get; set; } = false; - - /// - /// Dizionario dei parametri di corrispondenza tra variabili MES e variabili Macchina - /// MES = scritte dal MES - /// Macchina = scritte da macchina - /// - public Dictionary checkParList { get; set; } = new Dictionary(); - - /// - /// Dizionario dei parametri da scrivere quando si rilevano differenze tra i parametri MES/Macchina - /// string (key) --> memoria da scrivere - /// tuple --> valori da scrivere quando uguali o diversi - /// - public List writeParAction { get; set; } = new List(); - } - - /// - /// Classe x definizione delle azioni in fase di setup macchina - /// - public class MachineSetupAction - { - /// - /// Parametro target dell'azione - /// - public string TargetParam { get; set; } = ""; - - /// - /// parametro da impostare SE il check da esito EQUAL - /// - public int TargetValEqual { get; set; } = 0; - /// - /// parametro da impostare SE il check da esito NOT EQUAL - /// - public int TargetValNotEqual { get; set; } = 1; - - /// - /// Indica se vada disabilitato il contapezzi quando la condizione NotEqual sia soddisfatta - /// - public bool DisablePzCountNotEqual { get; set; } = false; - } - /// /// Classe gestione configurazione parametri specifici OPC-UA da BaseParamConf /// @@ -470,12 +449,6 @@ namespace IOB_UT_NEXT /// public diCheckCondSetup condError { get; set; } = new diCheckCondSetup(); - - /// - /// Struttura dati x check condizione Errore - /// - public diCheckCondSetup condWorkOpc { get; set; } = new diCheckCondSetup(); - /// /// Struttura dati x check condizione Emergenza /// @@ -496,6 +469,11 @@ namespace IOB_UT_NEXT /// public diCheckCondSetup condReady { get; set; } = new diCheckCondSetup(); + /// + /// Struttura dati x check condizione Setup + /// + public diCheckCondSetup condSetup { get; set; } = new diCheckCondSetup(); + /// /// Struttura dati x check condizione WarmUp - CoolDown /// @@ -505,16 +483,19 @@ namespace IOB_UT_NEXT /// Struttura dati x check condizione Warning /// public diCheckCondSetup condWarning { get; set; } = new diCheckCondSetup(); + /// - /// Struttura dati x check condizione Setup + /// Struttura dati x check condizione Errore /// - public diCheckCondSetup condSetup { get; set; } = new diCheckCondSetup(); + public diCheckCondSetup condWorkOpc { get; set; } = new diCheckCondSetup(); /// /// Elenco dei NodeId da ignorare intesi come interi rami (se vuoto NON filtro) /// public List filterItemsNodeId { get; set; } = new List(); + public UserIdent Identity { get; set; } = new UserIdent(); + /// /// Aree di memoria lettura /// @@ -525,34 +506,66 @@ namespace IOB_UT_NEXT /// public Dictionary mMapWrite { get; set; } = new Dictionary(); - /// - /// Elenco dei SOLI item sottoscritti (se vuoto TUTTI) - /// - public List subscribedItems { get; set; } = new List(); - /// /// Elenco item RAW sottoscritti e relative configurazioni di decodifica da byte[] /// public Dictionary rawSubscribedItemsConf { get; set; } = new Dictionary(); - /// - /// Conf Gestione WatchDog - /// - public WatchDogConf WatchDog { get; set; } = new WatchDogConf(); - /// /// Conf gestione setup macchina /// public MachineSetupConf SetupConf { get; set; } = new MachineSetupConf(); - public UserIdent Identity { get; set; } = new UserIdent(); + /// + /// Elenco dei SOLI item sottoscritti (se vuoto TUTTI) + /// + public List subscribedItems { get; set; } = new List(); + + /// + /// Conf Gestione WatchDog + /// + public WatchDogConf WatchDog { get; set; } = new WatchDogConf(); #endregion Public Properties } public class UserIdent { - public string UserName { get; set; } = ""; + #region Public Properties + public string Passwd { get; set; } = ""; + public string UserName { get; set; } = ""; + + #endregion Public Properties + } + + /// + /// Definizione parametri watchdog + /// + public class WatchDogConf + { + #region Public Properties + + /// + /// Abilitazione WatchDog + /// + public bool IsEnabled { get; set; } = false; + + /// + /// Valore max contatore prima di resettare + /// + public int MaxVal { get; set; } = 9999; + + /// + /// Conf memoria x lettura WatchDog (ToMes), se !="" è gestito + /// + public string MemConfRead { get; set; } = ""; + + /// + /// Conf memoria x scrittura WatchDog (FromMes), se !="" è gestito + /// + public string MemConfWrite { get; set; } = ""; + + #endregion Public Properties } } \ No newline at end of file diff --git a/IOB-UT-NEXT/val.cs b/IOB-UT-NEXT/val.cs deleted file mode 100644 index 94029a5c..00000000 --- a/IOB-UT-NEXT/val.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace IOB_UT_NEXT -{ - internal class val - { - } -} \ No newline at end of file