Update beckhoff x sottoscrizione cambio stati esplicito in override
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user