From 787da4130428c5b7fdff679b3960daff97dde80c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 20 Nov 2018 17:25:24 +0100 Subject: [PATCH] Aggiunta 2 variabili CMS --- MTC_Adapter/SCMA/AdapterCom/Gateway.cs | 7 +++++-- MTC_Adapter/SCMA/AdapterGeneric.cs | 11 +++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/MTC_Adapter/SCMA/AdapterCom/Gateway.cs b/MTC_Adapter/SCMA/AdapterCom/Gateway.cs index d6bb924..d77f47b 100644 --- a/MTC_Adapter/SCMA/AdapterCom/Gateway.cs +++ b/MTC_Adapter/SCMA/AdapterCom/Gateway.cs @@ -73,6 +73,11 @@ namespace SCMA.AdapterCom /// Elenco ultimi allarmi riportati... /// protected Dictionary lastAlarmList; + /// + /// Bool di allarmi presenti + /// + public bool alarmPresent = false; + #endregion #region gestione globale oggetto @@ -390,8 +395,6 @@ namespace SCMA.AdapterCom /// public virtual void processAlarm() { - bool alarmPresent = false; - // continuo controllo if (AlarmFlags != null && AlarmFlags.Length > 0) { diff --git a/MTC_Adapter/SCMA/AdapterGeneric.cs b/MTC_Adapter/SCMA/AdapterGeneric.cs index dc4d8a5..ffe7c9d 100644 --- a/MTC_Adapter/SCMA/AdapterGeneric.cs +++ b/MTC_Adapter/SCMA/AdapterGeneric.cs @@ -3388,6 +3388,17 @@ namespace SCMA // anche il secondo! procPath02_Status(); } + + // cerco status allarmi presenti + if (STRB_DW2.HasFlag(StFlag32.B29)) + { + currGateway.alarmPresent = true; + } + else + { + currGateway.alarmPresent = false; + } + } ///