- Update gestione area MemG che per conseguenza genera FluxLog ND
This commit is contained in:
Samuele Locatelli
2025-03-18 17:16:00 +01:00
parent 723bfeb22c
commit a4d439d1c4
5 changed files with 103 additions and 28 deletions
+1
View File
@@ -40,6 +40,7 @@ BIT6=currPrgName|%O5000/Y31.6
BIT7=X8.4
AREAD_START=0
AREAD_SIZE=0
AREAG_START=0
AREAG_SIZE=48
AREAR_START=0
AREAR_SIZE=0
+2 -1
View File
@@ -25,7 +25,8 @@ CLI_INST=SteamWareSim
;STARTLIST=EV112
;STARTLIST=3021
;STARTLIST=3004
STARTLIST=3002
;STARTLIST=3002
STARTLIST=3025
MAXCNC=10
+3 -1
View File
@@ -168,7 +168,9 @@
<None Include="DATA\CONF\3021.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\3025.ini" />
<None Include="DATA\CONF\3025.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\3027.ini" />
<None Include="DATA\CONF\3028.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
+72 -19
View File
@@ -2229,16 +2229,34 @@ namespace IOB_WIN_FORM.Iob
// per ogni valore del dizionario mostro ed accodo!
foreach (var item in currAlarms)
{
sVal = string.Format("[CNC_ALARM]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
// verifico NON sia un ND...
if (item.Key == "ND")
{
// log anomalia...
lgTrace($"Errore in predisposizione FL Allarmi CNC: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");
}
else
{
sVal = string.Format("[CNC_ALARM]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
}
}
}
// accodo ALTRI allarmi NON CNC...
foreach (var item in currAlarms.Where(X => X.Key != "CNC_ALARM"))
{
sVal = $"{item.Key} | {item.Value}";
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
// verifico NON sia un ND...
if (item.Key == "ND")
{
// log anomalia...
lgTrace($"Errore in predisposizione FL Allarmi NON CNC: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");
}
else
{
sVal = $"{item.Key} | {item.Value}";
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
}
}
}
catch (Exception exc)
@@ -2345,9 +2363,18 @@ namespace IOB_WIN_FORM.Iob
// controllo se vietato dynData
if (sendDynDataRec || item.Key != "DYNDATA")
{
sVal = string.Format("[DYNDATA]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
// verifico NON sia un ND...
if (item.Key == "ND")
{
// log anomalia...
lgTrace($"Errore in processDynData.01: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");
}
else
{
sVal = string.Format("[DYNDATA]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
}
}
}
}
@@ -2361,10 +2388,18 @@ namespace IOB_WIN_FORM.Iob
{
// controllo se vietato dynData
if (sendDynDataRec || item.Key != "DYNDATA")
{
sVal = string.Format("[DYNDATA]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
{ // verifico NON sia un ND...
if (item.Key == "ND")
{
// log anomalia...
lgTrace($"Errore in processDynData.02: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");
}
else
{
sVal = string.Format("[DYNDATA]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
}
}
}
}
@@ -2472,9 +2507,18 @@ namespace IOB_WIN_FORM.Iob
string sVal = "";
foreach (var item in currOverride)
{
sVal = string.Format("[OVERRIDES]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
// verifico NON sia un ND...
if (item.Key == "ND")
{
// log anomalia...
lgTrace($"Errore in processOverride: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");
}
else
{
sVal = string.Format("[OVERRIDES]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
}
}
}
}
@@ -8181,10 +8225,19 @@ namespace IOB_WIN_FORM.Iob
// per ogni valore del dizionario mostro ed accodo!
string sVal = "";
foreach (var item in currSysInfo)
{
sVal = string.Format("[SYSINFO]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
{
// verifico NON sia un ND...
if (item.Key == "ND")
{
// log anomalia...
lgTrace($"Errore in processSysInfo: item.key risulta ND! | item.key: {item.Key} | item.Value: {item.Value}");
}
else
{
sVal = string.Format("[SYSINFO]{0}|{1}", item.Key, item.Value);
// chiamo accodamento...
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
}
}
}
}
+25 -7
View File
@@ -1698,9 +1698,18 @@ namespace IOB_WIN_FORM.Iob
var kvpFlux = fLog2send.valString.Split(';');
if (kvpFlux.Count() > 1)
{
sVal = $"[DYNDATA] |{fLog2send.dtRif:yyyy-MM-dd HH:mm:ss}|{kvpFlux[0]}|{kvpFlux[1]}";
// chiamo accodamento con dataora corretta...
accodaFLog(sVal, qEncodeFLog(fLog2send.dtRif, kvpFlux[0], kvpFlux[1]));
// verifico NON sia un ND...
if (kvpFlux[0] == "ND")
{
// log anomalia...
lgTrace($"Errore in processFluxLogTable: kvpFlux[0] risulta ND! | item.key: {kvpFlux[0]} | item.Value: {kvpFlux[1]}");
}
else
{
sVal = $"[DYNDATA] |{fLog2send.dtRif:yyyy-MM-dd HH:mm:ss}|{kvpFlux[0]}|{kvpFlux[1]}";
// chiamo accodamento con dataora corretta...
accodaFLog(sVal, qEncodeFLog(fLog2send.dtRif, kvpFlux[0], kvpFlux[1]));
}
}
}
// svuoto coda invio fluxlog...
@@ -1829,10 +1838,19 @@ namespace IOB_WIN_FORM.Iob
{
if (sendFluxOnRead)
{
// per prima cosa fluxLog a prescindere...
sVal = $"[LOGFILE]{currData[0]}|{currData[1]}";
// ...e chiamo accodamento
accodaFLog(sVal, qEncodeFLog(fLog2send.dtRif, currData[0], currData[1]));
// verifico NON sia un ND...
if (currData[0] == "ND")
{
// log anomalia...
lgTrace($"Errore in processSignLogTable: kvpFlux[0] risulta ND! | item.key: {currData[0]} | item.Value: {currData[1]}");
}
else
{
// per prima cosa fluxLog a prescindere...
sVal = $"[LOGFILE]{currData[0]}|{currData[1]}";
// ...e chiamo accodamento
accodaFLog(sVal, qEncodeFLog(fLog2send.dtRif, currData[0], currData[1]));
}
}
switch (currData[0])