Inserito gestione nome area REDIS x css realtime

This commit is contained in:
Samuele E. Locatelli
2020-01-21 10:13:05 +01:00
parent d151fb7313
commit 3f69fb6da7
+53
View File
@@ -1420,6 +1420,59 @@ namespace AppData
}
}
#endregion
#region metodi x UNLOAD
/// <summary>
/// Calcola area REDIS per postsaizone Unload
/// </summary>
/// <param name="codPost"></param>
/// <returns></returns>
public static string machineUnloadArea(string codPost)
{
return memLayer.ML.redHash($"MachineUnload:{codPost}");
}
/// <summary>
/// Svuota elenco pezzi nella postazione di unload
/// </summary>
/// <returns></returns>
public bool resetPostUnload(string codPost = "01")
{
bool answ = false;
try
{
memLayer.ML.redFlushKey(machineUnloadArea(codPost));
answ = true;
}
catch
{ }
return answ;
}
/// <summary>
/// Fa setup postsazione scarico (lettura da DB dell'elenco pezzi con relativo stato)
/// </summary>
/// <returns></returns>
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
}