diff --git a/IOB-WIN-NEXT/IobBeckhoff.cs b/IOB-WIN-NEXT/IobBeckhoff.cs index 58d68f0f..16b5d3ee 100644 --- a/IOB-WIN-NEXT/IobBeckhoff.cs +++ b/IOB-WIN-NEXT/IobBeckhoff.cs @@ -54,14 +54,14 @@ namespace IOB_WIN_NEXT #endregion Public Constructors - #region Private Methods + #region Protected Methods - private void AdsCli_ValueChanged(TcAdsClient sender, string key, string value) + protected void AdsCli_ValueChanged(TcAdsClient sender, string key, string value) { lg.Info($"Monitored Value changed | sender: {sender} | key: {key} | value: {value}"); } - #endregion Private Methods + #endregion Protected Methods #region Public Methods diff --git a/IOB-WIN-NEXT/IobBeckhoffCpa.cs b/IOB-WIN-NEXT/IobBeckhoffCpa.cs index cf6fde46..e1a79dfb 100644 --- a/IOB-WIN-NEXT/IobBeckhoffCpa.cs +++ b/IOB-WIN-NEXT/IobBeckhoffCpa.cs @@ -60,21 +60,21 @@ namespace IOB_WIN_NEXT #endregion Public Constructors - #region Private Methods + #region Protected Methods - private void AdsCli_CountChanged(TcAdsClient sender, int newCount) + protected void AdsCli_CountChanged(TcAdsClient sender, int newCount) { contapezziPLC = newCount; lg.Info($"Nuova lettura contapezzi | contapezziPLC: {contapezziPLC} | contapezziIOB: {contapezziIOB}"); } - private void AdsCli_StatusChanged(TcAdsClient sender, int newStatus) + protected void AdsCli_StatusChanged(TcAdsClient sender, int newStatus) { currStatus = newStatus; lg.Info($"Status changed: {newStatus}"); } - #endregion Private Methods + #endregion Protected Methods #region Public Methods @@ -282,13 +282,14 @@ namespace IOB_WIN_NEXT } } - public virtual void setEventHandler() + public override void setEventHandler() { base.setEventHandler(); if (AdsCli != null) { AdsCli.StatusChanged += AdsCli_StatusChanged; AdsCli.CountChanged += AdsCli_CountChanged; + AdsCli.ValueChanged += AdsCli_ValueChanged; } }