diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-12-03 12:29:57 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-12-03 12:29:57 +0200 |
| commit | 64acdf2b43affc3403d6d40c96a6d48cfc5c5e23 (patch) | |
| tree | 735ac691a4f055dc984e5e477ef49f60f4e71e2a /Software/Visual_Studio/Tango.Integration | |
| parent | af782aca2364948527c1107a02428897fb8382a1 (diff) | |
| parent | 907aa0cd6c29c182d4647f8d2dab89750fd23bc9 (diff) | |
| download | Tango-64acdf2b43affc3403d6d40c96a6d48cfc5c5e23.tar.gz Tango-64acdf2b43affc3403d6d40c96a6d48cfc5c5e23.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs index 527320008..4218f9e9a 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs @@ -256,6 +256,8 @@ namespace Tango.Integration.ExternalBridge MachineOperator.StatusChanged += MachineOperator_StatusChanged; MachineOperator.PendingResponseReceived -= MachineOperator_PendingResponseReceived; MachineOperator.PendingResponseReceived += MachineOperator_PendingResponseReceived; + MachineOperator.EventsNotification -= MachineOperator_EventsNotification; + MachineOperator.EventsNotification += MachineOperator_EventsNotification; } } @@ -339,6 +341,23 @@ namespace Tango.Integration.ExternalBridge OnOperatorResponseReceived(container); } + private void MachineOperator_EventsNotification(object sender, StartEventsNotificationResponse e) + { + try + { + MessageContainer container = new MessageContainer(); + container.Type = MessageType.StartEventsNotificationResponse; + container.Continuous = true; + container.Data = e.ToByteString(); + + _receivers.ToList().Where(x => x.IsLoggedInAndRequiresDiagnostics && x.RequiresEventsNotification).ToList().ForEach(x => x.UpdateEvents(container)); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error on external bridge machine events broadcast."); + } + } + #endregion #region Receiver Events Handlers @@ -756,7 +775,7 @@ namespace Tango.Integration.ExternalBridge _receivers.ToList().Where(x => x.IsLoggedInAndRequiresDiagnostics && x.RequiresDebugLogs).ToList().ForEach(x => x.UpdateDebugLogs(container)); break; case MessageType.StartEventsNotificationResponse: - _receivers.ToList().Where(x => x.IsLoggedInAndRequiresDiagnostics && x.RequiresEventsNotification).ToList().ForEach(x => x.UpdateEvents(container)); + //_receivers.ToList().Where(x => x.IsLoggedInAndRequiresDiagnostics && x.RequiresEventsNotification).ToList().ForEach(x => x.UpdateEvents(container)); break; case MessageType.StartMachineStatusUpdateResponse: _receivers.ToList().Where(x => x.IsLoggedInAndRequiresDiagnostics && x.RequiresMachineStatusUpdate).ToList().ForEach(x => x.UpdateMachineStatus(container)); |
