From 803bd5784a623a859e21295e13fd8a5bdb7eb496 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 26 Jul 2018 14:18:24 +0300 Subject: Implemented running job events details dialog on machine studio. --- .../Tango.MachineStudio.Developer.csproj | 6 +++- .../ViewModels/MainViewVM.cs | 34 ++++++++++++++++++++-- 2 files changed, 36 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 0bac2b355..c361a584d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -268,6 +268,10 @@ {94f7acf8-55e1-4a02-b9bc-a818413fdbbf} Tango.MachineStudio.DB + + {1674f726-0e66-414f-b9fd-c6f20d7f07c7} + Tango.MachineStudio.Logging + {d0ce8122-077d-42a2-9490-028ae4769b52} Tango.MachineStudio.MachineDesigner @@ -359,7 +363,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 749a09023..0a033b118 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -39,6 +39,8 @@ using Tango.SharedUI.Helpers; using Tango.Core.DI; using Tango.MachineStudio.Common; using Tango.BL.ColorConversion; +using Tango.MachineStudio.Logging.ViewModels; +using Tango.MachineStudio.Logging.Views; namespace Tango.MachineStudio.Developer.ViewModels { @@ -68,6 +70,7 @@ namespace Tango.MachineStudio.Developer.ViewModels private Thread _colorConversionThread; private bool _hiveOpened; private bool _color_changed_from_hive; + private bool _dialog_shown; #region Properties @@ -491,6 +494,16 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _jobEvents = value; RaisePropertyChangedAuto(); } } + private MachinesEvent _selectedJobEvent; + /// + /// Gets or sets the selected job event. + /// + public MachinesEvent SelectedJobEvent + { + get { return _selectedJobEvent; } + set { _selectedJobEvent = value; RaisePropertyChangedAuto(); OnSelectedJobEventChanged(); } + } + #endregion #region Commands @@ -798,7 +811,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { InvokeUI(() => { - JobEvents.Add(e); + JobEvents.Insert(0, e); }); } } @@ -1044,6 +1057,21 @@ namespace Tango.MachineStudio.Developer.ViewModels #region Running Job Management + private void OnSelectedJobEventChanged() + { + if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.ApplicationStarted && !_dialog_shown) + { + _dialog_shown = true; + _notification.ShowModalDialog(new EventDetailsViewVM(SelectedJobEvent), (x) => + { + + }, () => + { + _dialog_shown = false; + }); + } + } + /// /// Closes the job completion status bar. /// @@ -1185,7 +1213,7 @@ namespace Tango.MachineStudio.Developer.ViewModels }); }; - _jobHandler.Finalizing += (_, __) => + _jobHandler.Finalizing += (_, __) => { _speech.SpeakInfo("Finalizing job..."); LogManager.Log(String.Format("Finalizing job {0}.", RunningJob.Name)); @@ -1401,7 +1429,7 @@ namespace Tango.MachineStudio.Developer.ViewModels Rmls = _activeJobDbContext.Rmls.ToObservableCollection(); WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); - + LogManager.Log("Setting active job..."); _activeJob = _activeJobDbContext.Jobs.SingleOrDefault(x => x.Guid == SelectedMachineJob.Guid); -- cgit v1.3.1 From fb2359a8bba44df4f0731eb0e1ce75d461015bab Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 26 Jul 2018 16:12:42 +0300 Subject: Machine Studio v2.1.10 --- .../Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs | 2 +- .../Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs | 2 +- .../MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs | 2 +- .../Tango.MachineStudio.Publisher/Properties/AssemblyInfo.cs | 2 +- .../MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.Emulations/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs | 2 +- .../Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs index 87753b6c6..7b0f13657 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Developer Module")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.7.1608")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs index ed3f8dfb8..15619a3ab 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Technician Module")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.7.1608")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs index e62d12b87..e641c8bf3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Common Components")] -[assembly: AssemblyVersion("2.0.11.1411")] +[assembly: AssemblyVersion("2.0.12.1608")] [assembly: ComVisible(false)] [assembly:ThemeInfo( diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Properties/AssemblyInfo.cs index 404cc4ae4..8dea9cb7b 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Publisher/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio Publish Utility")] -[assembly: AssemblyVersion("2.0.2.1411")] +[assembly: AssemblyVersion("2.0.4.1608")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index 5f541f597..0ed9a1eae 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("2.0.9.18206")] +[assembly: AssemblyVersion("2.1.11.18207")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs index 3f5a630f6..c72734dfe 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Panel PC Common Library")] -[assembly: AssemblyVersion("2.0.4.1407")] +[assembly: AssemblyVersion("2.0.6.1608")] [assembly:ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index 8554905d2..1e4318ff4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Panel PC Application")] -[assembly: AssemblyVersion("2.0.1.1407")] +[assembly: AssemblyVersion("2.0.3.1608")] diff --git a/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs index 03f7c9da5..db222c791 100644 --- a/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.BL/Properties/AssemblyInfo.cs @@ -4,4 +4,4 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Business logic components")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.0.15.1411")] \ No newline at end of file +[assembly: AssemblyVersion("2.0.16.1608")] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Emulations/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Emulations/Properties/AssemblyInfo.cs index f4385784a..714659401 100644 --- a/Software/Visual_Studio/Tango.Emulations/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Emulations/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Emulation Components")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.7.1608")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs index 3dedad62c..7f155cd13 100644 --- a/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Protobuf Message Repository")] -[assembly: AssemblyVersion("2.0.16.1411")] +[assembly: AssemblyVersion("2.0.17.1608")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs index 21be4e283..b34d8addd 100644 --- a/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Protobuf/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Protobuf Components")] -[assembly: AssemblyVersion("2.0.15.1411")] +[assembly: AssemblyVersion("2.0.16.1608")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs index e701b6cbf..0958ffa7d 100644 --- a/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs @@ -44,4 +44,4 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.1.1407")] +[assembly: AssemblyVersion("2.0.2.1608")] diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs index f166d9b1a..e732e97c6 100644 --- a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs @@ -44,4 +44,4 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.1.1407")] +[assembly: AssemblyVersion("2.0.3.1608")] diff --git a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs index e3fc56565..afc6713b9 100644 --- a/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.Stubs.UI/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Stubs execution GUI utility")] -[assembly: AssemblyVersion("3.1.1.1407")] +[assembly: AssemblyVersion("3.1.3.1608")] diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs index a635cd768..5346a2b05 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.1407")] +[assembly: AssemblyVersion("1.0.3.1608")] [assembly: AssemblyFileVersion("1.0.0.0")] -- cgit v1.3.1 From 1e3777f0813b2ac26ae0b52e89c171955a949563 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 29 Jul 2018 09:54:44 +0300 Subject: Moved external bridge classes to ExternalBridge namespace. --- .../ViewModels/MainViewVM.cs | 2 +- .../ViewModels/MainViewVM.cs | 2 +- .../ViewModels/DirectSynchronizationViewVM.cs | 2 +- .../ViewModels/MachineTechViewVM.cs | 2 +- .../Diagnostics/DefaultDiagnosticsFrameProvider.cs | 2 +- .../EventLogging/DefaultEventLogger.cs | 2 +- .../Messages/MachineConnectionChangedMessage.cs | 2 +- .../StudioApplication/IStudioApplicationManager.cs | 2 +- .../DefaultStudioApplicationManager.cs | 2 +- .../Tango.MachineStudio.UI/ViewModelLocator.cs | 2 +- .../ViewModels/MachineConnectionViewVM.cs | 2 +- .../ViewModels/MainViewVM.cs | 2 +- .../Views/ConnectedMachineView.xaml | 2 +- .../Views/MachineConnectionView.xaml | 2 +- .../Views/ReportIssueView.xaml | 2 +- .../Views/ResolvedIssuesView.xaml | 2 +- .../Application/IPPCApplicationManager.cs | 2 +- .../Connection/DefaultMachineProvider.cs | 2 +- .../Diagnostics/DefaultDiagnosticsFrameProvider.cs | 2 +- .../EventLogging/DefaultEventLogger.cs | 2 +- .../PPC/Tango.PPC.UI/ViewModelLocator.cs | 2 +- .../IExternalBridgeClientExtensions.cs | 2 +- .../ExternalBridge/ExternalBridgeScanner.cs | 166 +++++++++++++++++++++ .../ExternalBridge/ExternalBridgeService.cs | 119 +++++++++++++++ .../ExternalBridge/ExternalBridgeTcpClient.cs | 103 +++++++++++++ .../ExternalBridge/ExternalBridgeUsbClient.cs | 114 ++++++++++++++ .../ExternalBridge/IExternalBridgeClient.cs | 30 ++++ .../ExternalBridge/IExternalBridgeSecureClient.cs | 22 +++ .../ExternalBridge/IExternalBridgeService.cs | 21 +++ .../Services/ExternalBridgeScanner.cs | 166 --------------------- .../Services/ExternalBridgeService.cs | 119 --------------- .../Services/ExternalBridgeTcpClient.cs | 103 ------------- .../Services/ExternalBridgeUsbClient.cs | 114 -------------- .../Services/IExternalBridgeClient.cs | 30 ---- .../Services/IExternalBridgeSecureClient.cs | 22 --- .../Services/IExternalBridgeService.cs | 21 --- .../Tango.Integration/Tango.Integration.csproj | 14 +- 37 files changed, 604 insertions(+), 604 deletions(-) create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeUsbClient.cs create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeClient.cs create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeSecureClient.cs create mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeScanner.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeService.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeTcpClient.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeUsbClient.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeClient.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeSecureClient.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeService.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs index 5bd6ff809..9876dca9e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/ViewModels/MainViewVM.cs @@ -14,7 +14,7 @@ using Tango.Core.Commands; using Tango.Core.Helpers; using Tango.Integration.Diagnostics; using Tango.Integration.Operation; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.MachineStudio.Common.Diagnostics; using Tango.MachineStudio.Common.EventLogging; using Tango.MachineStudio.Common.Notifications; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 0a033b118..a58757633 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -10,7 +10,7 @@ using System.Windows.Media; using Tango.Core.Commands; using Tango.BL.Entities; using Tango.Integration.Operation; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.Logging; using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Controls; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs index b2175b46c..a09e698e3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/DirectSynchronizationViewVM.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; using Tango.Core.Commands; using Tango.Core.Helpers; using Tango.BL.Entities; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.Common.StudioApplication; using Tango.MachineStudio.Synchronization.Navigation; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index 0c09850c1..d403223ec 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -25,7 +25,7 @@ using Tango.MachineStudio.Technician.TechItems; using Tango.PMR.Diagnostics; using Tango.Settings; using Tango.SharedUI; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.BL.Enumerations; using Tango.BL; using Tango.MachineStudio.Common.EventLogging; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs index d34ef4b96..957648536 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.Core; using Tango.Integration.Operation; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.MachineStudio.Common.StudioApplication; using Tango.PMR.Diagnostics; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index b33b771ae..c5b9c63cb 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -10,7 +10,7 @@ using Tango.BL; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Core; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.Logging; using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Diagnostics; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/MachineConnectionChangedMessage.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/MachineConnectionChangedMessage.cs index 90820ed47..af36f2edf 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/MachineConnectionChangedMessage.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/MachineConnectionChangedMessage.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; namespace Tango.MachineStudio.Common.Messages { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs index 00e67ff3b..464f932f6 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; namespace Tango.MachineStudio.Common.StudioApplication { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index debeccded..d6a832c8a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -15,7 +15,7 @@ using Tango.MachineStudio.Common.Modules; using Tango.MachineStudio.Common; using Tango.Settings; using System.Windows; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.MachineStudio.Common.EventLogging; using Tango.BL.Enumerations; using Tango.Core.DI; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs index 8a5ce3d8b..2c816eb6c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs @@ -1,6 +1,6 @@ using System; using Tango.Core.DI; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.Logging; using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Diagnostics; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs index 3cd3fb5f9..60447f37a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.MachineStudio.Common.Notifications; using Tango.SharedUI; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index 278926de9..d209e3f27 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -13,7 +13,7 @@ using System.Windows.Media; using Tango.BL.Entities; using Tango.Core.Commands; using Tango.Core.DI; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.Logging; using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Authentication; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml index 39c42392d..bb8b65f6a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ConnectedMachineView.xaml @@ -4,7 +4,7 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration" + xmlns:integration="clr-namespace:Tango.Integration.ExternalBridge;assembly=Tango.Integration" xmlns:integ="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml index 6f0a74805..3a8baf7e5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml @@ -5,7 +5,7 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration" + xmlns:integration="clr-namespace:Tango.Integration.ExternalBridge;assembly=Tango.Integration" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml index 37cd0b793..2a6228eda 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml @@ -6,7 +6,7 @@ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" - xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration" + xmlns:integration="clr-namespace:Tango.Integration.ExternalBridge;assembly=Tango.Integration" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels" xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml index 4fb457f87..3b5affbbf 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml @@ -6,7 +6,7 @@ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" - xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration" + xmlns:integration="clr-namespace:Tango.Integration.ExternalBridge;assembly=Tango.Integration" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels" xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS" diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs index 1ac70c650..50bceb3e1 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using System.Windows; using Tango.BL.Entities; using Tango.Integration.Operation; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; namespace Tango.PPC.Common.Application { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 160029222..8b0098eb8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -7,7 +7,7 @@ using Tango.BL; using Tango.BL.Entities; using Tango.Core; using Tango.Integration.Operation; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.PMR.Connection; using Tango.Transport.Adapters; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs index 28255820c..bff64feb7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.Core; using Tango.Integration.Operation; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.PMR.Diagnostics; using Tango.PPC.Common.Application; using Tango.PPC.Common.Connection; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs index da904b74e..d981723be 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs @@ -10,7 +10,7 @@ using Tango.BL; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Core; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.PMR.Diagnostics; using Tango.Integration.Operation; using Tango.PPC.Common.Application; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index d396920ab..a56b9bd4c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -1,7 +1,7 @@ using System; using System.Windows; using Tango.Core.DI; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; using Tango.Logging; using Tango.PPC.Common.Application; using Tango.PPC.Common.Authentication; diff --git a/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs b/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs index 62a7c1523..3e9546983 100644 --- a/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs +++ b/Software/Visual_Studio/Tango.Integration/ExtensionMethods/IExternalBridgeClientExtensions.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Tango.Integration.Services; +using Tango.Integration.ExternalBridge; /// /// Contains extension methods. diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs new file mode 100644 index 000000000..f9d103de2 --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs @@ -0,0 +1,166 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO.Ports; +using System.Linq; +using System.Management; +using System.Net; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Core.Helpers; +using Tango.Logging; +using Tango.PMR; +using Tango.PMR.Common; +using Tango.PMR.Integration; +using Tango.Settings; +using Tango.Transport.Adapters; + +namespace Tango.Integration.ExternalBridge +{ + /// + /// Scans for available machines on the local area network and physically connected via USB. + /// + /// + public class ExternalBridgeScanner : ExtendedObject + { + private Thread _tcpDiscoveryThread; + private Thread _usbDiscoveryThread; + private UdpClient _server; + private IntegrationSettings _settings; + + private ObservableCollection _availableMachines; + /// + /// Gets the available machines. + /// + public ObservableCollection AvailableMachines + { + get { return _availableMachines; } + private set { _availableMachines = value; RaisePropertyChangedAuto(); } + } + + private bool _isStarted; + /// + /// Gets or sets a value indicating whether this instance is started. + /// + public bool IsStarted + { + get { return _isStarted; } + private set { _isStarted = value; RaisePropertyChangedAuto(); } + } + + /// + /// Initializes a new instance of the class. + /// + public ExternalBridgeScanner() + { + _settings = SettingsManager.Default.GetOrCreate(); + _server = new UdpClient(_settings.ExternalBridgeServiceDiscoveryPort); + AvailableMachines = new ObservableCollection(); + } + + /// + /// Start scanning. (Results will be available through ). + /// + public void Start() + { + if (!IsStarted) + { + LogManager.Log("External bridge scanner started..."); + + IsStarted = true; + + _tcpDiscoveryThread = new Thread(TcpDiscoveryThreadMethod); + _tcpDiscoveryThread.IsBackground = true; + _tcpDiscoveryThread.Start(); + + _usbDiscoveryThread = new Thread(UsbDiscoveryThreadMethod); + _usbDiscoveryThread.IsBackground = true; + _usbDiscoveryThread.Start(); + } + } + + /// + /// Stops this instance. + /// + public void Stop() + { + if (IsStarted) + { + IsStarted = false; + LogManager.Log("External bridge scanner stopped."); + } + } + + /// + /// USB discovery thread method. + /// + private void UsbDiscoveryThreadMethod() + { + while (IsStarted) + { + foreach (var device in Transport.Components.ComPortEnumerator.EnumerateComPorts()) + { + if (device.Description.Contains(_settings.EmbeddedDeviceName) || !_settings.FilterExternalBridgeUsbMachines) + { + if (!AvailableMachines.OfType().ToList().Exists(x => x.ComPort == device.Port)) + { + LogManager.Log("Found a new machine via USB " + device.Description); + ThreadsHelper.InvokeUINow(() => + { + AvailableMachines.Add(new ExternalBridgeUsbClient(device.Port, device.Description, _settings.EmbeddedSerialBaudRate)); + }); + } + } + } + + Thread.Sleep(2000); + } + } + + /// + /// TCP discovery thread method. + /// + private void TcpDiscoveryThreadMethod() + { + while (IsStarted) + { + var ClientEp = new IPEndPoint(IPAddress.Any, 0); + var ClientRequestData = _server.Receive(ref ClientEp); + + ExternalBridgeUdpDiscoveryPacket packet = ExternalBridgeUdpDiscoveryPacket.Parser.ParseFrom(ClientRequestData); + + if (!AvailableMachines.OfType().ToList().Exists(x => x.SerialNumber == packet.SerialNumber)) + { + ExternalBridgeTcpClient newMachine = new ExternalBridgeTcpClient(packet.SerialNumber, ClientEp.Address.ToString()); + + LogManager.Log("Found a new machine via TCP " + newMachine.SerialNumber); + + ThreadsHelper.InvokeUINow(() => + { + AvailableMachines.Add(newMachine); + }); + } + + Thread.Sleep(1000); + } + } + + /// + /// Handles the available machines component state changed event. + /// + /// The sender. + /// The e. + private void Client_StateChanged(object sender, Transport.TransportComponentState e) + { + if (e == Transport.TransportComponentState.Failed || e == Transport.TransportComponentState.Disposed) + { + LogManager.Log("External bridge client failed or disposed. Removing from available machines..."); + AvailableMachines.Remove(sender as IExternalBridgeClient); + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs new file mode 100644 index 000000000..8408d33af --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Google.Protobuf; +using Tango.BL.Entities; +using Tango.Integration.Operation; +using Tango.PMR; +using Tango.PMR.Common; +using Tango.Transport; +using Tango.Transport.Transporters; +using Tango.PMR.Integration; +using Tango.Transport.Discovery; +using Tango.Transport.Servers; +using Tango.Transport.Adapters; + +namespace Tango.Integration.ExternalBridge +{ + public class ExternalBridgeService : BasicTransporter, IExternalBridgeService + { + private UdpDiscoveryService _discoverySevice; + private TcpServer _tcpServer; + + public IMachineOperator MachineOperator { get; private set; } + + public Machine Machine { get; private set; } + + public bool IsStarted { get; private set; } + + public ExternalBridgeService(IMachineOperator machineOperator, Machine machine) + { + Machine = machine; + MachineOperator = machineOperator; + + _tcpServer = new TcpServer(1984); + _tcpServer.ClientConnected += _tcpServer_ClientConnected; + + _discoverySevice = new UdpDiscoveryService(8888, new ExternalBridgeUdpDiscoveryPacket() + { + SerialNumber = Machine.SerialNumber, + }); + } + + private async void _tcpServer_ClientConnected(object sender, ClientConnectedEventArgs e) + { + Adapter = new TcpTransportAdapter(e.Socket); + await Connect(); + } + + public void Start() + { + if (!IsStarted) + { + _tcpServer.Start(); + _discoverySevice.Start(); + + IsStarted = true; + } + } + + public void Stop() + { + if (IsStarted) + { + _tcpServer.Stop(); + _discoverySevice.Stop(); + + IsStarted = false; + } + } + + protected async override void OnRequestReceived(MessageContainer container) + { + base.OnRequestReceived(container); + + if (container.Type == MessageType.ExternalClientLoginRequest) + { + var request = MessageFactory.ParseTangoMessageFromContainer(container); + + var response = new ExternalClientLoginResponse(); + response.Authenticated = false; + + if (request.Message.Password == "1234") + { + response.Authenticated = true; + response.SerialNumber = Machine.SerialNumber; + } + + await SendResponse(response, container.Token); + } + else + { + MachineOperator.RequestTimeout = TimeSpan.FromSeconds(60); + + if (!container.Continuous) + { + var response = await MachineOperator.SendRequest(container); + await SendResponse(response); + } + else + { + MachineOperator.SendContinuousRequest(container).Subscribe((response) => + { + + SendResponse(response); + + },(ex) => + { + if (ex is ResponseErrorException) + { + SendResponse((ex as ResponseErrorException).Container); + } + }); + } + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs new file mode 100644 index 000000000..a81e64c02 --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Integration.Operation; +using Tango.PMR.Integration; +using Tango.Settings; +using Tango.Transport.Adapters; +using Tango.Transport.Transporters; + +namespace Tango.Integration.ExternalBridge +{ + /// + /// Represents a secure external bridge TCP client. + /// + /// + /// + public class ExternalBridgeTcpClient : MachineOperator, IExternalBridgeSecureClient + { + private String _serialNumber; + /// + /// Gets the machine serial number. + /// + public String SerialNumber + { + get { return _serialNumber; } + set + { + _serialNumber = value; + RaisePropertyChangedAuto(); + + Machine = ObservablesEntitiesAdapter.Instance.Machines.SingleOrDefault(x => x.SerialNumber == _serialNumber); + } + } + + private String _ipAddress; + /// + /// Gets or sets the machine IP address. + /// + public String IPAddress + { + get { return _ipAddress; } + set { _ipAddress = value; RaisePropertyChangedAuto(); } + } + + /// + /// Gets a value indicating whether this client requires authentication. + /// + public bool RequiresAuthentication => true; + + /// + /// Connects the transport component. + /// + /// + public override async Task Connect() + { + await Disconnect(); + Adapter = new TcpTransportAdapter(IPAddress, SettingsManager.Default.GetOrCreate().ExternalBridgeServicePort); + await base.Connect(); + } + + /// + /// Authenticates with the service using the specified password. + /// + /// The password. + /// + public async Task Authenticate(String password) + { + var response = await SendRequest(new ExternalClientLoginRequest() + { + Password = password + }); + return response.Message.Authenticated; + } + + /// + /// Initializes a new instance of the class. + /// + /// The machine serial number. + /// The machine IP address. + public ExternalBridgeTcpClient(String serialNumber, String ipAddress) + { + SerialNumber = serialNumber; + IPAddress = ipAddress; + UseKeepAlive = true; + EnableDiagnostics = true; + } + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return SerialNumber; + } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeUsbClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeUsbClient.cs new file mode 100644 index 000000000..0e5dca2d0 --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeUsbClient.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Integration.Operation; +using Tango.PMR.Integration; +using Tango.Settings; +using Tango.Transport.Adapters; +using Tango.Transport.Transporters; + +namespace Tango.Integration.ExternalBridge +{ + /// + /// Represents an external bridge USB client. + /// + /// + /// This isn't really an external bridge client, but merely a transporter for communicating with a Tango machine embedded device. + /// + /// + /// + public class ExternalBridgeUsbClient : MachineOperator, IExternalBridgeClient + { + private String _serialNumber; + /// + /// Gets the machine serial number. + /// + public String SerialNumber + { + get { return _serialNumber; } + set + { + _serialNumber = value; + RaisePropertyChangedAuto(); + + Machine = ObservablesEntitiesAdapter.Instance.Machines.SingleOrDefault(x => x.SerialNumber == _serialNumber); + RaisePropertyChanged(nameof(Machine)); + } + } + + private String _comPort; + /// + /// Gets or sets the serial COM port. + /// + public String ComPort + { + get { return _comPort; } + set { _comPort = value; RaisePropertyChangedAuto(); } + } + + private UsbSerialBaudRates _baudRate; + /// + /// Gets or sets the baud rate. + /// + public UsbSerialBaudRates BaudRate + { + get { return _baudRate; } + set { _baudRate = value; RaisePropertyChangedAuto(); } + } + + private String _Device; + /// + /// Gets or sets the USB device name. + /// + public String Device + { + get { return _Device; } + set { _Device = value; RaisePropertyChangedAuto(); } + } + + /// + /// Connects the transport component. + /// + /// + public override async Task Connect() + { + await Disconnect(); + Adapter = new UsbTransportAdapter(ComPort) { BaudRate = BaudRate }; + await base.Connect(); + } + + /// + /// Gets a value indicating whether this client requires authentication. + /// + public bool RequiresAuthentication => false; + + /// + /// Initializes a new instance of the class. + /// + /// The COM port. + /// The device. + public ExternalBridgeUsbClient(String comPort, String device,UsbSerialBaudRates baudRate = UsbSerialBaudRates.BR_115200) + { + ComPort = comPort; + Device = device; + BaudRate = baudRate; + UseKeepAlive = false; + EnableDiagnostics = true; + } + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return Device; + } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeClient.cs new file mode 100644 index 000000000..b1d084cfa --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeClient.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Integration.Operation; +using Tango.Transport; +using Tango.Transport.Transporters; + +namespace Tango.Integration.ExternalBridge +{ + /// + /// Represents a Tango machine external bridge service client. + /// + /// + public interface IExternalBridgeClient : IMachineOperator + { + /// + /// Gets a value indicating whether this client requires authentication. + /// + bool RequiresAuthentication { get; } + + /// + /// Gets or sets the machine serial number. + /// + String SerialNumber { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeSecureClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeSecureClient.cs new file mode 100644 index 000000000..e109837fb --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeSecureClient.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Integration.ExternalBridge +{ + /// + /// Represents a secure external bridge client which requires authentication. + /// + /// + public interface IExternalBridgeSecureClient : IExternalBridgeClient + { + /// + /// Authenticates with the service using the specified password. + /// + /// The password. + /// + Task Authenticate(String password); + } +} diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs new file mode 100644 index 000000000..d8e106ac4 --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/IExternalBridgeService.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Integration.Operation; +using Tango.Transport; +using Tango.Transport.Transporters; + +namespace Tango.Integration.ExternalBridge +{ + public interface IExternalBridgeService : ITransporter + { + IMachineOperator MachineOperator { get; } + Machine Machine { get; } + bool IsStarted { get; } + void Start(); + void Stop(); + } +} diff --git a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeScanner.cs b/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeScanner.cs deleted file mode 100644 index 8aca73e46..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeScanner.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.IO.Ports; -using System.Linq; -using System.Management; -using System.Net; -using System.Net.NetworkInformation; -using System.Net.Sockets; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Tango.Core; -using Tango.Core.Helpers; -using Tango.Logging; -using Tango.PMR; -using Tango.PMR.Common; -using Tango.PMR.Integration; -using Tango.Settings; -using Tango.Transport.Adapters; - -namespace Tango.Integration.Services -{ - /// - /// Scans for available machines on the local area network and physically connected via USB. - /// - /// - public class ExternalBridgeScanner : ExtendedObject - { - private Thread _tcpDiscoveryThread; - private Thread _usbDiscoveryThread; - private UdpClient _server; - private IntegrationSettings _settings; - - private ObservableCollection _availableMachines; - /// - /// Gets the available machines. - /// - public ObservableCollection AvailableMachines - { - get { return _availableMachines; } - private set { _availableMachines = value; RaisePropertyChangedAuto(); } - } - - private bool _isStarted; - /// - /// Gets or sets a value indicating whether this instance is started. - /// - public bool IsStarted - { - get { return _isStarted; } - private set { _isStarted = value; RaisePropertyChangedAuto(); } - } - - /// - /// Initializes a new instance of the class. - /// - public ExternalBridgeScanner() - { - _settings = SettingsManager.Default.GetOrCreate(); - _server = new UdpClient(_settings.ExternalBridgeServiceDiscoveryPort); - AvailableMachines = new ObservableCollection(); - } - - /// - /// Start scanning. (Results will be available through ). - /// - public void Start() - { - if (!IsStarted) - { - LogManager.Log("External bridge scanner started..."); - - IsStarted = true; - - _tcpDiscoveryThread = new Thread(TcpDiscoveryThreadMethod); - _tcpDiscoveryThread.IsBackground = true; - _tcpDiscoveryThread.Start(); - - _usbDiscoveryThread = new Thread(UsbDiscoveryThreadMethod); - _usbDiscoveryThread.IsBackground = true; - _usbDiscoveryThread.Start(); - } - } - - /// - /// Stops this instance. - /// - public void Stop() - { - if (IsStarted) - { - IsStarted = false; - LogManager.Log("External bridge scanner stopped."); - } - } - - /// - /// USB discovery thread method. - /// - private void UsbDiscoveryThreadMethod() - { - while (IsStarted) - { - foreach (var device in Transport.Components.ComPortEnumerator.EnumerateComPorts()) - { - if (device.Description.Contains(_settings.EmbeddedDeviceName) || !_settings.FilterExternalBridgeUsbMachines) - { - if (!AvailableMachines.OfType().ToList().Exists(x => x.ComPort == device.Port)) - { - LogManager.Log("Found a new machine via USB " + device.Description); - ThreadsHelper.InvokeUINow(() => - { - AvailableMachines.Add(new ExternalBridgeUsbClient(device.Port, device.Description, _settings.EmbeddedSerialBaudRate)); - }); - } - } - } - - Thread.Sleep(2000); - } - } - - /// - /// TCP discovery thread method. - /// - private void TcpDiscoveryThreadMethod() - { - while (IsStarted) - { - var ClientEp = new IPEndPoint(IPAddress.Any, 0); - var ClientRequestData = _server.Receive(ref ClientEp); - - ExternalBridgeUdpDiscoveryPacket packet = ExternalBridgeUdpDiscoveryPacket.Parser.ParseFrom(ClientRequestData); - - if (!AvailableMachines.OfType().ToList().Exists(x => x.SerialNumber == packet.SerialNumber)) - { - ExternalBridgeTcpClient newMachine = new ExternalBridgeTcpClient(packet.SerialNumber, ClientEp.Address.ToString()); - - LogManager.Log("Found a new machine via TCP " + newMachine.SerialNumber); - - ThreadsHelper.InvokeUINow(() => - { - AvailableMachines.Add(newMachine); - }); - } - - Thread.Sleep(1000); - } - } - - /// - /// Handles the available machines component state changed event. - /// - /// The sender. - /// The e. - private void Client_StateChanged(object sender, Transport.TransportComponentState e) - { - if (e == Transport.TransportComponentState.Failed || e == Transport.TransportComponentState.Disposed) - { - LogManager.Log("External bridge client failed or disposed. Removing from available machines..."); - AvailableMachines.Remove(sender as IExternalBridgeClient); - } - } - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeService.cs deleted file mode 100644 index 408ec2822..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeService.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Google.Protobuf; -using Tango.BL.Entities; -using Tango.Integration.Operation; -using Tango.PMR; -using Tango.PMR.Common; -using Tango.Transport; -using Tango.Transport.Transporters; -using Tango.PMR.Integration; -using Tango.Transport.Discovery; -using Tango.Transport.Servers; -using Tango.Transport.Adapters; - -namespace Tango.Integration.Services -{ - public class ExternalBridgeService : BasicTransporter, IExternalBridgeService - { - private UdpDiscoveryService _discoverySevice; - private TcpServer _tcpServer; - - public IMachineOperator MachineOperator { get; private set; } - - public Machine Machine { get; private set; } - - public bool IsStarted { get; private set; } - - public ExternalBridgeService(IMachineOperator machineOperator, Machine machine) - { - Machine = machine; - MachineOperator = machineOperator; - - _tcpServer = new TcpServer(1984); - _tcpServer.ClientConnected += _tcpServer_ClientConnected; - - _discoverySevice = new UdpDiscoveryService(8888, new ExternalBridgeUdpDiscoveryPacket() - { - SerialNumber = Machine.SerialNumber, - }); - } - - private async void _tcpServer_ClientConnected(object sender, ClientConnectedEventArgs e) - { - Adapter = new TcpTransportAdapter(e.Socket); - await Connect(); - } - - public void Start() - { - if (!IsStarted) - { - _tcpServer.Start(); - _discoverySevice.Start(); - - IsStarted = true; - } - } - - public void Stop() - { - if (IsStarted) - { - _tcpServer.Stop(); - _discoverySevice.Stop(); - - IsStarted = false; - } - } - - protected async override void OnRequestReceived(MessageContainer container) - { - base.OnRequestReceived(container); - - if (container.Type == MessageType.ExternalClientLoginRequest) - { - var request = MessageFactory.ParseTangoMessageFromContainer(container); - - var response = new ExternalClientLoginResponse(); - response.Authenticated = false; - - if (request.Message.Password == "1234") - { - response.Authenticated = true; - response.SerialNumber = Machine.SerialNumber; - } - - await SendResponse(response, container.Token); - } - else - { - MachineOperator.RequestTimeout = TimeSpan.FromSeconds(60); - - if (!container.Continuous) - { - var response = await MachineOperator.SendRequest(container); - await SendResponse(response); - } - else - { - MachineOperator.SendContinuousRequest(container).Subscribe((response) => - { - - SendResponse(response); - - },(ex) => - { - if (ex is ResponseErrorException) - { - SendResponse((ex as ResponseErrorException).Container); - } - }); - } - } - } - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeTcpClient.cs b/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeTcpClient.cs deleted file mode 100644 index 9dc44dbf9..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeTcpClient.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL; -using Tango.BL.Entities; -using Tango.Integration.Operation; -using Tango.PMR.Integration; -using Tango.Settings; -using Tango.Transport.Adapters; -using Tango.Transport.Transporters; - -namespace Tango.Integration.Services -{ - /// - /// Represents a secure external bridge TCP client. - /// - /// - /// - public class ExternalBridgeTcpClient : MachineOperator, IExternalBridgeSecureClient - { - private String _serialNumber; - /// - /// Gets the machine serial number. - /// - public String SerialNumber - { - get { return _serialNumber; } - set - { - _serialNumber = value; - RaisePropertyChangedAuto(); - - Machine = ObservablesEntitiesAdapter.Instance.Machines.SingleOrDefault(x => x.SerialNumber == _serialNumber); - } - } - - private String _ipAddress; - /// - /// Gets or sets the machine IP address. - /// - public String IPAddress - { - get { return _ipAddress; } - set { _ipAddress = value; RaisePropertyChangedAuto(); } - } - - /// - /// Gets a value indicating whether this client requires authentication. - /// - public bool RequiresAuthentication => true; - - /// - /// Connects the transport component. - /// - /// - public override async Task Connect() - { - await Disconnect(); - Adapter = new TcpTransportAdapter(IPAddress, SettingsManager.Default.GetOrCreate().ExternalBridgeServicePort); - await base.Connect(); - } - - /// - /// Authenticates with the service using the specified password. - /// - /// The password. - /// - public async Task Authenticate(String password) - { - var response = await SendRequest(new ExternalClientLoginRequest() - { - Password = password - }); - return response.Message.Authenticated; - } - - /// - /// Initializes a new instance of the class. - /// - /// The machine serial number. - /// The machine IP address. - public ExternalBridgeTcpClient(String serialNumber, String ipAddress) - { - SerialNumber = serialNumber; - IPAddress = ipAddress; - UseKeepAlive = true; - EnableDiagnostics = true; - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return SerialNumber; - } - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeUsbClient.cs b/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeUsbClient.cs deleted file mode 100644 index 7a901ccf2..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/ExternalBridgeUsbClient.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL; -using Tango.BL.Entities; -using Tango.Integration.Operation; -using Tango.PMR.Integration; -using Tango.Settings; -using Tango.Transport.Adapters; -using Tango.Transport.Transporters; - -namespace Tango.Integration.Services -{ - /// - /// Represents an external bridge USB client. - /// - /// - /// This isn't really an external bridge client, but merely a transporter for communicating with a Tango machine embedded device. - /// - /// - /// - public class ExternalBridgeUsbClient : MachineOperator, IExternalBridgeClient - { - private String _serialNumber; - /// - /// Gets the machine serial number. - /// - public String SerialNumber - { - get { return _serialNumber; } - set - { - _serialNumber = value; - RaisePropertyChangedAuto(); - - Machine = ObservablesEntitiesAdapter.Instance.Machines.SingleOrDefault(x => x.SerialNumber == _serialNumber); - RaisePropertyChanged(nameof(Machine)); - } - } - - private String _comPort; - /// - /// Gets or sets the serial COM port. - /// - public String ComPort - { - get { return _comPort; } - set { _comPort = value; RaisePropertyChangedAuto(); } - } - - private UsbSerialBaudRates _baudRate; - /// - /// Gets or sets the baud rate. - /// - public UsbSerialBaudRates BaudRate - { - get { return _baudRate; } - set { _baudRate = value; RaisePropertyChangedAuto(); } - } - - private String _Device; - /// - /// Gets or sets the USB device name. - /// - public String Device - { - get { return _Device; } - set { _Device = value; RaisePropertyChangedAuto(); } - } - - /// - /// Connects the transport component. - /// - /// - public override async Task Connect() - { - await Disconnect(); - Adapter = new UsbTransportAdapter(ComPort) { BaudRate = BaudRate }; - await base.Connect(); - } - - /// - /// Gets a value indicating whether this client requires authentication. - /// - public bool RequiresAuthentication => false; - - /// - /// Initializes a new instance of the class. - /// - /// The COM port. - /// The device. - public ExternalBridgeUsbClient(String comPort, String device,UsbSerialBaudRates baudRate = UsbSerialBaudRates.BR_115200) - { - ComPort = comPort; - Device = device; - BaudRate = baudRate; - UseKeepAlive = false; - EnableDiagnostics = true; - } - - /// - /// Returns a that represents this instance. - /// - /// - /// A that represents this instance. - /// - public override string ToString() - { - return Device; - } - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeClient.cs b/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeClient.cs deleted file mode 100644 index 00cfdeace..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeClient.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Sockets; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Integration.Operation; -using Tango.Transport; -using Tango.Transport.Transporters; - -namespace Tango.Integration.Services -{ - /// - /// Represents a Tango machine external bridge service client. - /// - /// - public interface IExternalBridgeClient : IMachineOperator - { - /// - /// Gets a value indicating whether this client requires authentication. - /// - bool RequiresAuthentication { get; } - - /// - /// Gets or sets the machine serial number. - /// - String SerialNumber { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeSecureClient.cs b/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeSecureClient.cs deleted file mode 100644 index 56eb1976d..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeSecureClient.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.Integration.Services -{ - /// - /// Represents a secure external bridge client which requires authentication. - /// - /// - public interface IExternalBridgeSecureClient : IExternalBridgeClient - { - /// - /// Authenticates with the service using the specified password. - /// - /// The password. - /// - Task Authenticate(String password); - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeService.cs deleted file mode 100644 index 66fab6fdc..000000000 --- a/Software/Visual_Studio/Tango.Integration/Services/IExternalBridgeService.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.Integration.Operation; -using Tango.Transport; -using Tango.Transport.Transporters; - -namespace Tango.Integration.Services -{ - public interface IExternalBridgeService : ITransporter - { - IMachineOperator MachineOperator { get; } - Machine Machine { get; } - bool IsStarted { get; } - void Start(); - void Stop(); - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj index 9e386c9c2..f5d1c587f 100644 --- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj +++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj @@ -95,14 +95,14 @@ - - - - - + + + + + - - + + -- cgit v1.3.1 From e9c55f4d18b0aac54e1a726ffca0c3c10d2c23ff Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 29 Jul 2018 13:54:10 +0300 Subject: Machine Studio v2.1.12 --- .../Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs | 2 +- .../Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs | 2 +- .../Tango.MachineStudio.Synchronization/Properties/AssemblyInfo.cs | 2 +- .../Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs | 2 +- .../Tango.MachineStudio.Common/Properties/AssemblyInfo.cs | 2 +- .../MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs | 2 +- .../PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs | 2 +- .../Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj | 4 ++-- .../Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs | 2 +- Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs | 2 +- .../Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs | 2 +- .../Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs index 309c4922e..68ae9f9bc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Data Capturing Module")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.7.1304")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs index 7b0f13657..81868f7a8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Developer Module")] -[assembly: AssemblyVersion("2.0.7.1608")] +[assembly: AssemblyVersion("2.0.8.1304")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Properties/AssemblyInfo.cs index 2370d4b01..6a34bd5ad 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Synchronization Module")] -[assembly: AssemblyVersion("2.0.6.1407")] +[assembly: AssemblyVersion("2.0.7.1304")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs index 15619a3ab..f19848756 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Technician Module")] -[assembly: AssemblyVersion("2.0.7.1608")] +[assembly: AssemblyVersion("2.0.8.1304")] [assembly: ComVisible(false)] diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs index e641c8bf3..2c48de076 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Tango - Machine Studio Common Components")] -[assembly: AssemblyVersion("2.0.12.1608")] +[assembly: AssemblyVersion("2.0.13.1304")] [assembly: ComVisible(false)] [assembly:ThemeInfo( diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index 0ed9a1eae..121d4ab07 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("2.1.11.18207")] +[assembly: AssemblyVersion("2.1.12.18210")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs index 52774bee8..89afda26c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Module")] -[assembly: AssemblyVersion("2.0.1.1407")] +[assembly: AssemblyVersion("2.0.2.1304")] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj index d0fccad96..3bbba737c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj @@ -74,7 +74,7 @@ - + GlobalVersionInfo.cs @@ -155,7 +155,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs index c72734dfe..f8ec20184 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Panel PC Common Library")] -[assembly: AssemblyVersion("2.0.6.1608")] +[assembly: AssemblyVersion("2.0.7.1304")] [assembly:ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index 1e4318ff4..71dca288e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango Panel PC Application")] -[assembly: AssemblyVersion("2.0.3.1608")] +[assembly: AssemblyVersion("2.0.4.1304")] diff --git a/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs index 4bdd97f00..fa528d630 100644 --- a/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Integration/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Logging Library")] -[assembly: AssemblyVersion("2.0.13.1411")] +[assembly: AssemblyVersion("2.0.14.1304")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs index 834fd5419..a34091bb5 100644 --- a/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Logging/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Logging Library")] -[assembly: AssemblyVersion("2.0.19.1411")] +[assembly: AssemblyVersion("2.0.20.1304")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs index 7f155cd13..ddf3cb254 100644 --- a/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.PMR/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Protobuf Message Repository")] -[assembly: AssemblyVersion("2.0.17.1608")] +[assembly: AssemblyVersion("2.0.18.1304")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs index 6dcf62316..fc6a0e393 100644 --- a/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Tango.Transport/Properties/AssemblyInfo.cs @@ -3,5 +3,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("Tango - Transport Components")] -[assembly: AssemblyVersion("2.0.13.1411")] +[assembly: AssemblyVersion("2.0.14.1304")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs index 0958ffa7d..28a6d28e0 100644 --- a/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.ILMerge.UI/Properties/AssemblyInfo.cs @@ -44,4 +44,4 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.2.1608")] +[assembly: AssemblyVersion("2.0.4.1305")] diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs index 5346a2b05..75ec7e590 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/Utilities/Tango.UITests/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.3.1608")] +[assembly: AssemblyVersion("1.0.5.1305")] [assembly: AssemblyFileVersion("1.0.0.0")] -- cgit v1.3.1