diff options
| author | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-08-30 22:05:03 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-08-30 22:05:03 +0300 |
| commit | a1d55aa060450b0a16b597794686b2aa41eea259 (patch) | |
| tree | 62dfd7829b81335103a3c2d1d17c99d8408a5e54 /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | d9d5b0161efbce3f0d44e890b435883f49df2963 (diff) | |
| download | Tango-a1d55aa060450b0a16b597794686b2aa41eea259.tar.gz Tango-a1d55aa060450b0a16b597794686b2aa41eea259.zip | |
PPC Telemetry First Integration.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
5 files changed, 503 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config index 4d7554231..53a599bee 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config @@ -84,7 +84,7 @@ <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" /> + <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> </dependentAssembly> @@ -96,6 +96,46 @@ </dependentAssembly> + <dependentAssembly> + + <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + + <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /> + + </dependentAssembly> + + <dependentAssembly> + + <assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + + </dependentAssembly> + + <dependentAssembly> + + <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + + <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> + + </dependentAssembly> + + <dependentAssembly> + + <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + + <bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" /> + + </dependentAssembly> + + <dependentAssembly> + + <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> + + <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /> + + </dependentAssembly> + </assemblyBinding> </runtime> <entityFramework> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 31c46b296..99a7e7c75 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -98,6 +98,24 @@ <Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath> </Reference> + <Reference Include="DotNetty.Buffers, Version=0.4.6.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DotNetty.Buffers.0.4.6\lib\net45\DotNetty.Buffers.dll</HintPath> + </Reference> + <Reference Include="DotNetty.Codecs, Version=0.4.6.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DotNetty.Codecs.0.4.6\lib\net45\DotNetty.Codecs.dll</HintPath> + </Reference> + <Reference Include="DotNetty.Codecs.Mqtt, Version=0.4.6.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DotNetty.Codecs.Mqtt.0.4.6\lib\net45\DotNetty.Codecs.Mqtt.dll</HintPath> + </Reference> + <Reference Include="DotNetty.Common, Version=0.4.6.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DotNetty.Common.0.4.6\lib\net45\DotNetty.Common.dll</HintPath> + </Reference> + <Reference Include="DotNetty.Handlers, Version=0.4.6.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DotNetty.Handlers.0.4.6\lib\net45\DotNetty.Handlers.dll</HintPath> + </Reference> + <Reference Include="DotNetty.Transport, Version=0.4.6.0, Culture=neutral, PublicKeyToken=bc13ca065fa06c29, processorArchitecture=MSIL"> + <HintPath>..\..\packages\DotNetty.Transport.0.4.6\lib\net45\DotNetty.Transport.dll</HintPath> + </Reference> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> </Reference> @@ -110,14 +128,84 @@ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> </Reference> + <Reference Include="Microsoft.Azure.Amqp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Azure.Amqp.2.0.6\lib\net45\Microsoft.Azure.Amqp.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Azure.Devices.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Azure.Devices.Client.1.6.0\lib\net45\Microsoft.Azure.Devices.Client.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Azure.Devices.Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Azure.Devices.Shared.1.3.0\lib\net45\Microsoft.Azure.Devices.Shared.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Data.Edm, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Data.Edm.5.6.4\lib\net40\Microsoft.Data.Edm.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Data.OData.5.6.4\lib\net40\Microsoft.Data.OData.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Data.Services.Client.5.6.4\lib\net40\Microsoft.Data.Services.Client.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.1.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Logging, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Extensions.Logging.1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.1.1\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EnterpriseLibrary.TransientFaultHandling.6.0.1304.0\lib\portable-net45+win+wp8\Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.0\lib\Microsoft.WindowsAPICodePack.dll</HintPath> </Reference> + <Reference Include="Microsoft.WindowsAzure.Storage, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\WindowsAzure.Storage.7.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="PCLCrypto, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d4421c8a4786956c, processorArchitecture=MSIL"> + <HintPath>..\..\packages\PCLCrypto.2.0.147\lib\net45\PCLCrypto.dll</HintPath> + </Reference> + <Reference Include="PInvoke.BCrypt, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\PInvoke.BCrypt.0.3.2\lib\net40\PInvoke.BCrypt.dll</HintPath> + </Reference> + <Reference Include="PInvoke.Kernel32, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\PInvoke.Kernel32.0.3.2\lib\net40\PInvoke.Kernel32.dll</HintPath> + </Reference> + <Reference Include="PInvoke.NCrypt, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\PInvoke.NCrypt.0.3.2\lib\net40\PInvoke.NCrypt.dll</HintPath> + </Reference> + <Reference Include="PInvoke.Windows.Core, Version=0.3.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\PInvoke.Windows.Core.0.3.2\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\PInvoke.Windows.Core.dll</HintPath> + </Reference> <Reference Include="SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll</HintPath> </Reference> <Reference Include="System" /> + <Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.ComponentModel.Composition" /> <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> <Reference Include="System.Data" /> <Reference Include="System.Data.SQLite, Version=1.0.108.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.108.0\lib\net46\System.Data.SQLite.dll</HintPath> @@ -131,7 +219,78 @@ <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.108.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath> <Private>True</Private> </Reference> + <Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath> + </Reference> <Reference Include="System.Drawing" /> + <Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.IO.Compression.FileSystem" /> + <Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath> + </Reference> + <Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Numerics" /> + <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="System.Spatial, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Spatial.5.6.4\lib\net40\System.Spatial.dll</HintPath> + </Reference> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath> @@ -141,10 +300,17 @@ <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="System.Net.Http" /> <Reference Include="System.Xaml"> <RequiredTargetFramework>4.0</RequiredTargetFramework> </Reference> + <Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath> + <Private>True</Private> + <Private>True</Private> + </Reference> + <Reference Include="Validation, Version=2.2.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Validation.2.2.8\lib\dotnet\Validation.dll</HintPath> + </Reference> <Reference Include="WindowsBase" /> <Reference Include="PresentationCore" /> <Reference Include="PresentationFramework" /> @@ -288,6 +454,7 @@ <Compile Include="PPCApplication\DefaultPPCApplicationManager.cs" /> <Compile Include="Printing\DefaultPrintingManager.cs" /> <Compile Include="RemoteActions\DefaultRemoteActionsService.cs" /> + <Compile Include="Telemetry\DefaultTelemetryProvider.cs" /> <Compile Include="Threading\DefaultDispatcherProvider.cs" /> <Compile Include="ThreadLoading\DefaultThreadLoadingService.cs" /> <Compile Include="ViewModelLocator.cs" /> @@ -707,7 +874,9 @@ </None> </ItemGroup> <ItemGroup> - <None Include="App.config" /> + <None Include="App.config"> + <SubType>Designer</SubType> + </None> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj"> @@ -778,6 +947,10 @@ <Project>{e1e66ed9-597d-45fa-8048-de90a6930484}</Project> <Name>Tango.SQLExaminer</Name> </ProjectReference> + <ProjectReference Include="..\..\Tango.Telemetry\Tango.Telemetry.csproj"> + <Project>{af593663-d4e9-4a14-a3f2-fea57f30e9e6}</Project> + <Name>Tango.Telemetry</Name> + </ProjectReference> <ProjectReference Include="..\..\Tango.TFS\Tango.TFS.csproj"> <Project>{998f8471-dc1b-41b6-9d96-354e1b4e7a32}</Project> <Name>Tango.TFS</Name> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Telemetry/DefaultTelemetryProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Telemetry/DefaultTelemetryProvider.cs new file mode 100644 index 000000000..04837bb38 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Telemetry/DefaultTelemetryProvider.cs @@ -0,0 +1,209 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Core.DI; +using Tango.PPC.Common; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Connection; +using Tango.PPC.Common.Telemetry; +using Tango.PPC.Common.Web; +using Tango.Settings; +using Tango.Telemetry; +using Tango.Telemetry.Destinations; +using Tango.Telemetry.Helpers; +using Tango.Telemetry.Sources; + +namespace Tango.PPC.UI.Telemetry +{ + [TangoCreateWhenRegistered] + public class DefaultTelemetryProvider : ITelemetryProvider, ITelemetryCheckpointsRecoveryClient + { + private PPCWebClient _webClient; + private Machine _machine; + private IMachineProvider _machineProvider; + private PPCSettings _ppcSettings; + + public TelemetrySettings Settings { get; set; } + + public ITelemetryPublisher TelemetryPublisher { get; set; } + + public DefaultTelemetryProvider(IPPCApplicationManager applicationManager, IMachineProvider machineProvider, PPCWebClient webClient) + { + Settings = SettingsManager.Default.GetOrCreate<TelemetrySettings>(); + applicationManager.ApplicationReady += ApplicationManager_ApplicationReady; + _webClient = webClient; + _machineProvider = machineProvider; + } + + private void ApplicationManager_ApplicationReady(object sender, EventArgs e) + { + try + { + if (Settings.Enable) + { + Init(); + } + } + catch { } + } + + private void Init() + { + if (_machineProvider.Machine == null) return; + + _machine = _machineProvider.Machine; + + _ppcSettings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var site = db.Sites.FirstOrDefault(x => x.Guid == _machine.SiteGuid); + + TelemetryPublisher = new TelemetryPublisher(new TelemetryPublisherConfiguration() + { + Environment = _ppcSettings.DeploymentSlot.ToString(), + Organization = _machine.Organization.Name, + Site = site?.Name, + SerialNumber = _machine.SerialNumber, + MachineType = _machine.Type, + EnableBackoff = Settings.EnableBackoff, + HistorySourcesRequestInterval = Settings.HistorySourcesRequestInterval, + MaxExponentialBackoff = Settings.MaxExponentialBackoff, + PendingStorageCheckInterval = Settings.PendingStorageCheckInterval, + }, this); + + (TelemetryPublisher.StorageManager as TelemetryLiteDBStorageManager).EnableCheckPointsRecovery = true; + (TelemetryPublisher.StorageManager as TelemetryLiteDBStorageManager).EnforceCheckpointsRecovery = true; + } + + InternetConnectivity.EnsureStarted(); + + Task.Factory.StartNew(async () => + { + while (!InternetConnectivity.IsInternetAvailable()) + { + Thread.Sleep(5000); + } + + if (!_webClient.IsAuthenticated) + { + await _webClient.Login(new LoginRequest() { Mode = LoginMode.Machine, SerialNumber = _machine.SerialNumber, MachineGuid = _machine.Guid }); + } + + var response = await _webClient.GetTelemetryDeviceConnection(new TelemetryDeviceRegistrationRequest()); + Settings.IoTHubConnectionString = response.ConnectionString; + Settings.Save(); + + if (Settings.EnableIoTHub) + { + TelemetryPublisher.RegisterDestination(new TelemetryAzureHubDestination(Settings.IoTHubConnectionString)); + } + + if (Settings.EnableMqtt) + { + TelemetryPublisher.RegisterDestination(new TelemetryMqttDestination($"Twine {_machine.SerialNumber}")); + } + + if (Settings.SendDiagnostics) + { + TelemetryPublisher.RegisterSource(new TelemetryDiagnosticsStreamingSource(_machineProvider.MachineOperator) + { + Config = new TelemetryDiagnosticsStreamingSourceConfig() + { + DiagnosticsSamplingInterval = Settings.DiagnosticsSamplingInterval, + } + }); + } + + if (Settings.SendEvents) + { + TelemetryPublisher.RegisterSource(new TelemetryEventsStreamingSource(_machineProvider.MachineOperator)); + } + + if (Settings.SendJobRuns) + { + TelemetryPublisher.RegisterSource(new TelemetryJobRunsStreamingSource(_machineProvider.MachineOperator)); + } + + if (Settings.SendJobRunsHistory) + { + TelemetryPublisher.RegisterSource(new TelemetryJobRunsHistorySource() { Config = new TelemetryJobRunsHistorySourceConfig() { MaxJobRunsPerRequest = 10 } }); + } + + if (Settings.SendJobStatus) + { + TelemetryPublisher.RegisterSource(new TelemetryJobStatusSource(_machineProvider.MachineOperator)); + } + + if (Settings.SendLogs) + { + TelemetryPublisher.RegisterSource(new TelemetryLogsStreamingSource(_machineProvider.MachineOperator) + { + Config = new TelemetryLogsStreamingSourceConfig() + { + Categories = Settings.LogCategories + } + }); + } + + if (Settings.SendMachineStatus) + { + TelemetryPublisher.RegisterSource(new TelemetryMachineStatusStreamingSource(_machineProvider.MachineOperator)); + } + + if (Settings.SendMachineUpdates) + { + TelemetryPublisher.RegisterSource(new TelemetryMachineUpdatesStreamingSource()); + } + + if (Settings.SendMachineUpdatesHistory) + { + TelemetryPublisher.RegisterSource(new TelemetryMachineUpdatesHistorySource()); + } + + if (Settings.SendWires) + { + TelemetryPublisher.RegisterSource(new TelemetryWireStreamingSource(_machineProvider.MachineOperator)); + } + + await TelemetryPublisher.Start(); + }); + } + + public async Task<List<TelemetryHistorySourceCheckPoint>> GetCheckpointsBackup() + { + var response = await _webClient.GetTelemetryCheckPoints(new TelemetryGetCheckPointsRequest()); + return response.Checkpoints + .Select(x => new TelemetryHistorySourceCheckPoint() + { + SourceName = x.SourceName, + Time = x.Time, + TotalCount = x.TotalCount + }) + .ToList(); + } + + public async Task SaveCheckpointsBackup(List<TelemetryHistorySourceCheckPoint> checkPoints) + { + await _webClient.SetTelemetryCheckPoints(new TelemetrySetCheckPointsRequest() + { + Checkpoints = checkPoints.Select(x => new TelemetryCheckPoint() + { + SourceName = x.SourceName, + Time = x.Time, + TotalCount = x.TotalCount + }).ToList() + }); + } + + public void Dispose() + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index 340ecb13e..56a8b4a2b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -40,6 +40,7 @@ using Tango.PPC.Common.Statistics; using Tango.PPC.Common.Storage; using Tango.PPC.Common.Synchronization; using Tango.PPC.Common.SystemInfo; +using Tango.PPC.Common.Telemetry; using Tango.PPC.Common.Threading; using Tango.PPC.Common.ThreadLoading; using Tango.PPC.Common.UpdatePackages; @@ -54,6 +55,7 @@ using Tango.PPC.UI.Notifications; using Tango.PPC.UI.PPCApplication; using Tango.PPC.UI.Printing; using Tango.PPC.UI.RemoteActions; +using Tango.PPC.UI.Telemetry; using Tango.PPC.UI.Threading; using Tango.PPC.UI.ThreadLoading; using Tango.PPC.UI.ViewModels; @@ -118,6 +120,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Unregister<IStatisticsService>(); TangoIOC.Default.Unregister<IJobResumeManager>(); TangoIOC.Default.Unregister<ISMSNotificationProvider>(); + TangoIOC.Default.Unregister<ITelemetryProvider>(); if (App.StartupArgs != null && App.StartupArgs.Contains("-webDebug")) { @@ -175,6 +178,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Register<IStatisticsService, DefaultStatisticsService>(); TangoIOC.Default.Register<IJobResumeManager, DefaultJobResumeManager>(); TangoIOC.Default.Register<ISMSNotificationProvider, DefaultSMSNotificationProvider>(); + TangoIOC.Default.Register<ITelemetryProvider, DefaultTelemetryProvider>(); TangoIOC.Default.Register<LoadingViewVM>(); TangoIOC.Default.Register<MainViewVM>(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config index 9e3e48198..59e20edb2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config @@ -1,15 +1,89 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="ControlzEx" version="3.0.2.4" targetFramework="net46" /> + <package id="DotNetty.Buffers" version="0.4.6" targetFramework="net461" /> + <package id="DotNetty.Codecs" version="0.4.6" targetFramework="net461" /> + <package id="DotNetty.Codecs.Mqtt" version="0.4.6" targetFramework="net461" /> + <package id="DotNetty.Common" version="0.4.6" targetFramework="net461" /> + <package id="DotNetty.Handlers" version="0.4.6" targetFramework="net461" /> + <package id="DotNetty.Transport" version="0.4.6" targetFramework="net461" /> + <package id="EnterpriseLibrary.TransientFaultHandling" version="6.0.1304.0" targetFramework="net461" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" /> <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" /> <package id="Google.Protobuf" version="3.4.1" targetFramework="net46" /> + <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" /> + <package id="Microsoft.Azure.Amqp" version="2.0.6" targetFramework="net461" /> + <package id="Microsoft.Azure.Devices.Client" version="1.6.0" targetFramework="net461" /> + <package id="Microsoft.Azure.Devices.Shared" version="1.3.0" targetFramework="net461" /> + <package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net461" /> + <package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net461" /> + <package id="Microsoft.Data.OData" version="5.6.4" targetFramework="net461" /> + <package id="Microsoft.Data.Services.Client" version="5.6.4" targetFramework="net461" /> + <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.1.0" targetFramework="net461" /> + <package id="Microsoft.Extensions.Logging" version="1.1.1" targetFramework="net461" /> + <package id="Microsoft.Extensions.Logging.Abstractions" version="1.1.1" targetFramework="net461" /> + <package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net461" /> + <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" /> <package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.0" targetFramework="net461" /> + <package id="NETStandard.Library" version="1.6.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> + <package id="PCLCrypto" version="2.0.147" targetFramework="net461" /> + <package id="PInvoke.BCrypt" version="0.3.2" targetFramework="net461" /> + <package id="PInvoke.Kernel32" version="0.3.2" targetFramework="net461" /> + <package id="PInvoke.NCrypt" version="0.3.2" targetFramework="net461" /> + <package id="PInvoke.Windows.Core" version="0.3.2" targetFramework="net461" /> <package id="SimpleValidator" version="0.6.1.0" targetFramework="net46" /> + <package id="System.AppContext" version="4.3.0" targetFramework="net461" /> + <package id="System.Collections" version="4.3.0" targetFramework="net461" /> + <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" /> + <package id="System.ComponentModel" version="4.3.0" targetFramework="net461" /> + <package id="System.Console" version="4.3.0" targetFramework="net461" /> <package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net46" /> <package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net46" /> <package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net46" /> <package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net46" /> + <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" /> + <package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net461" /> + <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" /> + <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" /> + <package id="System.Globalization" version="4.3.0" targetFramework="net461" /> + <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net461" /> + <package id="System.IO" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.Compression" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" /> + <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.Linq" version="4.3.0" targetFramework="net461" /> + <package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" /> + <package id="System.Net.Http" version="4.3.0" targetFramework="net461" /> + <package id="System.Net.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.Net.Sockets" version="4.3.0" targetFramework="net461" /> + <package id="System.ObjectModel" version="4.3.0" targetFramework="net461" /> + <package id="System.Reflection" version="4.3.0" targetFramework="net461" /> + <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" /> + <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.Handles" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" /> + <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" /> + <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" /> + <package id="System.Spatial" version="5.6.4" targetFramework="net461" /> + <package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" /> + <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" /> + <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" /> + <package id="System.Threading" version="4.3.0" targetFramework="net461" /> + <package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" /> + <package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" /> + <package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net461" /> + <package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" /> + <package id="Validation" version="2.2.8" targetFramework="net461" /> + <package id="WindowsAzure.Storage" version="7.0.0" targetFramework="net461" /> <package id="WPFMediaKit" version="2.2.0" targetFramework="net461" /> </packages>
\ No newline at end of file |
