Merge branch 'release/TestMecart04'

This commit is contained in:
Samuele Locatelli
2021-12-17 09:30:34 +01:00
6 changed files with 36 additions and 31 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
"keyPartId": "",
"keyProgName": "PartName(0)",
"keyRunMode": "",
"pingAsPowerOn": false,
"pingAsPowerOn": true,
"Identity": {
"UserName": "CUSTOMER",
"Passwd": "BLM"
+1 -1
View File
@@ -3634,7 +3634,7 @@ namespace IOB_WIN_NEXT
if (utils.CRB("enableContapezzi"))
{
// rilettura contapezzi da server...
lgInfo("Ciclo VLF: pzCntReload(true)");
lgTrace("Ciclo VLF: pzCntReload(true)");
if (!isMulti)
{
pzCntReload(true);
+4 -5
View File
@@ -237,13 +237,12 @@ namespace IOB_WIN_NEXT
// verifico se salvare
bool changed = checkSaveItem(dataItem);
// cerco se non sia un dato filtrato in FLUXLOG...
// cerco se non sia un dato filtrato in FLUXLOG...
bool isFiltered = mtcParams.fluxLogVeto.Contains(dataItem.DataItemId);
if (isFiltered)
{
if (isVerboseLog)
{
lgInfo($"NON ACCODATO sample per {dataItem.DataItemId} poiché trovato VETO in fluxLogVeto", false);
lgTrace($"NON ACCODATO sample per {dataItem.DataItemId} - trovato VETO in fluxLogVeto", false);
}
}
else
@@ -283,7 +282,7 @@ namespace IOB_WIN_NEXT
{
if (isVerboseLog)
{
lgInfo($"NON ACCODATO sample per {dataItem.DataItemId} poiché trovato VETO in fluxLogVeto", false);
lgTrace($"NON ACCODATO sample per {dataItem.DataItemId} - trovato VETO in fluxLogVeto", false);
}
}
else
@@ -296,7 +295,7 @@ namespace IOB_WIN_NEXT
{
if (isVerboseLog)
{
lgInfo($"NON ACCODATO sample per {dataItem.DataItemId} poiché verifica variazione SAMPLE ha dato esito negativo", false);
lgTrace($"NON ACCODATO sample per {dataItem.DataItemId} - verifica variazione SAMPLE ha dato esito negativo", false);
}
}
}
@@ -346,7 +345,7 @@ namespace IOB_WIN_NEXT
// variabili RUN...
string currRun = getDataItemValue(mtcParams.keyRunMode);
// controllo RUN MODE preliminare... CABLATO poiché è GENERALE x MTC
// controllo RUN MODE preliminare... CABLATO - è GENERALE x MTC
if (currRun == "AUTOMATIC" || currRun == "SEMI_AUTO" || currRun == "SEMI_AUTOMATIC")
{
int numCond = mtcParams.condWork.Count;
+3 -3
View File
@@ -273,7 +273,7 @@ namespace IOB_WIN_NEXT
bool isFiltered = opcUaParams.fluxLogVeto.Contains(MonIt.DisplayName);
if (isFiltered)
{
lgInfo($"NON ACCODATO sample per {MonIt.DisplayName} poiché trovato VETO in fluxLogVeto", false);
lgTrace($"NON ACCODATO sample per {MonIt.DisplayName} - trovato VETO in fluxLogVeto", false);
}
else
{
@@ -283,7 +283,7 @@ namespace IOB_WIN_NEXT
}
else
{
lgInfo($"NON ACCODATO sample per {MonIt.DisplayName} poiché verifica variazione ha dato esito negativo", false);
lgTrace($"NON ACCODATO sample per {MonIt.DisplayName} - verifica variazione ha dato esito negativo", false);
}
}
}
@@ -734,7 +734,7 @@ namespace IOB_WIN_NEXT
int vFactor = 2;
if (vetoCheckStatus < adesso)
{
lgDebug($"Stato variabili checkPing: {testPingMachine}");
lgTrace($"Stato variabili checkPing: {testPingMachine}");
// imposto veto per vetoSeconds...
vetoCheckStatus = adesso.AddSeconds(vetoSeconds * vFactor);
}
+5 -5
View File
@@ -194,10 +194,10 @@ namespace IOB_WIN_NEXT
// faccio preliminarmente upsertKey...
upsertKey(currMem.name, currMem.value);
serObj = JsonConvert.SerializeObject(item);
lgInfo($"Inizio processing plcWriteParams per {currMem.name} | valore richiesto {currMem.value}");
lgInfo($"---------------{Environment.NewLine}UPDATED PARAM:{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
lgDebug($"Inizio processing plcWriteParams per {currMem.name} | valore richiesto {currMem.value}");
lgDebug($"---------------{Environment.NewLine}UPDATED PARAM:{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
serObj = JsonConvert.SerializeObject(currMem);
lgInfo($"---------------{Environment.NewLine}MEMORY CONTENT:{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
lgDebug($"---------------{Environment.NewLine}MEMORY CONTENT:{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
switch (currMem.tipoMem)
{
@@ -252,12 +252,12 @@ namespace IOB_WIN_NEXT
}
else
{
lgInfo($"Errore: memAddrWrite vuoto!");
lgError($"Errore: memAddrWrite vuoto!");
}
}
else
{
lgInfo($"Errore uid non trovato in area write memory: {item.uid}, ci sono {memMap.mMapWrite.Count} in area write");
lgError($"Errore uid non trovato in area write memory: {item.uid}, ci sono {memMap.mMapWrite.Count} in area write");
}
}
catch (Exception exc)
+22 -16
View File
@@ -185,7 +185,7 @@ namespace IOB_WIN_NEXT
{
eh_MonItChange(this, new opcUaMonitItemChange(monitoredItem, notification));
}
lgDebug($"Notification Received | Variable: {monitoredItem.DisplayName} | Value: {notification.Value}");
lgTrace($"Notification Received | Variable: {monitoredItem.DisplayName} | Value: {notification.Value}");
}
catch (Exception ex)
{
@@ -224,10 +224,16 @@ namespace IOB_WIN_NEXT
protected void lgDebug(string message)
{
lg.Factory.Configuration.Variables["codIOB"] = currIob;
//if (isLogVerbose)
//{
lg.Info(message);
//}
}
/// <summary>
/// Effettua logging TRACE corretto impostanto anche la variabile IOB prima di scrivere...
/// </summary>
/// <param name="message"></param>
protected void lgTrace(string message)
{
lg.Factory.Configuration.Variables["codIOB"] = currIob;
lg.Trace(message);
}
#endregion Protected Methods
@@ -261,15 +267,15 @@ namespace IOB_WIN_NEXT
NodeId nodeToBrowse = new NodeId(startNodeVal, startNodeNS);
// Call Browse service
lgInfo($"Browsing {nodeToBrowse} node...");
lgTrace($"Browsing {nodeToBrowse} node...");
ReferenceDescriptionCollection browseResults = browser.Browse(nodeToBrowse);
// Display the results
lgInfo($"Browse returned {browseResults.Count} results:");
lgTrace($"Browse returned {browseResults.Count} results:");
foreach (ReferenceDescription result in browseResults)
{
lgDebug($" NodeId = {result.NodeId}, DisplayName = {result.DisplayName.Text}, NodeClass = {result.NodeClass}, Others: {result.BinaryEncodingId} | {result.BrowseName}");
lgTrace($" NodeId = {result.NodeId}, DisplayName = {result.DisplayName.Text}, NodeClass = {result.NodeClass}, Others: {result.BinaryEncodingId} | {result.BrowseName}");
// se NON fa parte dell'elenco dei VETO di filterItems...
if (!vetoBrowse.Contains($"{result.NodeId}"))
{
@@ -318,23 +324,23 @@ namespace IOB_WIN_NEXT
NodeId nodeToBrowse = new NodeId(browsePath);
// Call Browse service
lgInfo($"Browsing {nodeToBrowse} node...");
lgTrace($"Browsing {nodeToBrowse} node...");
ReferenceDescriptionCollection browseResults = browser.Browse(nodeToBrowse);
// Display the results
lgInfo($"Browse returned {browseResults.Count} results:");
lgTrace($"Browse returned {browseResults.Count} results:");
foreach (ReferenceDescription result in browseResults)
{
// se veto --> loggo veto
if (vetoBrowse.Contains($"{result.NodeId}"))
{
lgDebug($"| FILTERED --> NodeId = {result.NodeId}, DisplayName = {result.DisplayName.Text}, NodeClass = {result.NodeClass}, Others: {result.BinaryEncodingId} | {result.BrowseName}");
lgTrace($"| FILTERED --> NodeId = {result.NodeId}, DisplayName = {result.DisplayName.Text}, NodeClass = {result.NodeClass}, Others: {result.BinaryEncodingId} | {result.BrowseName}");
}
// se NON fa parte dell'elenco dei VETO di filterItems...
else
{
lgDebug($" NodeId = {result.NodeId}, DisplayName = {result.DisplayName.Text}, NodeClass = {result.NodeClass}, Others: {result.BinaryEncodingId} | {result.BrowseName}");
lgTrace($" NodeId = {result.NodeId}, DisplayName = {result.DisplayName.Text}, NodeClass = {result.NodeClass}, Others: {result.BinaryEncodingId} | {result.BrowseName}");
// se mancasse aggiungo...
if (!nodeIdNameList.ContainsKey($"{result.NodeId}"))
{
@@ -449,7 +455,7 @@ namespace IOB_WIN_NEXT
catch (Exception ex)
{
// Log Error
lgInfo($"Create Session Error : {ex.Message}");
lgError($"Create Session Error : {ex.Message}");
return false;
}
}
@@ -474,7 +480,7 @@ namespace IOB_WIN_NEXT
}
else
{
lgInfo("Session not created!");
lgError("Session not created!");
}
}
catch (Exception ex)
@@ -603,7 +609,7 @@ namespace IOB_WIN_NEXT
// Display the results.
foreach (DataValue result in resultsValues)
{
lgDebug($"Read Value = {result.Value} , StatusCode = {result.StatusCode}");
lgTrace($"Read Value = {result.Value} , StatusCode = {result.StatusCode}");
}
#endregion Read a node by calling the Read Service
@@ -611,10 +617,10 @@ namespace IOB_WIN_NEXT
#region Read the Value attribute of a node by calling the Session.ReadValue method
// Read Server NamespaceArray
lgInfo("Reading Value of NamespaceArray node...");
lgTrace("Reading Value of NamespaceArray node...");
DataValue namespaceArray = m_session.ReadValue(Variables.Server_NamespaceArray);
// Display the result
lgInfo($"NamespaceArray Value = {namespaceArray}");
lgTrace($"NamespaceArray Value = {namespaceArray}");
#endregion Read the Value attribute of a node by calling the Session.ReadValue method
}