verificata e corretta gestione lettura allarmi (web.config / mode)

se mode == "debug --> leggo forzato tutto, altrimenti NO
This commit is contained in:
Samuele E. Locatelli
2017-04-19 12:31:21 +02:00
parent 91d2bfacd0
commit d99188ebc1
3 changed files with 13 additions and 5 deletions
+6 -3
View File
@@ -1613,9 +1613,12 @@ namespace MTC_Adapter
getPath();
getAxis();
// DELETEME!!!!
// PATH TEMPORANEO x forzare check allarmi...
forceAlarmCheck();
// se NON in modalità PROD eseguo chiamate "extra" x allarmi
if (utils.CRS("mode") == "debug")
{
// SOLO in modalità testing forzo il controllo continuo allarmi...
forceAlarmCheck();
}
}
// ciclo lento
else if (ciclo == gatherCycle.LF)
+5 -2
View File
@@ -795,13 +795,16 @@ namespace MTC_Adapter
try
{
// aggiorno vettore allarmi x intero!
Buffer.BlockCopy(MemBlock, 0, AlarmFlags, i, MemBlock.Length);
Buffer.BlockCopy(MemBlock, 0, AlarmFlags, i * 4, 4);
}
catch (Exception exc)
{
lg.Error(string.Format("Errore in BLOCKCOPY per indice i = {2},{0}{1}", Environment.NewLine, exc, i));
}
if (utils.CRI("loglevel") > 5)
{
lg.Info("Bit {0}, MemBlock: {1}", i, MemBlock[0]);
}
// segnalo allarme letto! memorizzo allarme nel vettore ack....
retACK_DW0 = utils.setBitOnStFlag(retACK_DW0, true, i);
}
+2
View File
@@ -38,6 +38,8 @@
<add key="recTime" value="true"/>
<add key="verbose" value="true"/>
<add key="loglevel" value="5"/>
<add key="mode" value="prod"/>
<!--Definizione avvio Adapter-->
<add key="autoLoadConf" value="false"/>
<add key="autoStartOnLoad" value="true"/>