From 3f69fb6da75a9611304287a2ae3d2f97774a748b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 21 Jan 2020 10:13:05 +0100 Subject: [PATCH] Inserito gestione nome area REDIS x css realtime --- AppData/ComLib.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) 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 }