diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-01-27 00:51:16 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-01-27 00:51:16 +0200 |
| commit | bf2f3245339b9fd9148a2ad25b5ba3320e970cc1 (patch) | |
| tree | cb6cc6d0aec317e4f9727aa4294edf65ccc21a85 /Software/Visual_Studio/PPC | |
| parent | 85aef997b7aeedd617da9f195903ed43f94fbed7 (diff) | |
| download | Tango-bf2f3245339b9fd9148a2ad25b5ba3320e970cc1.tar.gz Tango-bf2f3245339b9fd9148a2ad25b5ba3320e970cc1.zip | |
Added TCP write mode setting to MS settings.
Added External Bridge TCP and SignalR settings to advanced settings on PPC.
Added FailsWithAdapter to ExternalBridgeReceiver.
Added TCP write mode to ExternalBridgeService.
Added some error handling on ExternalBridgeService SignalR.
Diffstat (limited to 'Software/Visual_Studio/PPC')
3 files changed, 47 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index 5f453c874..a271eda19 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -5,9 +5,12 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" + xmlns:sys="clr-namespace:System.Collections;assembly=mscorlib" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.PPC.MachineSettings.ViewModels" xmlns:connectivity="clr-namespace:Tango.PPC.Common.Connectivity;assembly=Tango.PPC.Common" + xmlns:adapters="clr-namespace:Tango.Transport.Adapters;assembly=Tango.Transport" xmlns:global="clr-namespace:Tango.PPC.MachineSettings" xmlns:local="clr-namespace:Tango.PPC.MachineSettings.Views" mc:Ignorable="d" @@ -294,10 +297,32 @@ </DockPanel> <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> + <TextBlock VerticalAlignment="Center">Enable External Bridge SignalR</TextBlock> + <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableExternalBridgeSignalR}" Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90"></touch:TouchToggleSlider> + </DockPanel> + + <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> + <TextBlock VerticalAlignment="Center">External Bridge SignalR Hub</TextBlock> + <touch:TouchTextBox KeyboardContainer="{Binding ElementName=Container}" Text="{Binding Settings.ExternalBridgeSignalRHub}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="Auto" MinWidth="90"></touch:TouchTextBox> + </DockPanel> + + <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> <TextBlock VerticalAlignment="Center">Gradient Resolution CM</TextBlock> <touch:TouchNumericTextBox Minimum="10" Maximum="500" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.GradientGenerationResolution}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox> </DockPanel> + <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> + <TextBlock VerticalAlignment="Center">TCP Adapter Write Mode</TextBlock> + <touch:TouchComboBox keyboard:KeyboardView.Container="{Binding ElementName=Container}" SelectedItem="{Binding Settings.TcpTransportAdapterWriteMode}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"> + <touch:TouchComboBox.ItemsSource> + <sys:ArrayList> + <x:Static Member="adapters:TcpTransportAdapterWriteMode.Interval"/> + <x:Static Member="adapters:TcpTransportAdapterWriteMode.Direct"/> + </sys:ArrayList> + </touch:TouchComboBox.ItemsSource> + </touch:TouchComboBox> + </DockPanel> + <DockPanel Margin="0 20 0 0"> <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon> <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs index ae4f7432e..4bf9819b8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs @@ -33,7 +33,8 @@ namespace Tango.PPC.Common.ExternalBridge var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); MachineOperator = machineProvider.MachineOperator; Machine = machineProvider.Machine; - SignalRConfiguration.Enabled = true; + SignalRConfiguration.Enabled = settings.EnableExternalBridgeSignalR; + TcpTransportAdapterWriteMode = settings.TcpTransportAdapterWriteMode; if (Environment.CommandLine.Contains("-webDebug")) { SignalRConfiguration.Address = "http://localhost:1111/"; //settings.DeploymentSlot.ToAddress(); @@ -42,7 +43,7 @@ namespace Tango.PPC.Common.ExternalBridge { SignalRConfiguration.Address = settings.DeploymentSlot.ToAddress(); } - SignalRConfiguration.Hub = "ExternalBridgeHub"; + SignalRConfiguration.Hub = settings.ExternalBridgeSignalRHub; Enabled = settings.EnableExternalBridge; }; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs index 3f11aaa13..bea67c702 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -9,6 +9,7 @@ using Tango.Integration.Operation; using Tango.Logging; using Tango.PMR.Printing; using Tango.Settings; +using Tango.Transport.Adapters; using Tango.Web; namespace Tango.PPC.Common @@ -230,6 +231,21 @@ namespace Tango.PPC.Common public bool EnableEmbeddedDebugLogs { get; set; } /// <summary> + /// Gets or sets the TCP transport adapter write mode. + /// </summary> + public TcpTransportAdapterWriteMode TcpTransportAdapterWriteMode { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether to expose the external bridge service via SignalR. + /// </summary> + public bool EnableExternalBridgeSignalR { get; set; } + + /// <summary> + /// Gets or sets the name of the exteral bridge SignalR hub. + /// </summary> + public String ExternalBridgeSignalRHub { get; set; } + + /// <summary> /// Gets the machine service address. /// </summary> /// <returns></returns> @@ -274,6 +290,9 @@ namespace Tango.PPC.Common EnableAutomaticThreadLoading = true; DisplayAutomaticThreadLoadingScreen = true; EnableEmbeddedDebugLogs = true; + TcpTransportAdapterWriteMode = TcpTransportAdapterWriteMode.Interval; + EnableExternalBridgeSignalR = true; + ExternalBridgeSignalRHub = "ExternalBridgeHub"; } } } |
