diff --git a/IOB-WIN-NEXT/Iob/Fanuc.cs b/IOB-WIN-NEXT/Iob/Fanuc.cs
index c2853ec5..24b85354 100644
--- a/IOB-WIN-NEXT/Iob/Fanuc.cs
+++ b/IOB-WIN-NEXT/Iob/Fanuc.cs
@@ -933,6 +933,7 @@ namespace IOB_WIN_NEXT.Iob
// refresh stato allarmi!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
dtAvvioAdp = DateTime.Now;
if (adpRunning)
{
@@ -996,6 +997,7 @@ namespace IOB_WIN_NEXT.Iob
{
lgError("IMPOSSIBILE effettuare disconnessione: Connessione non disponibile...");
}
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/Iob/Generic.cs b/IOB-WIN-NEXT/Iob/Generic.cs
index 8f949a0c..51849c36 100644
--- a/IOB-WIN-NEXT/Iob/Generic.cs
+++ b/IOB-WIN-NEXT/Iob/Generic.cs
@@ -414,6 +414,15 @@ namespace IOB_WIN_NEXT.Iob
}
}
+ protected bool queueInEnabCurr { get; set; } = false;
+ ///
+ /// Verifica veto coda QueueIN ed aggiorna abilitazione su variabile
+ ///
+ protected void checkVetoQueueIn()
+ {
+ queueInEnabCurr = dtVetoQueueIN < DateTime.Now;
+ }
+
///
/// Indicazione VETO invio a server sino alla data-ora indicata
///
@@ -1726,29 +1735,30 @@ namespace IOB_WIN_NEXT.Iob
else
{
// verifico non sia in veto invio iniziale...
- if (dtVetoQueueIN >= adesso)
- {
- lgDebug($"[VETO FOR QUEUE-IN] | {qEncodeIN} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}");
- }
- else
+ if (queueInEnabCurr)
{
// --> accodo (valore già formattato)!
QueueIN.Enqueue(qEncodeIN);
// loggo!
lgDebug($"[QUEUE-IN] {qEncodeIN}");
}
- }
- // aggiorno counters ed eventuale reset
- nReadFilt++;
- if (nReadFilt > int.MaxValue - 1)
- {
- nReadFilt = 0; // per evitare buffer overflow...
- }
+ else
+ {
+ lgDebug($"[VETO FOR QUEUE-IN] | {qEncodeIN} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}");
+ checkVetoQueueIn();
+ }
+ // aggiorno counters ed eventuale reset
+ nReadFilt++;
+ if (nReadFilt > int.MaxValue - 1)
+ {
+ nReadFilt = 0; // per evitare buffer overflow...
+ }
- counterSigIN++;
- if (counterSigIN > 9999)
- {
- counterSigIN = 0;
+ counterSigIN++;
+ if (counterSigIN > 9999)
+ {
+ counterSigIN = 0;
+ }
}
}
@@ -3107,7 +3117,7 @@ namespace IOB_WIN_NEXT.Iob
// resetto tutti i valori BYTE IN/PREV/OUT... così invio macchina spenta...
B_input = 0;
B_output = 0;
- B_previous = 0;
+ B_previous = -1;
accodaSigIN(ref currDispData);
// update controllo
lastDisconnCheck = DateTime.Now;
@@ -3874,6 +3884,10 @@ namespace IOB_WIN_NEXT.Iob
// aggiungo altri defaults
setDefaults(resetQueue);
adpTryRestart = true;
+ // sistemo altri check avvio
+ queueInEnabCurr = false;
+ dtVetoQueueIN = DateTime.Now.AddSeconds(vetoQueueIn);
+ lgInfoStartup($"Impostato veto QUEUE-IN a {vetoQueueIn}s | fino alle {dtVetoQueueIN:yyyy.MM.dd HH:mm:ss}");
lgDebug("startAdapter completed");
}
@@ -4069,6 +4083,7 @@ namespace IOB_WIN_NEXT.Iob
public virtual void tryConnect()
{
dtAvvioAdp = DateTime.Now;
+ queueInEnabCurr = true;
}
///
@@ -4076,6 +4091,7 @@ namespace IOB_WIN_NEXT.Iob
///
public virtual void tryDisconnect()
{
+ queueInEnabCurr = false;
}
///
@@ -4322,7 +4338,7 @@ namespace IOB_WIN_NEXT.Iob
///
/// Vettore 32 BIT valori precedenti
///
- protected int B_previous;
+ protected int B_previous = -1;
///
/// Num errori check alive
@@ -7815,21 +7831,30 @@ namespace IOB_WIN_NEXT.Iob
///
private void processAllMemory()
{
- // init obj display
- newDisplayData currDispData = new newDisplayData();
- // in primis SALVO valori previous/precedenti
- B_previous = B_output;
- // poi faccio lettura NUOVI valori
- readAllData(ref currDispData);
- // eseguo il filtering dei valori (per i bit "blinking")
- filterData();
- // effettuo confronto valori vecchi/nuovi... SE trovo variazione OPPURE se è passato +
- // di un timeout di controllo...
- if (B_output != B_previous)
+ //verifico se sia abilitato processing...
+ if (queueInEnabCurr)
{
- accodaSigIN(ref currDispData);
+ // init obj display
+ newDisplayData currDispData = new newDisplayData();
+ // in primis SALVO valori previous/precedenti
+ B_previous = B_output;
+ // poi faccio lettura NUOVI valori
+ readAllData(ref currDispData);
+ // eseguo il filtering dei valori (per i bit "blinking")
+ filterData();
+ // effettuo confronto valori vecchi/nuovi... SE trovo variazione OPPURE se è passato +
+ // di un timeout di controllo...
+ if (B_output != B_previous)
+ {
+ accodaSigIN(ref currDispData);
+ }
+ raiseRefresh(currDispData);
+ }
+ else
+ {
+ lgInfo($"VETO on processAllMemory: queueIn disabled");
+ checkVetoQueueIn();
}
- raiseRefresh(currDispData);
}
private void processMem2Write()
diff --git a/IOB-WIN-NEXT/Iob/Kawasaki.cs b/IOB-WIN-NEXT/Iob/Kawasaki.cs
index f5e94b75..b233dcf1 100644
--- a/IOB-WIN-NEXT/Iob/Kawasaki.cs
+++ b/IOB-WIN-NEXT/Iob/Kawasaki.cs
@@ -401,6 +401,7 @@ namespace IOB_WIN_NEXT.Iob
// verifico se sta girando
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -462,6 +463,7 @@ namespace IOB_WIN_NEXT.Iob
{
lgError("IMPOSSIBILE effettuare disconnessione KAWASAKI: Connessione non disponibile...");
}
+ queueInEnabCurr = false;
needRefresh = true;
}
diff --git a/IOB-WIN-NEXT/Iob/MTConnect.cs b/IOB-WIN-NEXT/Iob/MTConnect.cs
index 6eb6f29f..f54c71cb 100644
--- a/IOB-WIN-NEXT/Iob/MTConnect.cs
+++ b/IOB-WIN-NEXT/Iob/MTConnect.cs
@@ -18,8 +18,7 @@ namespace IOB_WIN_NEXT.Iob
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget TrackHound
- /// https://github.com/TrakHound/MTConnect.NET
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget TrackHound https://github.com/TrakHound/MTConnect.NET
///
///
///
@@ -128,11 +127,7 @@ namespace IOB_WIN_NEXT.Iob
DateTime adesso = DateTime.Now;
lastReadPLC = adesso;
// verifico non sia in veto invio iniziale...
- if (dtVetoQueueIN >= adesso)
- {
- lgDebug($"[VETO readSemafori] | veto attivo sino alle {adesso:yyyy.MM.dd HH:mm:ss}");
- }
- else
+ if (queueInEnabCurr)
{
try
{
@@ -153,6 +148,11 @@ namespace IOB_WIN_NEXT.Iob
lgError($"Eccezione in readSemafori:{Environment.NewLine}{exc}");
}
}
+ else
+ {
+ lgDebug($"[VETO readSemafori] | veto attivo sino alle {adesso:yyyy.MM.dd HH:mm:ss}");
+ checkVetoQueueIn();
+ }
}
///
@@ -206,6 +206,7 @@ namespace IOB_WIN_NEXT.Iob
// refresh stato allarmi!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -252,7 +253,7 @@ namespace IOB_WIN_NEXT.Iob
public override void tryDisconnect()
{
// verifico che NON sia in fase di avvio MTC...
- if (isConnecting && DateTime.Now.Subtract(startConnecting).TotalSeconds<60)
+ if (isConnecting && DateTime.Now.Subtract(startConnecting).TotalSeconds < 60)
{
lgInfo("Disconnessione non effettuata: connessione ancora in corso");
}
@@ -280,6 +281,8 @@ namespace IOB_WIN_NEXT.Iob
lgError("IMPOSSIBILE effettuare disconnessione MTC: Connessione non disponibile...");
}
}
+ queueInEnabCurr = false;
+ needRefresh = true;
}
#endregion Public Methods
@@ -371,11 +374,15 @@ namespace IOB_WIN_NEXT.Iob
}
}
+ protected bool isConnecting { get; set; } = false;
+
///
/// Parametri specifici MTC
///
protected MtcParamConf mtcParams { get; set; }
+ protected DateTime startConnecting { get; set; } = DateTime.Today;
+
///
/// URL x salvataggio elenco dataItems MTC
///
@@ -502,7 +509,7 @@ namespace IOB_WIN_NEXT.Iob
if (newValue != null)
{
#if false
- lgTrace($"Richiesta checkSaveSample per {newValue} | id: {newValue.DataItemId} | CDATA: {newValue.CDATA}");
+ lgTrace($"Richiesta checkSaveSample per {newValue} | id: {newValue.DataItemId} | CDATA: {newValue.CDATA}");
#endif
// verifico in memoria se ho l'oggetto condition ed il suo valore..
if (dataItemMem.ContainsKey(newValue.DataItemId))
@@ -1046,8 +1053,6 @@ namespace IOB_WIN_NEXT.Iob
lgInfo($"Trasformazione B_input: {B_input} | currRun = {currRun}");
}
}
- protected bool isConnecting { get; set; } = false;
- protected DateTime startConnecting { get; set; } = DateTime.Today;
///
/// Vera connessione ad MTC
diff --git a/IOB-WIN-NEXT/Iob/OSAI.cs b/IOB-WIN-NEXT/Iob/OSAI.cs
index 731f291a..10a3a18f 100644
--- a/IOB-WIN-NEXT/Iob/OSAI.cs
+++ b/IOB-WIN-NEXT/Iob/OSAI.cs
@@ -471,6 +471,7 @@ namespace IOB_WIN_NEXT.Iob
if (connectionOk)
{
dtAvvioAdp = DateTime.Now;
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -536,6 +537,7 @@ namespace IOB_WIN_NEXT.Iob
{
lgError("IMPOSSIBILE effettuare disconnessione: Connessione non disponibile...");
}
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/Iob/Omron.cs b/IOB-WIN-NEXT/Iob/Omron.cs
index 7f463ba3..5a823283 100644
--- a/IOB-WIN-NEXT/Iob/Omron.cs
+++ b/IOB-WIN-NEXT/Iob/Omron.cs
@@ -207,6 +207,7 @@ namespace IOB_WIN_NEXT.Iob
// refresh stato connessione!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -271,6 +272,7 @@ namespace IOB_WIN_NEXT.Iob
{
lgError("IMPOSSIBILE effettuare disconnessione OMRON: Connessione non disponibile...");
}
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs b/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs
index 56b3e36c..f76d6205 100644
--- a/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs
+++ b/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs
@@ -118,6 +118,7 @@ namespace IOB_WIN_NEXT.IobBeckhoff
{
setEventHandler();
readCurrVal();
+ queueInEnabCurr = true;
}
lgInfo($"Connected: {connectionOk}");
}
@@ -134,6 +135,7 @@ namespace IOB_WIN_NEXT.IobBeckhoff
AdsCli.dispose();
}
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobFile/FileEurom63.cs b/IOB-WIN-NEXT/IobFile/FileEurom63.cs
index ca28132e..ceb5c237 100644
--- a/IOB-WIN-NEXT/IobFile/FileEurom63.cs
+++ b/IOB-WIN-NEXT/IobFile/FileEurom63.cs
@@ -413,6 +413,7 @@ namespace IOB_WIN_NEXT.IobFile
var nextLevel = Eurom63.ComLevel.IsConnected;
var connectSession = confE63.ActiveSessions[0];
processSession(nextLevel, ref connectSession);
+ queueInEnabCurr = true;
}
///
@@ -421,6 +422,7 @@ namespace IOB_WIN_NEXT.IobFile
public override void tryDisconnect()
{
connectionOk = false;
+ queueInEnabCurr = false;
try
{
abortPrevJob();
diff --git a/IOB-WIN-NEXT/IobFile/FileGen.cs b/IOB-WIN-NEXT/IobFile/FileGen.cs
index 1556a21a..7f1ccea7 100644
--- a/IOB-WIN-NEXT/IobFile/FileGen.cs
+++ b/IOB-WIN-NEXT/IobFile/FileGen.cs
@@ -199,6 +199,7 @@ namespace IOB_WIN_NEXT.IobFile
connectionOk = Directory.Exists(BaseDir);
if (connectionOk)
{
+ queueInEnabCurr = true;
#if false
try
{
@@ -225,6 +226,7 @@ namespace IOB_WIN_NEXT.IobFile
public override void tryDisconnect()
{
connectionOk = false;
+ queueInEnabCurr = false;
try
{
#if false
diff --git a/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs b/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs
index 4f617e33..e165f522 100644
--- a/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs
+++ b/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs
@@ -161,6 +161,7 @@ namespace IOB_WIN_NEXT.IobFile
// refresh stato connessione!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo($"Connessione OK alla folder {logDirPath}");
@@ -201,6 +202,7 @@ namespace IOB_WIN_NEXT.IobFile
{
// registro solo che è disconnesso
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
@@ -529,11 +531,7 @@ namespace IOB_WIN_NEXT.IobFile
string currVal = getEncodSigLog(sLog2send.dtRif, valInt, counterSigIN);
// verifico non sia in veto invio iniziale...
- if (dtVetoQueueIN >= adesso)
- {
- lgDebug($"[VETO FOR QUEUE-IN] | {currVal} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}");
- }
- else
+ if (queueInEnabCurr)
{
// --> accodo (valore già formattato)!
QueueIN.Enqueue(currVal);
@@ -545,6 +543,11 @@ namespace IOB_WIN_NEXT.IobFile
counterSigIN = 0;
}
}
+ else
+ {
+ lgDebug($"[VETO FOR QUEUE-IN] | {currVal} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}");
+ checkVetoQueueIn();
+ }
}
// salvo in last il valore di act...
diff --git a/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs b/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs
index d4ce44e0..3e955be1 100644
--- a/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs
+++ b/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs
@@ -523,6 +523,7 @@ namespace IOB_WIN_NEXT.IobModbusTCP
// refresh stato allarmi!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
lgInfo($"Connessione OK: {connectionOk}");
if (adpRunning)
{
@@ -582,6 +583,7 @@ namespace IOB_WIN_NEXT.IobModbusTCP
}
}
connectionOk = false;
+ queueInEnabCurr = false;
// resetto last ping...
lastPING = DateTime.Now.AddMinutes(-1);
}
diff --git a/IOB-WIN-NEXT/IobNet/IcoelSoap.cs b/IOB-WIN-NEXT/IobNet/IcoelSoap.cs
index b26f9036..ae821569 100644
--- a/IOB-WIN-NEXT/IobNet/IcoelSoap.cs
+++ b/IOB-WIN-NEXT/IobNet/IcoelSoap.cs
@@ -282,6 +282,7 @@ namespace IOB_WIN_NEXT.IobNet
// refresh stato connessione!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -320,6 +321,7 @@ namespace IOB_WIN_NEXT.IobNet
{
// registro solo che è disconnesso
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobNet/Ping.cs b/IOB-WIN-NEXT/IobNet/Ping.cs
index 55a615a1..24506c67 100644
--- a/IOB-WIN-NEXT/IobNet/Ping.cs
+++ b/IOB-WIN-NEXT/IobNet/Ping.cs
@@ -149,6 +149,7 @@ namespace IOB_WIN_NEXT.IobNet
// in primis salvo data ping...
lastPING = DateTime.Now;
connectionOk = true;
+ queueInEnabCurr = true;
lgInfo("PING OK");
}
else
@@ -167,6 +168,7 @@ namespace IOB_WIN_NEXT.IobNet
{
lgInfo("Richiesta disconnessione adapter PING!");
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobNet/WebPageScrap.cs b/IOB-WIN-NEXT/IobNet/WebPageScrap.cs
index 20b461e8..d1ae3b44 100644
--- a/IOB-WIN-NEXT/IobNet/WebPageScrap.cs
+++ b/IOB-WIN-NEXT/IobNet/WebPageScrap.cs
@@ -203,6 +203,7 @@ namespace IOB_WIN_NEXT.IobNet
connectionOk = (testPingMachine == IPStatus.Success);
if (connectionOk)
{
+ queueInEnabCurr = true;
try
{
//var t = TaskEx.Run(() => startDriver());
@@ -229,6 +230,7 @@ namespace IOB_WIN_NEXT.IobNet
public override void tryDisconnect()
{
connectionOk = false;
+ queueInEnabCurr = false;
try
{
// in primis chiudo driver...
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUa.cs b/IOB-WIN-NEXT/IobOpc/OpcUa.cs
index f8291839..586899fe 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUa.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUa.cs
@@ -109,7 +109,7 @@ namespace IOB_WIN_NEXT.IobOpc
lastPzCountSend = adesso;
lastWarnODL = adesso;
lastCurrent = adesso;
- lgTrace($"Aggiornato IobOpcUa.lastCurrent: {lastCurrent}");
+ lgTrace($"Aggiornato IobOpcUa.lastCurrent: {lastCurrent}");
// ora leggo il file di conf specifico....
string jsonFileName = getOptPar("OPC_PARAM_CONF");
if (!string.IsNullOrEmpty(jsonFileName))
@@ -543,10 +543,10 @@ namespace IOB_WIN_NEXT.IobOpc
parentForm.commPlcActive = false;
// connesso se esito == 1...
connectionOk = (esitoLink == 1);
- //connectionOk = true;
// refresh stato allarmi!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -618,6 +618,7 @@ namespace IOB_WIN_NEXT.IobOpc
{
lgDebug("IMPOSSIBILE effettuare disconnessione OpcUa: Connessione non disponibile...");
}
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobSiemens/Siemens.cs b/IOB-WIN-NEXT/IobSiemens/Siemens.cs
index 1312b883..38bf79dd 100644
--- a/IOB-WIN-NEXT/IobSiemens/Siemens.cs
+++ b/IOB-WIN-NEXT/IobSiemens/Siemens.cs
@@ -1032,6 +1032,7 @@ namespace IOB_WIN_NEXT.IobSiemens
// refresh stato allarmi!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo($"Connessione OK: {connectionOk} | adpRunning: {adpRunning}");
@@ -1080,6 +1081,7 @@ namespace IOB_WIN_NEXT.IobSiemens
{
currPLC.Close();
connectionOk = false;
+ queueInEnabCurr = false;
lgInfo(szStatusConnection);
lgInfo("Effettuata disconnessione adapter SIEMENS!");
}
diff --git a/IOB-WIN-NEXT/IobSql/IcoelDb.cs b/IOB-WIN-NEXT/IobSql/IcoelDb.cs
index af9d0b2b..c7ae6c9b 100644
--- a/IOB-WIN-NEXT/IobSql/IcoelDb.cs
+++ b/IOB-WIN-NEXT/IobSql/IcoelDb.cs
@@ -207,6 +207,7 @@ namespace IOB_WIN_NEXT.IobSql
// refresh stato connessione!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -246,6 +247,7 @@ namespace IOB_WIN_NEXT.IobSql
{
// registro solo che è disconnesso
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobSql/SqlServLantek.cs b/IOB-WIN-NEXT/IobSql/SqlServLantek.cs
index 1649f9f4..1f991c4a 100644
--- a/IOB-WIN-NEXT/IobSql/SqlServLantek.cs
+++ b/IOB-WIN-NEXT/IobSql/SqlServLantek.cs
@@ -296,6 +296,7 @@ namespace IOB_WIN_NEXT.IobSql
// refresh stato connessione!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -335,6 +336,7 @@ namespace IOB_WIN_NEXT.IobSql
{
// registro solo che è disconnesso
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
diff --git a/IOB-WIN-NEXT/IobSql/SqlServPama.cs b/IOB-WIN-NEXT/IobSql/SqlServPama.cs
index a0427b47..c1f9d8c6 100644
--- a/IOB-WIN-NEXT/IobSql/SqlServPama.cs
+++ b/IOB-WIN-NEXT/IobSql/SqlServPama.cs
@@ -298,6 +298,7 @@ namespace IOB_WIN_NEXT.IobSql
// refresh stato connessione!!!
if (connectionOk)
{
+ queueInEnabCurr = true;
if (adpRunning)
{
lgInfo("Connessione OK");
@@ -337,6 +338,7 @@ namespace IOB_WIN_NEXT.IobSql
{
// registro solo che è disconnesso
connectionOk = false;
+ queueInEnabCurr = false;
}
#endregion Public Methods
@@ -640,11 +642,7 @@ namespace IOB_WIN_NEXT.IobSql
{
string currVal = getEncodSigLog(sLog2send.DtEve, sLog2send.ValInt, counterSigIN);
// verifico non sia in veto invio iniziale...
- if (dtVetoQueueIN >= adesso)
- {
- lgDebug($"[VETO FOR QUEUE-IN] | {currVal} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}");
- }
- else
+ if (queueInEnabCurr)
{
// --> accodo (valore già formattato)!
QueueIN.Enqueue(currVal);
@@ -656,6 +654,11 @@ namespace IOB_WIN_NEXT.IobSql
counterSigIN = 0;
}
}
+ else
+ {
+ lgDebug($"[VETO FOR QUEUE-IN] | {currVal} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}");
+ checkVetoQueueIn();
+ }
}
}