diff --git a/AppData/ComLib.cs b/AppData/ComLib.cs index 35bf8b1..f17b53b 100644 --- a/AppData/ComLib.cs +++ b/AppData/ComLib.cs @@ -1420,6 +1420,59 @@ namespace AppData } } + #endregion + + #region metodi x UNLOAD + + /// + /// Calcola area REDIS per postsaizone Unload + /// + /// + /// + public static string machineUnloadArea(string codPost) + { + return memLayer.ML.redHash($"MachineUnload:{codPost}"); + } + + /// + /// Svuota elenco pezzi nella postazione di unload + /// + /// + public bool resetPostUnload(string codPost = "01") + { + bool answ = false; + try + { + memLayer.ML.redFlushKey(machineUnloadArea(codPost)); + answ = true; + } + catch + { } + return answ; + } + /// + /// Fa setup postsazione scarico (lettura da DB dell'elenco pezzi con relativo stato) + /// + /// + public bool setupPostUnload(string codPost = "01") + { + bool answ = false; + try + { + // svuoto... + resetPostUnload(codPost); + // ri-carico da DB + + // salvo su area REDIS + answ = true; + } + catch + { } + return answ; + } + + + #endregion }