update gesitone valori default da cont OPT_PAR x WatchDog e maxNumErr

This commit is contained in:
Samuele Locatelli
2022-03-16 09:48:53 +01:00
parent 4b08fff92c
commit 5f5134b3d4
+32 -5
View File
@@ -62,10 +62,20 @@ namespace IOB_WIN_NEXT
protected int B_previous;
/// <summary>
/// NUm errori check alive
/// Num errori check alive
/// </summary>
protected int currAliveErrors = 0;
/// <summary>
/// Variabile numero errori vari (in lettura) --> se supera soglia maxErroriCheck --> disconnette
/// </summary>
protected int numErroriCheck = 0;
/// <summary>
/// Soglia massima errori priam di disconnesisone automatica
/// </summary>
protected int maxErroriCheck = 100;
/// <summary>
/// Dizionario valori impostati x produzione
/// </summary>
@@ -81,6 +91,11 @@ namespace IOB_WIN_NEXT
/// </summary>
protected int currSendErrors = 0;
/// <summary>
/// Periodo wathdog di default (2 sec se non specificato)
/// </summary>
protected int watchDogPeriod = 2;
/// <summary>
/// Array dei contatori x segnali blinking
/// </summary>
@@ -1694,10 +1709,6 @@ namespace IOB_WIN_NEXT
// mostro update...
string newString = string.Format("{0:X}", B_input);
currDispData.newInData = newString;
#if false
// salvo coda debug...
QueueDebug.Enqueue(B_input);
#endif
}
/// <summary>
@@ -1781,6 +1792,22 @@ namespace IOB_WIN_NEXT
int.TryParse(s_maxPingRetry, out numRetry);
maxPingRetry = numRetry;
}
string s_maxErrCheck = getOptPar("MAX_ERR_CHECK");
if (!string.IsNullOrEmpty(s_maxErrCheck))
{
int numErr = 50;
int.TryParse(s_maxErrCheck, out numErr);
maxErroriCheck = numErr;
}
string s_watchDogPer = getOptPar("WATCHDOG_PERIOD");
if (!string.IsNullOrEmpty(s_watchDogPer))
{
int numPer = 3;
int.TryParse(s_watchDogPer, out numPer);
watchDogPeriod = numPer;
}
}
/// <summary>