diff --git a/MP.MONO.ADAPTER.OPC/appsettings.json b/MP.MONO.ADAPTER.OPC/appsettings.json
index 1b0ed0f..887eff2 100644
--- a/MP.MONO.ADAPTER.OPC/appsettings.json
+++ b/MP.MONO.ADAPTER.OPC/appsettings.json
@@ -38,17 +38,20 @@
},
"OptPar": {
"AlarmMode": "RawList",
- "Log2Console": true,
- "Log2File": true,
- "ForceSplit": true,
+ "AlarmRegexp": "\\[[\\w\\s]*\\]",
+ "AlarmCleanPre": "[",
+ "AlarmCleanPost": "]",
"CleanupRegexpPre": "",
//"CleanupRegexpPre": "[^a-zA-Z0-9 %/,.\\-\\+\\r\\n]",
"CleanupRegexpPost": "[^a-zA-Z0-9 %/,.\\-\\+]",
"FiltCrLf": true,
"FiltSplitChar": [],
- "VetoSendCache": 50,
+ "ForceSplit": true,
+ "Log2Console": true,
+ "Log2File": true,
"MinWait": 50,
- "MaxWait": 150
+ "MaxWait": 150,
+ "VetoSendCache": 50
},
"Machine": {
"Manufacturer": "Multiax",
diff --git a/MP.MONO.ADAPTER.OPC/appsettings.multiax.json b/MP.MONO.ADAPTER.OPC/appsettings.multiax.json
index bcc862e..1d5da4a 100644
--- a/MP.MONO.ADAPTER.OPC/appsettings.multiax.json
+++ b/MP.MONO.ADAPTER.OPC/appsettings.multiax.json
@@ -38,17 +38,20 @@
},
"OptPar": {
"AlarmMode": "RawList",
- "Log2Console": true,
- "Log2File": true,
- "ForceSplit": true,
+ "AlarmRegexp": "\\[[\\w\\s]*\\]",
+ "AlarmCleanPre": "[",
+ "AlarmCleanPost": "]",
"CleanupRegexpPre": "",
//"CleanupRegexpPre": "[^a-zA-Z0-9 %/,.\\-\\+\\r\\n]",
"CleanupRegexpPost": "[^a-zA-Z0-9 %/,.\\-\\+]",
"FiltCrLf": true,
"FiltSplitChar": [],
- "VetoSendCache": 50,
+ "ForceSplit": true,
+ "Log2Console": true,
+ "Log2File": true,
"MinWait": 50,
- "MaxWait": 150
+ "MaxWait": 150,
+ "VetoSendCache": 50
},
"Machine": {
"Manufacturer": "Multiax",
diff --git a/MP.MONO.ADAPTER.OPC/appsettings.office.json b/MP.MONO.ADAPTER.OPC/appsettings.office.json
index 1b0ed0f..887eff2 100644
--- a/MP.MONO.ADAPTER.OPC/appsettings.office.json
+++ b/MP.MONO.ADAPTER.OPC/appsettings.office.json
@@ -38,17 +38,20 @@
},
"OptPar": {
"AlarmMode": "RawList",
- "Log2Console": true,
- "Log2File": true,
- "ForceSplit": true,
+ "AlarmRegexp": "\\[[\\w\\s]*\\]",
+ "AlarmCleanPre": "[",
+ "AlarmCleanPost": "]",
"CleanupRegexpPre": "",
//"CleanupRegexpPre": "[^a-zA-Z0-9 %/,.\\-\\+\\r\\n]",
"CleanupRegexpPost": "[^a-zA-Z0-9 %/,.\\-\\+]",
"FiltCrLf": true,
"FiltSplitChar": [],
- "VetoSendCache": 50,
+ "ForceSplit": true,
+ "Log2Console": true,
+ "Log2File": true,
"MinWait": 50,
- "MaxWait": 150
+ "MaxWait": 150,
+ "VetoSendCache": 50
},
"Machine": {
"Manufacturer": "Multiax",
diff --git a/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj b/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj
index 26f7abb..bf2c6be 100644
--- a/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj
+++ b/MP.MONO.ANALYZER/MP.MONO.ANALYZER.csproj
@@ -6,7 +6,7 @@
enable
enable
AnyCPU;x86;x64
- 1.2.2207.2512
+ 1.2.2207.2514
diff --git a/MP.MONO.ANALYZER/Resources/ChangeLog.html b/MP.MONO.ANALYZER/Resources/ChangeLog.html
index e3aba80..c70abd7 100644
--- a/MP.MONO.ANALYZER/Resources/ChangeLog.html
+++ b/MP.MONO.ANALYZER/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
- Version: 1.2.2207.2512
+ Version: 1.2.2207.2514
Release Note:
-
diff --git a/MP.MONO.ANALYZER/Resources/VersNum.txt b/MP.MONO.ANALYZER/Resources/VersNum.txt
index 2f34fdb..67e4344 100644
--- a/MP.MONO.ANALYZER/Resources/VersNum.txt
+++ b/MP.MONO.ANALYZER/Resources/VersNum.txt
@@ -1 +1 @@
-1.2.2207.2512
+1.2.2207.2514
diff --git a/MP.MONO.ANALYZER/Resources/manifest.xml b/MP.MONO.ANALYZER/Resources/manifest.xml
index 74c90bb..571e97a 100644
--- a/MP.MONO.ANALYZER/Resources/manifest.xml
+++ b/MP.MONO.ANALYZER/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.2.2207.2512
+ 1.2.2207.2514
http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.ANALYZER/stable/LAST/ChangeLog.html
false
diff --git a/MP.MONO.DECODER/MP.MONO.DECODER.csproj b/MP.MONO.DECODER/MP.MONO.DECODER.csproj
index 1890119..bf249ab 100644
--- a/MP.MONO.DECODER/MP.MONO.DECODER.csproj
+++ b/MP.MONO.DECODER/MP.MONO.DECODER.csproj
@@ -6,7 +6,7 @@
enable
enable
AnyCPU;x86;x64
- 1.2.2207.2512
+ 1.2.2207.2514
diff --git a/MP.MONO.DECODER/Program.cs b/MP.MONO.DECODER/Program.cs
index 7db7d5f..c9961fa 100644
--- a/MP.MONO.DECODER/Program.cs
+++ b/MP.MONO.DECODER/Program.cs
@@ -85,6 +85,7 @@ MachineDTO machinePlate = new MachineDTO();
// gestione configurazioni da redis
int blinkCount = 10;
+bool AlarmIgnoreEmpty = true;
setupConf();
/* --------------------------------
@@ -147,6 +148,9 @@ void setupConf()
// imposto blinkCount da conf...
string rConf = config["OptPar:BlinkCount"];
int.TryParse(rConf, out blinkCount);
+ // impostyo ignore empty alarms
+ rConf = config["OptPar:AlarmIgnoreEmpty"];
+ bool.TryParse(rConf, out AlarmIgnoreEmpty);
// recupero valori e deserializzo
string rawData = "";
@@ -254,57 +258,65 @@ void AlarmsValPipe_EA_NewMessage(object? sender, EventArgs e)
// ciclo x ogni allarme attivo x verificare se si sia CHIUSO
foreach (var newAlarm in alarmList)
{
- // in primis... se è muted --> lo escludo...
- bool isMuted = false;
- var maybeMuted = mutedAlarmsList.Where(x => x.FullValue == newAlarm).FirstOrDefault();
- if (maybeMuted != null)
+ // se AlarmIgnoreEmpty=true + vuoto --> salto
+ if (AlarmIgnoreEmpty && string.IsNullOrEmpty(newAlarm))
{
- isMuted = maybeMuted.Muted;
- }
- // cerco l'allarme nell'elenco degli allarmi dal DB
- var foundAlarm = alarmsRecorded
- .Where(x => x.FullValue == newAlarm)
- .FirstOrDefault();
- // se non lo trovo --> chiamo procedura che verifica su DB, eventualmente inserisce, restituisce nuovo elenco
- if (foundAlarm == null)
- {
- // salvo sul DB
- foundAlarm = dbController.AlarmListInsert(newAlarm);
- // ora rileggo ed aggiorno redis e cerco di nuovo record...
- alarmsRecorded = dbController.AlarmListGetAll();
- redisDb.StringSet(Constants.ALARMS_SETT_RLIST_KEY, JsonConvert.SerializeObject(alarmsRecorded));
- }
- if (!isMuted)
- {
- if (!lastAlarms.Contains(newAlarm))
- {
- if (foundAlarm != null)
- {
- // segno come iniziato...
- AlarmRecModel newAlarmRec = new AlarmRecModel()
- {
- MachineId = MachineId,
- DtStart = adesso,
- DtEnd = adesso,
- AlarmId = foundAlarm.AlarmId
- };
- alarmRecList.Add(newAlarmRec);
- }
- // gestione blink allarmi
- if (blinkStatus.ContainsKey(newAlarm))
- {
- blinkStatus[newAlarm] = blinkCount;
- }
- else
- {
- blinkStatus.Add(newAlarm, blinkCount);
- }
- }
+ alarmList.Remove(newAlarm);
}
else
{
- // rimuovo da alarmList perché muted...
- alarmList.Remove(newAlarm);
+ // in primis... se è muted --> lo escludo...
+ bool isMuted = false;
+ var maybeMuted = mutedAlarmsList.Where(x => x.FullValue == newAlarm).FirstOrDefault();
+ if (maybeMuted != null)
+ {
+ isMuted = maybeMuted.Muted;
+ }
+ // cerco l'allarme nell'elenco degli allarmi dal DB
+ var foundAlarm = alarmsRecorded
+ .Where(x => x.FullValue == newAlarm)
+ .FirstOrDefault();
+ // se non lo trovo --> chiamo procedura che verifica su DB, eventualmente inserisce, restituisce nuovo elenco
+ if (foundAlarm == null)
+ {
+ // salvo sul DB
+ foundAlarm = dbController.AlarmListInsert(newAlarm);
+ // ora rileggo ed aggiorno redis e cerco di nuovo record...
+ alarmsRecorded = dbController.AlarmListGetAll();
+ redisDb.StringSet(Constants.ALARMS_SETT_RLIST_KEY, JsonConvert.SerializeObject(alarmsRecorded));
+ }
+ if (!isMuted)
+ {
+ if (!lastAlarms.Contains(newAlarm))
+ {
+ if (foundAlarm != null)
+ {
+ // segno come iniziato...
+ AlarmRecModel newAlarmRec = new AlarmRecModel()
+ {
+ MachineId = MachineId,
+ DtStart = adesso,
+ DtEnd = adesso,
+ AlarmId = foundAlarm.AlarmId
+ };
+ alarmRecList.Add(newAlarmRec);
+ }
+ // gestione blink allarmi
+ if (blinkStatus.ContainsKey(newAlarm))
+ {
+ blinkStatus[newAlarm] = blinkCount;
+ }
+ else
+ {
+ blinkStatus.Add(newAlarm, blinkCount);
+ }
+ }
+ }
+ else
+ {
+ // rimuovo da alarmList perché muted...
+ alarmList.Remove(newAlarm);
+ }
}
}
}
diff --git a/MP.MONO.DECODER/Resources/ChangeLog.html b/MP.MONO.DECODER/Resources/ChangeLog.html
index e3aba80..c70abd7 100644
--- a/MP.MONO.DECODER/Resources/ChangeLog.html
+++ b/MP.MONO.DECODER/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
-
Version: 1.2.2207.2512
+ Version: 1.2.2207.2514
Release Note:
-
diff --git a/MP.MONO.DECODER/Resources/VersNum.txt b/MP.MONO.DECODER/Resources/VersNum.txt
index 2f34fdb..67e4344 100644
--- a/MP.MONO.DECODER/Resources/VersNum.txt
+++ b/MP.MONO.DECODER/Resources/VersNum.txt
@@ -1 +1 @@
-1.2.2207.2512
+1.2.2207.2514
diff --git a/MP.MONO.DECODER/Resources/manifest.xml b/MP.MONO.DECODER/Resources/manifest.xml
index 8b2e35c..1abb3c5 100644
--- a/MP.MONO.DECODER/Resources/manifest.xml
+++ b/MP.MONO.DECODER/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.2.2207.2512
+ 1.2.2207.2514
http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.DECODER/stable/LAST/ChangeLog.html
false
diff --git a/MP.MONO.DECODER/appsettings.json b/MP.MONO.DECODER/appsettings.json
index 58f3333..4b4338a 100644
--- a/MP.MONO.DECODER/appsettings.json
+++ b/MP.MONO.DECODER/appsettings.json
@@ -34,6 +34,7 @@
},
"OptPar": {
"AlarmMode": "RawList",
+ "AlarmIgnoreEmpty": true,
"BlinkCount": 10
}
}
diff --git a/MP.MONO.SIM/MP.MONO.SIM.csproj b/MP.MONO.SIM/MP.MONO.SIM.csproj
index 4c2700e..20429b2 100644
--- a/MP.MONO.SIM/MP.MONO.SIM.csproj
+++ b/MP.MONO.SIM/MP.MONO.SIM.csproj
@@ -6,7 +6,7 @@
enable
enable
AnyCPU;x86;x64
- 1.2.2207.2512
+ 1.2.2207.2514
diff --git a/MP.MONO.SIM/Resources/ChangeLog.html b/MP.MONO.SIM/Resources/ChangeLog.html
index e3aba80..c70abd7 100644
--- a/MP.MONO.SIM/Resources/ChangeLog.html
+++ b/MP.MONO.SIM/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
-
Version: 1.2.2207.2512
+ Version: 1.2.2207.2514
Release Note:
-
diff --git a/MP.MONO.SIM/Resources/VersNum.txt b/MP.MONO.SIM/Resources/VersNum.txt
index 2f34fdb..67e4344 100644
--- a/MP.MONO.SIM/Resources/VersNum.txt
+++ b/MP.MONO.SIM/Resources/VersNum.txt
@@ -1 +1 @@
-1.2.2207.2512
+1.2.2207.2514
diff --git a/MP.MONO.SIM/Resources/manifest.xml b/MP.MONO.SIM/Resources/manifest.xml
index d478d98..c5c1e4d 100644
--- a/MP.MONO.SIM/Resources/manifest.xml
+++ b/MP.MONO.SIM/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.2.2207.2512
+ 1.2.2207.2514
http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.SIM/stable/LAST/ChangeLog.html
false
diff --git a/MP.MONO.UI/MP.MONO.UI.csproj b/MP.MONO.UI/MP.MONO.UI.csproj
index eec1d35..d5dee6f 100644
--- a/MP.MONO.UI/MP.MONO.UI.csproj
+++ b/MP.MONO.UI/MP.MONO.UI.csproj
@@ -5,7 +5,7 @@
enable
enable
AnyCPU;x86;x64
- 1.2.2207.2512
+ 1.2.2207.2514
diff --git a/MP.MONO.UI/Resources/ChangeLog.html b/MP.MONO.UI/Resources/ChangeLog.html
index e3aba80..c70abd7 100644
--- a/MP.MONO.UI/Resources/ChangeLog.html
+++ b/MP.MONO.UI/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
MAPO-MONO
-
Version: 1.2.2207.2512
+ Version: 1.2.2207.2514
Release Note:
-
diff --git a/MP.MONO.UI/Resources/VersNum.txt b/MP.MONO.UI/Resources/VersNum.txt
index 2f34fdb..67e4344 100644
--- a/MP.MONO.UI/Resources/VersNum.txt
+++ b/MP.MONO.UI/Resources/VersNum.txt
@@ -1 +1 @@
-1.2.2207.2512
+1.2.2207.2514
diff --git a/MP.MONO.UI/Resources/manifest.xml b/MP.MONO.UI/Resources/manifest.xml
index 2f52450..ecb5b77 100644
--- a/MP.MONO.UI/Resources/manifest.xml
+++ b/MP.MONO.UI/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.2.2207.2512
+ 1.2.2207.2514
http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/MP.Mon.zip
http://nexus.steamware.net/repository/SWS/MP.MONO.UI/stable/LAST/ChangeLog.html
false