Update x test MTC con filtraggio dati TROPPO aggressivo
This commit is contained in:
@@ -58,6 +58,7 @@ PZCOUNT_MODE=STD.DM20.2
|
||||
DISABLE_PZCOUNT=TRUE
|
||||
ENABLE_DYN_DATA=FALSE
|
||||
FORCE_DYN_DATA=TRUE
|
||||
ENABLE_DATA_FILTER=FALSE
|
||||
|
||||
; conf parametri memoria READ/WRITE
|
||||
PARAM_CONF=IMI_50.json
|
||||
|
||||
+65
-5
@@ -26,6 +26,10 @@ namespace IOB_WIN
|
||||
/// </summary>
|
||||
protected MTConnectClient MTC_ref;
|
||||
/// <summary>
|
||||
/// Gestione filtraggio dati
|
||||
/// </summary>
|
||||
protected bool enableDataFilter = false;
|
||||
/// <summary>
|
||||
/// URL x salvataggio elenco dataItems MTC
|
||||
/// </summary>
|
||||
protected string urlSaveDataItems
|
||||
@@ -56,6 +60,11 @@ namespace IOB_WIN
|
||||
{
|
||||
// gestione invio ritardato contapezzi
|
||||
pzCountDelay = utils.CRI("pzCountDelay");
|
||||
// gestione data filtering...
|
||||
if (!string.IsNullOrEmpty(getOptPar("ENABLE_DATA_FILTER")))
|
||||
{
|
||||
bool.TryParse(getOptPar("ENABLE_DATA_FILTER"), out enableDataFilter);
|
||||
}
|
||||
lastPzCountSend = DateTime.Now;
|
||||
lastWarnODL = DateTime.Now;
|
||||
}
|
||||
@@ -233,10 +242,18 @@ namespace IOB_WIN
|
||||
break;
|
||||
case MTConnect.DataItemCategory.SAMPLE:
|
||||
uuid = $"S_{dataItem.Id}";
|
||||
threshDBand = 1;
|
||||
if (dataItem.Id.EndsWith("PosAct") || dataItem.Id.EndsWith("PosTgt"))
|
||||
// SOLOS E è abilitato il datafiltering...
|
||||
if (enableDataFilter)
|
||||
{
|
||||
threshDBand = 5;
|
||||
threshDBand = 1;
|
||||
if (dataItem.Id.EndsWith("PosAct") || dataItem.Id.EndsWith("PosTgt"))
|
||||
{
|
||||
threshDBand = 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
threshDBand = 0;
|
||||
}
|
||||
dSamplePeriod = 60;
|
||||
break;
|
||||
@@ -321,9 +338,14 @@ namespace IOB_WIN
|
||||
/// <returns></returns>
|
||||
protected bool checkSaveItem(MTConnectStreams.DataItem newValue)
|
||||
{
|
||||
bool answ = false;
|
||||
bool answ = !enableDataFilter;
|
||||
|
||||
if (newValue != null)
|
||||
{
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lgInfo($"Richiesta checkSaveItem per {newValue} | id: {newValue.DataItemId} | CDATA: {newValue.CDATA}");
|
||||
}
|
||||
// verifico in memoria se ho l'oggetto condition ed il suo valore..
|
||||
if (dataItemMem.ContainsKey(newValue.DataItemId))
|
||||
{
|
||||
@@ -333,6 +355,10 @@ namespace IOB_WIN
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError("Attenzione: checkSaveItem con newValue null!");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -342,11 +368,15 @@ namespace IOB_WIN
|
||||
/// <returns></returns>
|
||||
protected bool checkSaveSample(MTConnectStreams.Sample newValue)
|
||||
{
|
||||
bool answ = false;
|
||||
bool answ = !enableDataFilter;
|
||||
double oldVal = 0;
|
||||
double newVal = 0;
|
||||
if (newValue != null)
|
||||
{
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lgInfo($"Richiesta checkSaveSample per {newValue} | id: {newValue.DataItemId} | CDATA: {newValue.CDATA}");
|
||||
}
|
||||
// verifico in memoria se ho l'oggetto condition ed il suo valore..
|
||||
if (dataItemMem.ContainsKey(newValue.DataItemId))
|
||||
{
|
||||
@@ -365,6 +395,10 @@ namespace IOB_WIN
|
||||
// controllo SE ho DeadBand...
|
||||
if (dataItemMem[newValue.DataItemId].thresholdDeadBand > 0)
|
||||
{
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lgInfo($"Test deadband: oldVal: {oldVal} | newVal: {newVal}");
|
||||
}
|
||||
// recupero i valori e testo DeadBand...
|
||||
double.TryParse(dataItemMem[newValue.DataItemId].value.Replace(".", ","), out oldVal);
|
||||
double.TryParse(newValue.CDATA.Replace(".", ","), out newVal);
|
||||
@@ -385,6 +419,10 @@ namespace IOB_WIN
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError("Attenzione: checkSaveItem con newValue null!");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -457,6 +495,13 @@ namespace IOB_WIN
|
||||
{
|
||||
accodaFLog(sVal, qEncodeFLog(locTStamp, descr, dataItem.CDATA));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lgInfo($"NON ACCODATO sample poiché verifica variazioen ha dato esito negativo");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -752,6 +797,8 @@ namespace IOB_WIN
|
||||
string currExe = "";
|
||||
string currRun = "";
|
||||
string currUnOpStatus = "";
|
||||
string currGettoOn = "";
|
||||
string currAbilAbras = "";
|
||||
try
|
||||
{
|
||||
var exeMode = dataItemMem["Path_01_EXE_MODE"];
|
||||
@@ -840,6 +887,19 @@ namespace IOB_WIN
|
||||
lgInfo(string.Format("Trasformazione B_input: {0}", B_input));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica un DataItem e se il valore corrisponde a quello indicato come "true value" restituisce true
|
||||
/// </summary>
|
||||
/// <param name="itemName"></param>
|
||||
/// <param name="trueVal"></param>
|
||||
/// <returns></returns>
|
||||
protected bool checkDataItem(string itemName, string trueVal)
|
||||
{
|
||||
bool answ = false;
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupero dati dinamici...
|
||||
/// </summary>
|
||||
|
||||
Vendored
+1
-1
@@ -16,7 +16,7 @@ pipeline {
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=550']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=551']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.6.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'MAPO-IOB-WIN'
|
||||
|
||||
Reference in New Issue
Block a user