diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-15 15:04:39 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-15 15:04:39 +0200 |
| commit | 9879f87a345bec10a3ee26e9ec669add2b5bfcd3 (patch) | |
| tree | d2e70aac5e15edff8f58f76a2c450132dc562db3 /Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs | |
| parent | 63cb3aa2350a10e6db68e4dc181b2ee7e500061a (diff) | |
| download | Tango-9879f87a345bec10a3ee26e9ec669add2b5bfcd3.tar.gz Tango-9879f87a345bec10a3ee26e9ec669add2b5bfcd3.zip | |
Enable Diagnostics on connection.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs index 4bbd7aa64..eaa72541c 100644 --- a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs @@ -25,6 +25,8 @@ namespace Tango.Integration.Operators /// <seealso cref="Tango.Integration.Operators.IMachineOperator" /> public class MachineOperator : BasicTransporter, IMachineOperator { + private bool _diagnosticsSent; + #region Events /// <summary> @@ -59,7 +61,7 @@ namespace Tango.Integration.Operators #region Virtual Methods /// <summary> - /// Called when the enable sensors update property has been changed + /// Called when the enable diagnostics property has been changed /// </summary> /// <param name="value">if set to <c>true</c> [value].</param> protected virtual void OnEnableDiagnosticsChanged(bool value) @@ -74,17 +76,24 @@ namespace Tango.Integration.Operators }, MessageType.PushDiagnosticsRequest)).ObserveOn(new NewThreadScheduler()).Subscribe( (response) => { + _diagnosticsSent = true; OnDiagnosticsDataAvailable(response); }, (ex) => { + _diagnosticsSent = false; //Do I need separate event for each one ?? }, () => { + _diagnosticsSent = false; //What to do now ?? }); } + else + { + _diagnosticsSent = false; + } } /// <summary> |
