popolato tabelle elenco codici allarme

This commit is contained in:
Samuele E. Locatelli
2018-09-15 08:44:46 +02:00
parent 231d45ad07
commit 16deba684f
+21 -10
View File
@@ -846,27 +846,38 @@ namespace SCMA.AdapterCom
mAdapter.Start();
#endif
// var accessorie
string hashKey = "";
string hashVal = "";
var list = new List<KeyValuePair<string, string>>();
string nLevel = "";
// Imposto CONF
hashKey = confHash("VersAdp");
hashVal = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
setRSV(hashKey, hashVal);
//hashKey = confHash("CNC");
//hashVal = "lettura AlarmListCNC.map";
//setRSV(hashKey, hashVal);
hashKey = confHash("PLC");
var list = new List<KeyValuePair<string, string>>();
//= new KeyValuePair<string, string>();
// allarmi CNC
hashKey = confHash("CNC");
foreach (var item in elencoAllarmi)
{
// se è PLC aggiungo
if (item.gruppo == "CNC")
{
nLevel = item.livello == "FAULT" ? "900" : "500";
list.Add(new KeyValuePair<string, string>(item.codNum, nLevel + "|" + item.descrizione));
}
}
redSaveHashList(hashKey, list);
// allarmi PLC
hashKey = confHash("PLC");
foreach (var item in elencoAllarmi)
{
// se è PLC aggiungo
if (item.gruppo == "PLC")
{
list.Add(new KeyValuePair<string, string>(item.codNum, item.livello + "|" + item.descrizione));
nLevel = item.livello == "FAULT" ? "900" : "500";
list.Add(new KeyValuePair<string, string>(item.codNum, nLevel + "|" + item.descrizione));
}
}
}
redSaveHashList(hashKey, list);
//hashKey = confHash("DataModel");
//hashVal = "";
@@ -884,7 +895,7 @@ namespace SCMA.AdapterCom
foreach (var item in itemNodes)
{
hashKey = machineHash(item.Key);
hashVal = item.Value.cObject.ToString();
hashVal = availStatus.UNAVAILABLE.ToString(); // item.Value.cObject.ToString();
setRSV(hashKey, hashVal);
}
}