Fix rename coda ping + fix FTP
This commit is contained in:
@@ -203,7 +203,7 @@ namespace IOB_UT_NEXT.Iob
|
||||
/// <summary>
|
||||
/// Coda degli esiti di ping x calcolo stato macchina
|
||||
/// </summary>
|
||||
public DataQueue PingQueue;
|
||||
public DataQueue QueuePing;
|
||||
|
||||
/// <summary>
|
||||
/// Determina se utilizzare blocchi di memoria IOT contigui (e quindi processing
|
||||
@@ -636,7 +636,7 @@ namespace IOB_UT_NEXT.Iob
|
||||
QueueMessages = new DataQueue(codIob, "QueueMessages", false, redisMan);
|
||||
QueueRawTransf = new DataQueue(codIob, "QueueRawTransf", false, redisMan);
|
||||
QueueULog = new DataQueue(codIob, "QueueULog", false, redisMan);
|
||||
PingQueue = new DataQueue(codIob, "PingQueue", false, redisMan);
|
||||
QueuePing = new DataQueue(codIob, "QueuePing", false, redisMan);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
@@ -5158,7 +5158,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
QueueMessages = new DataQueue(codIob, "QueueMessages", false, redisMan);
|
||||
QueueRawTransf = new DataQueue(codIob, "QueueRawTransf", false, redisMan);
|
||||
QueueULog = new DataQueue(codIob, "QueueULog", false, redisMan);
|
||||
PingQueue = new DataQueue(codIob, "PingQueue", false, redisMan);
|
||||
QueuePing = new DataQueue(codIob, "QueuePing", false, redisMan);
|
||||
}
|
||||
// imposto contatori blink a zero...
|
||||
i_counters = new int[32];
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
bInOn = IOBConfFull.Special.PingConf.B_PowerOn;
|
||||
vetoCheckSec = IOBConfFull.Special.PingConf.VetoCheckSec;
|
||||
// fix coda ping
|
||||
PingQueue = new DataQueue(IOBConfFull.General.FilenameIOB, "PingQueue", false, redisMan);
|
||||
QueuePing = new DataQueue(IOBConfFull.General.FilenameIOB, "QueuePing", false, redisMan);
|
||||
lgDebug($"L'adapter effettuera' PING di controllo all'indirizzo {IOBConfFull.Device.Connect.IpAddr} per forzare stato poweroff dopo {PoweroffTimeoutSec} sec");
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
sw.Start();
|
||||
byte[] MemBlock = new byte[2];
|
||||
// faccio comunque ping se non ne ho collezionati a sufficienza...
|
||||
if (PingQueue.Count < maxQueuePing)
|
||||
if (QueuePing.Count < maxQueuePing)
|
||||
{
|
||||
// in primis salvo data ping comunque...
|
||||
lastPING = DateTime.Now;
|
||||
@@ -159,7 +159,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
if (!connectionOk)
|
||||
{
|
||||
//// resetto coda...
|
||||
//PingQueue = new DataQueue("000", "PingQueue", false);
|
||||
//QueuePing = new DataQueue("000", "QueuePing", false);
|
||||
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||
if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
|
||||
{
|
||||
@@ -169,7 +169,7 @@ namespace IOB_WIN_FORM.Iob
|
||||
}
|
||||
lgDebug("PING: tryConnect step 04");
|
||||
|
||||
lgDebug("PING: Reset PingQueue");
|
||||
lgDebug("PING: Reset QueuePing");
|
||||
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
@@ -228,14 +228,14 @@ namespace IOB_WIN_FORM.Iob
|
||||
if (B_input == 0 && pingOk)
|
||||
{
|
||||
B_input = 1;
|
||||
PingQueue = new DataQueue(IOBConfFull.General.FilenameIOB, "PingQueue", false, redisMan);
|
||||
lgTrace($"PingQueue resetted on addTest");
|
||||
QueuePing = new DataQueue(IOBConfFull.General.FilenameIOB, "QueuePing", false, redisMan);
|
||||
lgTrace($"QueuePing resetted on addTest");
|
||||
}
|
||||
PingQueue.Enqueue($"{score}");
|
||||
while (PingQueue.Count > maxQueuePing)
|
||||
QueuePing.Enqueue($"{score}");
|
||||
while (QueuePing.Count > maxQueuePing)
|
||||
{
|
||||
string res = "";
|
||||
PingQueue.TryDequeue(out res);
|
||||
QueuePing.TryDequeue(out res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,10 +248,10 @@ namespace IOB_WIN_FORM.Iob
|
||||
protected bool pingStatusOk()
|
||||
{
|
||||
bool answ = true;
|
||||
long numVal = PingQueue.Count;
|
||||
long numVal = QueuePing.Count;
|
||||
if (numVal > maxQueuePing / 2)
|
||||
{
|
||||
var listaValori = PingQueue.ToList();
|
||||
var listaValori = QueuePing.ToList();
|
||||
long numOk = listaValori.Where(x => x == "1").Count();
|
||||
long numKo = numVal - numOk;
|
||||
answ = numOk >= numKo;
|
||||
|
||||
@@ -20,4 +20,3 @@ CLI_INST=SteamWareSim
|
||||
STARTLIST=FTP_SONATEST
|
||||
|
||||
MAXCNC=10
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ namespace IOB_WIN_FTP.Iob
|
||||
if (!connectionOk)
|
||||
{
|
||||
//// resetto coda...
|
||||
//PingQueue = new DataQueue("000", "PingQueue", false);
|
||||
//QueuePing = new DataQueue("000", "QueuePing", false);
|
||||
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||
if (DateTime.Now.Subtract(lastPING).TotalSeconds > vetoPingSec)
|
||||
{
|
||||
@@ -462,7 +462,7 @@ namespace IOB_WIN_FTP.Iob
|
||||
}
|
||||
lgDebug("FTP: tryConnect step 04");
|
||||
|
||||
lgDebug("FTP: Reset PingQueue");
|
||||
lgDebug("FTP: Reset QueuePing");
|
||||
|
||||
bool pingOK = testPingMachine == IPStatus.Success;
|
||||
addTest(pingOK);
|
||||
@@ -638,14 +638,14 @@ namespace IOB_WIN_FTP.Iob
|
||||
if (B_input == 0 && pingOk)
|
||||
{
|
||||
B_input = 1;
|
||||
PingQueue = new DataQueue(IOBConfFull.General.FilenameIOB, "PingQueue", false, redisMan);
|
||||
lgTrace($"PingQueue resetted on addTest");
|
||||
QueuePing = new DataQueue(IOBConfFull.General.FilenameIOB, "QueuePing", false, redisMan);
|
||||
lgTrace($"QueuePing resetted on addTest");
|
||||
}
|
||||
PingQueue.Enqueue($"{score}");
|
||||
while (PingQueue.Count > maxQueuePing)
|
||||
QueuePing.Enqueue($"{score}");
|
||||
while (QueuePing.Count > maxQueuePing)
|
||||
{
|
||||
string res = "";
|
||||
PingQueue.TryDequeue(out res);
|
||||
QueuePing.TryDequeue(out res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,10 +935,10 @@ namespace IOB_WIN_FTP.Iob
|
||||
private bool pingStatusOk()
|
||||
{
|
||||
bool answ = false;
|
||||
long numVal = PingQueue.Count;
|
||||
long numVal = QueuePing.Count;
|
||||
if (numVal > maxQueuePing / 2)
|
||||
{
|
||||
var listaValori = PingQueue.ToList();
|
||||
var listaValori = QueuePing.ToList();
|
||||
long numOk = listaValori.Where(x => x == "1").Count();
|
||||
long numKo = numVal - numOk;
|
||||
answ = numOk >= numKo;
|
||||
|
||||
@@ -25,4 +25,3 @@ STARTLIST=SIMUL_01
|
||||
;STARTLIST=3024
|
||||
|
||||
MAXCNC=10
|
||||
|
||||
|
||||
@@ -32,4 +32,3 @@ CLI_INST=SteamWareSim
|
||||
STARTLIST=1042
|
||||
|
||||
MAXCNC=10
|
||||
|
||||
|
||||
@@ -19,4 +19,3 @@ STARTLIST=FTP-PING
|
||||
;STARTLIST=3024-PING
|
||||
|
||||
MAXCNC=10
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ namespace IOB_WIN_SHELLY.Iob
|
||||
if (!connectionOk)
|
||||
{
|
||||
//// resetto coda...
|
||||
//PingQueue = new DataQueue("000", "PingQueue", false);
|
||||
//QueuePing = new DataQueue("000", "QueuePing", false);
|
||||
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||
if (DateTime.Now.Subtract(lastPING).TotalSeconds > vetoPingSec)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ namespace IOB_WIN_SHELLY.Iob
|
||||
}
|
||||
lgDebug("Shelly: tryConnect step 04");
|
||||
|
||||
lgDebug("Shelly: Reset PingQueue");
|
||||
lgDebug("Shelly: Reset QueuePing");
|
||||
|
||||
bool pingOK = testPingMachine == IPStatus.Success;
|
||||
addTest(pingOK);
|
||||
@@ -257,14 +257,14 @@ namespace IOB_WIN_SHELLY.Iob
|
||||
if (B_input == 0 && pingOk)
|
||||
{
|
||||
B_input = 1;
|
||||
PingQueue = new DataQueue(IOBConfFull.General.FilenameIOB, "PingQueue", false, redisMan);
|
||||
lgTrace($"PingQueue resetted on addTest");
|
||||
QueuePing = new DataQueue(IOBConfFull.General.FilenameIOB, "QueuePing", false, redisMan);
|
||||
lgTrace($"QueuePing resetted on addTest");
|
||||
}
|
||||
PingQueue.Enqueue($"{score}");
|
||||
while (PingQueue.Count > maxQueuePing)
|
||||
QueuePing.Enqueue($"{score}");
|
||||
while (QueuePing.Count > maxQueuePing)
|
||||
{
|
||||
string res = "";
|
||||
PingQueue.TryDequeue(out res);
|
||||
QueuePing.TryDequeue(out res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,10 +277,10 @@ namespace IOB_WIN_SHELLY.Iob
|
||||
private bool pingStatusOk()
|
||||
{
|
||||
bool answ = false;
|
||||
long numVal = PingQueue.Count;
|
||||
long numVal = QueuePing.Count;
|
||||
if (numVal > maxQueuePing / 2)
|
||||
{
|
||||
var listaValori = PingQueue.ToList();
|
||||
var listaValori = QueuePing.ToList();
|
||||
long numOk = listaValori.Where(x => x == "1").Count();
|
||||
long numKo = numVal - numOk;
|
||||
answ = numOk >= numKo;
|
||||
|
||||
@@ -23,4 +23,3 @@ STARTLIST=3018
|
||||
;STARTLIST=3019
|
||||
|
||||
MAXCNC=10
|
||||
|
||||
|
||||
Reference in New Issue
Block a user