diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-19 01:45:02 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-08-19 01:45:02 +0300 |
| commit | 4e216a0ca8ad3608b845fa445b73034e1a67b8af (patch) | |
| tree | 67e0ea698cfe5a8320aa81d8c13579e8ae6a6860 /Software/Visual_Studio/PPC | |
| parent | f4c418cced4c6fb25ec5d4cb2bcb4ce0f766efd0 (diff) | |
| download | Tango-4e216a0ca8ad3608b845fa445b73034e1a67b8af.tar.gz Tango-4e216a0ca8ad3608b845fa445b73034e1a67b8af.zip | |
DB: Changed TechMonitors HeadZone5_6HeaterCurrent => HeadZone56HeaterCurrent
Working on insights and insights annotations.
Added insights events.
Added insights settings to PPC advanced settings.
Added compression support for transport adapters.
Implemented compression support on TCP/SignalR/WebRTC.
Added Compression flag to ExternalBridge discovery packet.
Added compression setting to PPC advanced settings.
Refactored transport layer to use Bson instead of Json for Generic Messages.
Added all SciChart referenced assemblies.
Registered EF Extensions license for FSE.
Added support for FSE PushTask notification cancel button.
Diffstat (limited to 'Software/Visual_Studio/PPC')
6 files changed, 44 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 4f7385513..d436c58b7 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 @@ -297,11 +297,16 @@ </DockPanel> <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> + <TextBlock VerticalAlignment="Center">External Bridge Transport Compression</TextBlock> + <touch:TouchToggleSlider IsChecked="{Binding Settings.EnableExternalBridgeTransportCompression}" 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">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}"> + <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> @@ -328,6 +333,26 @@ </touch:TouchComboBox> </DockPanel> + <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> + <TextBlock VerticalAlignment="Center">Enable Insights</TextBlock> + <touch:TouchToggleSlider IsChecked="{Binding Settings.InsightsEnabled}" 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">Insights Sampling Interval (sec)</TextBlock> + <touch:TouchNumericTextBox Minimum="1" Maximum="300" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.InsightsSamplingInterval,Converter={StaticResource TimeSpanToSecondsConverter}}" 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">Insights Storage Cleanup Interval (min)</TextBlock> + <touch:TouchNumericTextBox Minimum="5" Maximum="120" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.InsightsStorageCleanupInterval,Converter={StaticResource TimeSpanToMinutesConverter}}" 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">Insights Max Storage Duration (days)</TextBlock> + <touch:TouchNumericTextBox Minimum="5" Maximum="120" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.InsightsMaxStorageDuration,Converter={StaticResource TimeSpanToDaysConverter}}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90"></touch:TouchNumericTextBox> + </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 6eaeb58a0..236c066e3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs @@ -53,6 +53,7 @@ namespace Tango.PPC.Common.ExternalBridge applicationManager.ApplicationReady += (_, __) => { var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + EnableTransportCompression = settings.EnableExternalBridgeTransportCompression; MachineOperator = machineProvider.MachineOperator; Machine = machineProvider.Machine; SignalRConfiguration.Enabled = settings.EnableExternalBridgeSignalR; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs index 86506abcf..958c1aa12 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/FileSystem/DefaultFileSystemService.cs @@ -15,6 +15,7 @@ using Tango.Integration.Operation; using Tango.Logging; using Tango.PPC.Common.ExternalBridge; using Tango.PPC.Shared.Logs; +using Tango.Settings; using Tango.Transport; using Tango.Transport.Transporters; using Tango.WebRTC; @@ -33,6 +34,7 @@ namespace Tango.PPC.Common.FileSystem private FileSystemManager _manager; private Dictionary<String, FileSystemOperation> _operations; private Dictionary<ExternalBridgeReceiver, BasicTransporter> _webRtcClients; + private bool _enableCompression; public bool Enabled { get; set; } = true; public bool EnableWebRTC { get; set; } = true; @@ -43,6 +45,7 @@ namespace Tango.PPC.Common.FileSystem _manager = new FileSystemManager(); _operations = new Dictionary<string, FileSystemOperation>(); externalBridge.RegisterRequestHandler(this); + _enableCompression = SettingsManager.Default.GetOrCreate<PPCSettings>().EnableExternalBridgeTransportCompression; } [ExternalBridgeRequestHandlerMethod(typeof(InitWebRtcRequest), RequestHandlerLoggingMode.LogRequestNameAndContent)] @@ -66,7 +69,10 @@ namespace Tango.PPC.Common.FileSystem } LogManager.Log("Initializing WebRTC transport adapter on 'Passive' mode."); - var webRtcAdapter = new WebRtcTransportAdapter(receiver, WebRtcTransportAdapterMode.Passive, request.DataChannelName); + var webRtcAdapter = new WebRtcTransportAdapter(receiver, WebRtcTransportAdapterMode.Passive, request.DataChannelName) + { + EnableCompression = _enableCompression + }; webRtcAdapter.Ready += (x, e) => { LogManager.Log("The file system service WebRTC channel is ready."); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Insights/DefaultInsightsService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Insights/DefaultInsightsService.cs index bfbf7114f..24852d853 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Insights/DefaultInsightsService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Insights/DefaultInsightsService.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL; using Tango.Core; using Tango.Core.DI; using Tango.Insights; @@ -74,6 +75,8 @@ namespace Tango.PPC.Common.Insights { var frames = InsightsManager.Default.GetFrames(request.StartDateUTC, request.EndDateUTC); insightsFile.Frames = frames; + insightsFile.Events = InsightsManager.Default.GetEvents(request.StartDateUTC, request.EndDateUTC); + insightsFile.ToFile(filePath); }); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs index 9afbb52b6..bd21b3bb0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -61,6 +61,11 @@ namespace Tango.PPC.Common public String ExternalBridgePassword { get; set; } /// <summary> + /// Gets or sets a value indicating whether to enable transport compression for external bridge clients. + /// </summary> + public bool EnableExternalBridgeTransportCompression { get; set; } + + /// <summary> /// Gets or sets a value indicating whether [enable hot spot]. /// </summary> public bool EnableHotSpot { get; set; } @@ -296,6 +301,7 @@ namespace Tango.PPC.Common EmbeddedComPort = "COM10"; EmbeddedDeviceHint = "Tango USB Serial Port"; ExternalBridgePassword = "Aa123456"; + EnableExternalBridgeTransportCompression = true; HotSpotPassword = "Aa123456"; LockScreenTimeout = TimeSpan.FromMinutes(10); LockScreenPassword = "1111"; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index 955a584c2..806a94bb0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -54,6 +54,7 @@ <converters:DateTimeUTCToShortDateTimeConverter x:Key="DateTimeUTCToShortDateTimeConverter" /> <converters:TimeSpanToMinutesConverter x:Key="TimeSpanToMinutesConverter" /> <converters:TimeSpanToSecondsConverter x:Key="TimeSpanToSecondsConverter" /> + <converters:TimeSpanToDaysConverter x:Key="TimeSpanToDaysConverter" /> <converters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter" /> <Style TargetType="FrameworkElement"> |
