Merge branch 'release/OpcUaRamaRed13'
This commit is contained in:
@@ -487,22 +487,24 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
bool hasVetoLKV = false;
|
||||
if (MonIt != null)
|
||||
{
|
||||
string uuid = opcUaParams.UseFullId ? $"{MonIt.StartNodeId.Identifier}" : $"{MonIt.DisplayName}";
|
||||
if (!string.IsNullOrEmpty(NotifyValue))
|
||||
{
|
||||
string sVal = "";
|
||||
string descr = "";
|
||||
DateTime locTStamp = DateTime.Now;
|
||||
descr = itemTranslation("OPC", MonIt.DisplayName);
|
||||
|
||||
descr = itemTranslation("OPC", uuid);
|
||||
sVal = $"Change 01: {locTStamp.ToString()} | descr: {descr} | Id: {MonIt.StartNodeId} | Val: {NotifyValue}";
|
||||
lgTrace(sVal);
|
||||
|
||||
// verifico se salvare variazione (in LUT locale)
|
||||
changed = checkSaveValue(MonIt, NotifyValue, true);
|
||||
// cerco se non sia un dato filtrato x invio FLUXLOG in toto...
|
||||
hasVetoFL = opcUaParams.fluxLogVeto.Contains(MonIt.DisplayName);
|
||||
hasVetoFL = opcUaParams.fluxLogVeto.Contains(uuid);
|
||||
if (hasVetoFL)
|
||||
{
|
||||
lgTrace($"NON ACCODATO sample per {MonIt.DisplayName} - trovato VETO in fluxLogVeto", false);
|
||||
lgTrace($"NON ACCODATO sample per {uuid} - trovato VETO in fluxLogVeto", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -526,14 +528,14 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
}
|
||||
else
|
||||
{
|
||||
lgTrace($"NON ACCODATO sample per {MonIt.DisplayName} - verifica variazione ha dato esito negativo", false);
|
||||
lgTrace($"NON ACCODATO sample per {uuid} - verifica variazione ha dato esito negativo", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError($"checkAndSend ERROR | MonIt: {MonIt.DisplayName} | NotifyValue Null!!!");
|
||||
lgError($"checkAndSend ERROR | MonIt: {uuid} | NotifyValue Null!!!");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -554,6 +556,7 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
bool changed = false;
|
||||
if (MonIt != null)
|
||||
{
|
||||
string uuid = opcUaParams.UseFullId ? $"{MonIt.StartNodeId.Identifier}" : $"{MonIt.DisplayName}";
|
||||
if (NotifyValue != null && NotifyValue.Length > 0)
|
||||
{
|
||||
// versione base: il valore è la stringa composta da TUTTI i valori in BYTE
|
||||
@@ -568,17 +571,17 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
string sVal = "";
|
||||
string descr = "";
|
||||
DateTime locTStamp = DateTime.Now;
|
||||
descr = itemTranslation("OPC", MonIt.DisplayName);
|
||||
descr = itemTranslation("OPC", uuid);
|
||||
sVal = $"Change 02: {locTStamp.ToString()} | descr: {descr} | Id: {MonIt.StartNodeId} | Val: {currVal}";
|
||||
lgDebug(sVal);
|
||||
|
||||
// verifico se salvare
|
||||
changed = checkSaveValue(MonIt, currVal, true) || forceSend;
|
||||
// cerco se non sia un dato filtrato in FLUXLOG...
|
||||
bool isFiltered = opcUaParams.fluxLogVeto.Contains(MonIt.DisplayName);
|
||||
bool isFiltered = opcUaParams.fluxLogVeto.Contains(uuid);
|
||||
if (isFiltered)
|
||||
{
|
||||
lgTrace($"NON ACCODATO sample per {MonIt.DisplayName} - trovato VETO in fluxLogVeto", false);
|
||||
lgTrace($"NON ACCODATO sample per {uuid} - trovato VETO in fluxLogVeto", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -588,13 +591,13 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
}
|
||||
else
|
||||
{
|
||||
lgTrace($"NON ACCODATO sample per {MonIt.DisplayName} - verifica variazione ha dato esito negativo", false);
|
||||
lgTrace($"NON ACCODATO sample per {uuid} - verifica variazione ha dato esito negativo", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError($"checkAndSend ERROR | MonIt: {MonIt.DisplayName} | NotifyValue Null!!!");
|
||||
lgError($"checkAndSend ERROR | MonIt: {uuid} | NotifyValue Null!!!");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -958,11 +961,11 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
double newVal = 0;
|
||||
if (dataItem != null)
|
||||
{
|
||||
string uuid = opcUaParams.UseFullId ? $"{dataItem.StartNodeId.Identifier}" : $"{dataItem.DisplayName}";
|
||||
if (!string.IsNullOrEmpty(NotifyValue) && !NotifyValue.Contains("null"))
|
||||
{
|
||||
lgTrace($"Richiesta checkSaveValue per {dataItem.DisplayName} | id: {dataItem.StartNodeId} | Valore: {NotifyValue}");
|
||||
// verifico in memoria se ho l'oggetto condition ed il suo valore..
|
||||
string uuid = $"{dataItem.DisplayName}";
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (dataItemMem.ContainsKey(uuid))
|
||||
{
|
||||
@@ -999,11 +1002,11 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
}
|
||||
if (answ)
|
||||
{
|
||||
lgDebug($"Test deadband | DisplayName: {dataItem.DisplayName} | oldVal: {oldVal} | newVal: {newVal} | dBand: {dataItemMem[uuid].thresholdDeadBand}");
|
||||
lgDebug($"Test deadband | uuid: {uuid} | DisplayName: {dataItem.DisplayName} | oldVal: {oldVal} | newVal: {newVal} | dBand: {dataItemMem[uuid].thresholdDeadBand}");
|
||||
}
|
||||
else
|
||||
{
|
||||
lgTrace($"Test deadband | DisplayName: {dataItem.DisplayName} | oldVal: {oldVal} | newVal: {newVal}");
|
||||
lgTrace($"Test deadband | uuid: {uuid} | DisplayName: {dataItem.DisplayName} | oldVal: {oldVal} | newVal: {newVal}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1018,7 +1021,7 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
else
|
||||
{
|
||||
// registro non trovato da aggiungere...
|
||||
lgInfo($"DataItem non trovato in checkSaveValue: {dataItem.DisplayName}");
|
||||
lgInfo($"DataItem non trovato in checkSaveValue: {uuid}");
|
||||
// provo a creare oggetto in memoria...
|
||||
try
|
||||
{
|
||||
@@ -1650,7 +1653,7 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
{
|
||||
OpcUaDataItemExt currDataItem;
|
||||
// calcolo parametri secondo conf UniqueID
|
||||
uuid = opcUaParams.UseFullId ? $"{dataItem.StartNodeId.Identifier}": $"{dataItem.DisplayName}";
|
||||
uuid = opcUaParams.UseFullId ? $"{dataItem.StartNodeId.Identifier}" : $"{dataItem.DisplayName}";
|
||||
|
||||
// SOLO SE è abilitato il datafiltering...
|
||||
if (enableDataFilter)
|
||||
|
||||
@@ -575,13 +575,14 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
DateTime locTStamp = DateTime.Now;
|
||||
string sVal = "";
|
||||
string descr = "";
|
||||
descr = itemTranslation("OPC", MonIt.DisplayName);
|
||||
string uuid = opcUaParams.UseFullId ? $"{MonIt.StartNodeId.Identifier}" : $"{MonIt.DisplayName}";
|
||||
descr = itemTranslation("OPC", uuid);
|
||||
sVal = $"Change: {locTStamp.ToString()} | descr: {descr} | Id: {MonIt.StartNodeId} | Val: {NotifyValue}";
|
||||
lgDebug($"TSP | {sVal}");
|
||||
|
||||
changed = checkSaveValue(MonIt, NotifyValue, false);
|
||||
// cerco se non sia un dato filtrato in FLUXLOG...
|
||||
bool isFiltered = opcUaParams.fluxLogVeto.Contains(MonIt.DisplayName);
|
||||
bool isFiltered = opcUaParams.fluxLogVeto.Contains(uuid);
|
||||
if (isFiltered)
|
||||
{
|
||||
lgTrace($"TSP | NON ACCODATO sample per {MonIt.DisplayName} - trovato VETO in fluxLogVeto", false);
|
||||
@@ -594,7 +595,7 @@ namespace IOB_WIN_NEXT.IobOpc
|
||||
}
|
||||
else
|
||||
{
|
||||
lgTrace($"TSP | NON ACCODATO sample per {MonIt.DisplayName} - verifica variazione ha dato esito negativo", false);
|
||||
lgTrace($"TSP | NON ACCODATO sample per {uuid} - verifica variazione ha dato esito negativo", false);
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
|
||||
@@ -910,7 +910,7 @@ namespace IOB_WIN_NEXT
|
||||
if ($"{notification.Value}".Contains("null"))
|
||||
{
|
||||
currNullReceiv++;
|
||||
lgTrace($"NUll data read | Variable: {monitoredItem.DisplayName} | Value: {notification.Value}");
|
||||
lgTrace($"NUll data read | Variable: {monitoredItem.StartNodeId.Identifier} | Value: {notification.Value}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -922,7 +922,7 @@ namespace IOB_WIN_NEXT
|
||||
eh_MonItChange(this, new opcUaMonitItemChange(monitoredItem, notification));
|
||||
}
|
||||
}
|
||||
lgTrace($"Notification Received | Variable: {monitoredItem.DisplayName} | Value: {notification.Value}");
|
||||
lgTrace($"Notification Received | Variable: {monitoredItem.StartNodeId.Identifier} | Value: {notification.Value}");
|
||||
// se ho ricevuto troppi nul --> disconnetto
|
||||
if (currNullReceiv > maxNullAllowed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user