From 3f9ce854b813fc109fbe5e531e9bb8e6276b3f90 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 17 Oct 2018 10:44:20 +0300 Subject: Users & Roles fix. Applied missing logs for bug report in MS. Applied proofing for UsbSerialAdapter connect/disconnect when port is freezing. --- .../MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') 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 b3d896d53..bbd621e65 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -796,6 +796,7 @@ namespace Tango.MachineStudio.UI.ViewModels } catch (Exception ex) { + LogManager.Log(ex, "Error while trying to upload bug report."); _notificationProvider.ShowError("An error occurred while trying to create the issue." + Environment.NewLine + ex.Message); } } @@ -819,6 +820,7 @@ namespace Tango.MachineStudio.UI.ViewModels } catch (Exception ex) { + LogManager.Log(ex, $"Error while trying to approve resolved bug '{item.ID}'."); _notificationProvider.ShowError("An error occurred while trying to update the issue." + Environment.NewLine + ex.Message); } vm.IsAvailable = true; @@ -840,6 +842,7 @@ namespace Tango.MachineStudio.UI.ViewModels } catch (Exception ex) { + LogManager.Log(ex, $"Error while trying to decline resolved bug '{item.ID}'."); _notificationProvider.ShowError("An error occurred while trying to update the issue." + Environment.NewLine + ex.Message); } -- cgit v1.3.1 From 58762e977fe0fcd2340e36b36938cdaadf5302e9 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 18 Oct 2018 11:36:44 +0300 Subject: Implemented main window last module loading. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 15400960 -> 15400960 bytes .../MachineStudioSettings.cs | 7 ++++- .../DefaultStudioApplicationManager.cs | 4 +++ .../Tango.MachineStudio.UI.csproj | 2 +- .../ViewModels/MainViewVM.cs | 35 ++++++++++++++++++--- .../Tango.MachineStudio.UI/Views/MainView.xaml | 2 +- 7 files changed, 42 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 888216788..c3c64c089 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 28ad0f399..76459b263 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index 22ed1a33d..06d5d44c5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -74,10 +74,15 @@ namespace Tango.MachineStudio.Common public bool UseExternalBridgeEmulator { get; set; } /// - /// Gets or sets the studio modules bounds. + /// Gets or sets the last bounds of modules open windows. /// public List StudioModulesBounds { get; set; } + /// + /// Gets or sets the last module that was opened in the main window. + /// + public String LastMainModuleName { get; set; } + /// /// Initializes a new instance of the class. /// 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 e6c687b92..8be7f486a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -217,6 +217,10 @@ namespace Tango.MachineStudio.UI.StudioApplication }); } + var mainViewVM = TangoIOC.Default.GetInstance(); + + settings.LastMainModuleName = mainViewVM.CurrentModule != null ? mainViewVM.CurrentModule.Name : null; + try { SettingsManager.Default.Save(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 39f748ceb..4fb14ba47 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -591,7 +591,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta - + \ No newline at end of file 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 bbd621e65..49a8ca807 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -66,6 +66,13 @@ namespace Tango.MachineStudio.UI.ViewModels set { _currentModule = value; RaisePropertyChangedAuto(); } } + private bool _isApplicationReady; + public bool IsApplicationReady + { + get { return _isApplicationReady; } + set { _isApplicationReady = value; RaisePropertyChangedAuto(); } + } + private bool _isModuleLoaded; /// /// Gets or sets a value indicating whether any module is loaded at the moment. @@ -651,9 +658,10 @@ namespace Tango.MachineStudio.UI.ViewModels m.IsLoaded = false; } + CurrentModule = module; + if (module != null) { - CurrentModule = module; CurrentModule.IsLoaded = true; IsModuleLoaded = true; @@ -868,14 +876,31 @@ namespace Tango.MachineStudio.UI.ViewModels public override void OnApplicationReady() { - foreach (var item in SettingsManager.Default.GetOrCreate().StudioModulesBounds) + if (!IsApplicationReady) { - var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name); + var settings = SettingsManager.Default.GetOrCreate(); + + foreach (var item in settings.StudioModulesBounds) + { + var module = StudioModuleLoader.AllModules.SingleOrDefault(x => x.Name == item.Name); + + if (module != null && !module.InNewWindow) + { + OpenModuleInWindow(module, item.Bounds, item.State); + } + } - if (module != null && !module.InNewWindow) + if (settings.LastMainModuleName != null) { - OpenModuleInWindow(module, item.Bounds, item.State); + var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName); + + if (m != null) + { + StartModule(m); + } } + + IsApplicationReady = true; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 977cdb9f5..7edfa50c6 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -412,7 +412,7 @@ - + -- cgit v1.3.1 From eed57807589a6de896c27e988e2d0e8d1358faa4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 23 Oct 2018 15:41:42 +0300 Subject: Added storage api proto files. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 15400960 -> 15400960 bytes .../com.google.eclipse.protobuf.Protobuf.prefs | 2 +- Software/PMR/Messages/Common/MessageType.proto | 8 + Software/PMR/Messages/IO/CreateRequest.proto | 12 + Software/PMR/Messages/IO/CreateResponse.proto | 9 + Software/PMR/Messages/IO/DeleteRequest.proto | 9 + Software/PMR/Messages/IO/DeleteResponse.proto | 9 + Software/PMR/Messages/IO/FileAttribute.proto | 15 + Software/PMR/Messages/IO/FileInfo.proto | 16 ++ Software/PMR/Messages/IO/GetFilesRequest.proto | 9 + Software/PMR/Messages/IO/GetFilesResponse.proto | 11 + .../PMR/Messages/IO/GetStorageInfoRequest.proto | 10 + .../PMR/Messages/IO/GetStorageInfoResponse.proto | 9 + .../Properties/AssemblyInfo.cs | 2 +- .../ViewModels/MachineConnectionViewVM.cs | 33 +++ .../ViewModels/MainViewVM.cs | 62 +++-- .../Views/MachineConnectionView.xaml | 32 ++- .../Tango.Integration/Operation/StorageManager.cs | 144 ++++++++++ .../Tango.Integration/Tango.Integration.csproj | 3 +- .../Visual_Studio/Tango.PMR/Common/MessageType.cs | 18 +- .../Visual_Studio/Tango.PMR/IO/CreateRequest.cs | 188 +++++++++++++ .../Visual_Studio/Tango.PMR/IO/CreateResponse.cs | 130 +++++++++ .../Visual_Studio/Tango.PMR/IO/DeleteRequest.cs | 159 +++++++++++ .../Visual_Studio/Tango.PMR/IO/DeleteResponse.cs | 130 +++++++++ .../Visual_Studio/Tango.PMR/IO/FileAttribute.cs | 52 ++++ Software/Visual_Studio/Tango.PMR/IO/FileInfo.cs | 302 +++++++++++++++++++++ .../Visual_Studio/Tango.PMR/IO/GetFilesRequest.cs | 159 +++++++++++ .../Visual_Studio/Tango.PMR/IO/GetFilesResponse.cs | 152 +++++++++++ .../Tango.PMR/IO/GetStorageInfoRequest.cs | 188 +++++++++++++ .../Tango.PMR/IO/GetStorageInfoResponse.cs | 131 +++++++++ Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj | 12 +- 32 files changed, 1970 insertions(+), 46 deletions(-) create mode 100644 Software/PMR/Messages/IO/CreateRequest.proto create mode 100644 Software/PMR/Messages/IO/CreateResponse.proto create mode 100644 Software/PMR/Messages/IO/DeleteRequest.proto create mode 100644 Software/PMR/Messages/IO/DeleteResponse.proto create mode 100644 Software/PMR/Messages/IO/FileAttribute.proto create mode 100644 Software/PMR/Messages/IO/FileInfo.proto create mode 100644 Software/PMR/Messages/IO/GetFilesRequest.proto create mode 100644 Software/PMR/Messages/IO/GetFilesResponse.proto create mode 100644 Software/PMR/Messages/IO/GetStorageInfoRequest.proto create mode 100644 Software/PMR/Messages/IO/GetStorageInfoResponse.proto create mode 100644 Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/CreateRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/CreateResponse.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/DeleteRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/DeleteResponse.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/FileAttribute.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/FileInfo.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/GetFilesRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/GetFilesResponse.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index b0688ab3a..612f1a5ad 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 8a39b9fa7..eeb01f600 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs b/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs index 07b0fe894..5b666a0bb 100644 --- a/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs +++ b/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs @@ -1,4 +1,4 @@ eclipse.preferences.version=1 -paths.directoryPaths=${workspace_loc\:/${project}/Common},${workspace_loc\:/${project}/Jobs},${workspace_loc\:/${project}/Printing},${workspace_loc\:/${project}/ColorLab},${workspace_loc\:/${project}/Diagnostics},${workspace_loc\:/${project}/Debugging},${workspace_loc\:/${project}/Hardware},${workspace_loc\:/${project}/Embroidery},${workspace_loc\:/${project}/Connection},${workspace_loc\:/${project}/Integration} +paths.directoryPaths=${workspace_loc\:/${project}/Common},${workspace_loc\:/${project}/Jobs},${workspace_loc\:/${project}/Printing},${workspace_loc\:/${project}/ColorLab},${workspace_loc\:/${project}/Diagnostics},${workspace_loc\:/${project}/Debugging},${workspace_loc\:/${project}/Hardware},${workspace_loc\:/${project}/Embroidery},${workspace_loc\:/${project}/Connection},${workspace_loc\:/${project}/Integration},${workspace_loc\:/${project}/IO} paths.filesInMultipleDirectories=true paths.filesInOneDirectoryOnly=false diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index 55524dffc..c19bbc2d8 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -209,4 +209,12 @@ enum MessageType ExecuteProcessResponse = 7005; KillProcessRequest = 7006; KillProcessResponse = 7007; + CreateRequest = 7008; + CreateResponse = 7009; + DeleteRequest = 7010; + DeleteResponse = 7011; + GetStorageInfoRequest = 7012; + GetStorageInfoResponse = 7013; + GetFilesRequest = 7014; + GetFilesResponse = 7015; } diff --git a/Software/PMR/Messages/IO/CreateRequest.proto b/Software/PMR/Messages/IO/CreateRequest.proto new file mode 100644 index 000000000..236ec7f2b --- /dev/null +++ b/Software/PMR/Messages/IO/CreateRequest.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +import "FileAttribute.proto"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message CreateRequest +{ + FileAttribute Attribute = 1; + string Path = 2; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/CreateResponse.proto b/Software/PMR/Messages/IO/CreateResponse.proto new file mode 100644 index 000000000..afaa2c430 --- /dev/null +++ b/Software/PMR/Messages/IO/CreateResponse.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message CreateResponse +{ + +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/DeleteRequest.proto b/Software/PMR/Messages/IO/DeleteRequest.proto new file mode 100644 index 000000000..c385910f1 --- /dev/null +++ b/Software/PMR/Messages/IO/DeleteRequest.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message DeleteRequest +{ + string Path = 2; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/DeleteResponse.proto b/Software/PMR/Messages/IO/DeleteResponse.proto new file mode 100644 index 000000000..76b0285ec --- /dev/null +++ b/Software/PMR/Messages/IO/DeleteResponse.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message DeleteResponse +{ + +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/FileAttribute.proto b/Software/PMR/Messages/IO/FileAttribute.proto new file mode 100644 index 000000000..baec75401 --- /dev/null +++ b/Software/PMR/Messages/IO/FileAttribute.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +enum FileAttribute +{ + Unspecified = 0; + Archive = 0x20; + Directory = 0x10; + Hidden = 0x02; + ReadOnly = 0x01; + System = 0x04; + VolumeLabel = 0x08; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/FileInfo.proto b/Software/PMR/Messages/IO/FileInfo.proto new file mode 100644 index 000000000..0a6581d02 --- /dev/null +++ b/Software/PMR/Messages/IO/FileInfo.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +import "FileAttribute.proto"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message FileInfo +{ + string Name = 1; + string FullPath = 2; + int32 Length = 3; + int32 LastModifiedDate = 4; + int32 LastModifiedTime = 5; + FileAttribute Attribute = 6; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/GetFilesRequest.proto b/Software/PMR/Messages/IO/GetFilesRequest.proto new file mode 100644 index 000000000..b9ae3b77b --- /dev/null +++ b/Software/PMR/Messages/IO/GetFilesRequest.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message GetFilesRequest +{ + string Path = 2; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/GetFilesResponse.proto b/Software/PMR/Messages/IO/GetFilesResponse.proto new file mode 100644 index 000000000..c8cf50d60 --- /dev/null +++ b/Software/PMR/Messages/IO/GetFilesResponse.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +import "FileInfo.proto"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message GetFilesResponse +{ + repeated FileInfo Items = 1; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/GetStorageInfoRequest.proto b/Software/PMR/Messages/IO/GetStorageInfoRequest.proto new file mode 100644 index 000000000..edd287cc8 --- /dev/null +++ b/Software/PMR/Messages/IO/GetStorageInfoRequest.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message GetStorageInfoRequest +{ + int32 Capacity = 1; + int32 FreeSpace = 2; +} \ No newline at end of file diff --git a/Software/PMR/Messages/IO/GetStorageInfoResponse.proto b/Software/PMR/Messages/IO/GetStorageInfoResponse.proto new file mode 100644 index 000000000..80ef374bf --- /dev/null +++ b/Software/PMR/Messages/IO/GetStorageInfoResponse.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.IO; +option java_package = "com.twine.tango.pmr.io"; + +message GetStorageInfoResponse +{ + +} \ 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 d4690c6b5..908a9fd38 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("3.5.52.18238")] +[assembly: AssemblyVersion("3.5.53.18238")] [assembly: ComVisible(false)] \ No newline at end of file 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 51b7168ed..7737911e0 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs @@ -52,6 +52,8 @@ namespace Tango.MachineStudio.UI.ViewModels /// The scanner. public MachineConnectionViewVM(ExternalBridgeScanner scanner) { + EnableDiagnostics = true; + UploadHardwareConfiguration = true; Scanner = scanner; ConnectCommand = new RelayCommand(Connect, (x) => SelectedMachine != null); } @@ -97,5 +99,36 @@ namespace Tango.MachineStudio.UI.ViewModels Scanner.AvailableMachines.Add(_emulator); Scanner.Start(); } + + private bool _enableDiagnostics; + /// + /// Gets or sets a value indicating whether to enable diagnostics after connection. + /// + public bool EnableDiagnostics + { + get { return _enableDiagnostics; } + set { _enableDiagnostics = value; RaisePropertyChangedAuto(); } + } + + private bool _uploadHardwareConfiguration; + /// + /// Gets or sets a value indicating whether to upload hardware configuration after connection. + /// + public bool UploadHardwareConfiguration + { + get { return _uploadHardwareConfiguration; } + set { _uploadHardwareConfiguration = value; RaisePropertyChangedAuto(); } + } + + private bool _enableKeepAlive; + /// + /// Gets or sets a value indicating whether to use the keep alive mechanism. + /// + public bool EnableKeepAlive + { + get { return _enableKeepAlive; } + set { _enableKeepAlive = value; RaisePropertyChangedAuto(); } + } + } } 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 49a8ca807..9b625a6ee 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -445,6 +445,11 @@ namespace Tango.MachineStudio.UI.ViewModels } } + x.SelectedMachine.EnableDiagnostics = x.EnableDiagnostics; + x.SelectedMachine.EnableEmbeddedDebugging = x.EnableDiagnostics; + x.SelectedMachine.EnableEventsNotification = x.EnableDiagnostics; + x.SelectedMachine.UseKeepAlive = x.EnableKeepAlive; + if (x.SelectedMachine.RequiresAuthentication) { _notificationProvider.ShowModalDialog(async (login) => @@ -453,11 +458,6 @@ namespace Tango.MachineStudio.UI.ViewModels { try { - if (x.SelectedMachine.EnableDiagnostics) - { - x.SelectedMachine.EnableEmbeddedDebugging = true; - } - await x.SelectedMachine.As().Connect(new PMR.Integration.ExternalBridgeLoginRequest() { AppID = "Machine Studio", @@ -479,6 +479,11 @@ namespace Tango.MachineStudio.UI.ViewModels PostMessage(new MachineConnectionChangedMessage() { Machine = x.SelectedMachine }); _eventLogger.Log(String.Format("Successfully connected to machine {0} via TCP", x.SelectedMachine.SerialNumber)); + if (x.UploadHardwareConfiguration) + { + UploadHardwareConfiguration(); + } + } catch (ResponseErrorException ex) { @@ -507,11 +512,6 @@ namespace Tango.MachineStudio.UI.ViewModels { try { - if (x.SelectedMachine.EnableDiagnostics) - { - x.SelectedMachine.EnableEmbeddedDebugging = true; - } - await x.SelectedMachine.Connect(); x.SelectedMachine.SerialNumber = vm.SelectedMachine.SerialNumber; ApplicationManager.SetConnectedMachine(x.SelectedMachine); @@ -520,6 +520,11 @@ namespace Tango.MachineStudio.UI.ViewModels _eventLogger.Log(String.Format("Successfully connected to machine {0} via USB", x.SelectedMachine.SerialNumber)); _settings.LastVirtualMachineSerialNumber = vm.SelectedMachine.SerialNumber; _settings.Save(); + + if (x.UploadHardwareConfiguration) + { + UploadHardwareConfiguration(); + } } catch (Exception ex) { @@ -560,22 +565,7 @@ namespace Tango.MachineStudio.UI.ViewModels { using (NotificationProvider.PushTaskItem("Uploading hardware configuration...")) { - try - { - using (ObservablesContext db = ObservablesContext.CreateDefault()) - { - var config = db.Adapter.GetConfiguration(s => s.Guid == ApplicationManager.Machine.ConfigurationGuid); - var hw = db.Adapter.GetHardwareVersionByMachine(ApplicationManager.Machine.Guid); - - await ApplicationManager.ConnectedMachine.UploadHardwareConfiguration(hw, config); - } - NotificationProvider.ShowInfo("Hardware configuration uploaded successfully."); - } - catch (Exception ex) - { - LogManager.Log(ex, "Error uploading hardware configuration."); - NotificationProvider.ShowError("Error uploading hardware configuration." + Environment.NewLine + ex.Message); - } + UploadHardwareConfiguration(); } } } @@ -623,6 +613,26 @@ namespace Tango.MachineStudio.UI.ViewModels InvalidateRelayCommands(); } + private async void UploadHardwareConfiguration() + { + try + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var config = db.Adapter.GetConfiguration(s => s.Guid == ApplicationManager.Machine.ConfigurationGuid); + var hw = db.Adapter.GetHardwareVersionByMachine(ApplicationManager.Machine.Guid); + + await ApplicationManager.ConnectedMachine.UploadHardwareConfiguration(hw, config); + } + NotificationProvider.ShowInfo("Hardware configuration uploaded successfully."); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error uploading hardware configuration."); + NotificationProvider.ShowError("Error uploading hardware configuration." + Environment.NewLine + ex.Message); + } + } + /// /// Navigates to the home screen. /// 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 180a2a8e0..9794404b9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml @@ -10,7 +10,7 @@ xmlns:emulations="clr-namespace:Tango.Emulations.ExternalBridge;assembly=Tango.Emulations" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="400" Background="White" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="300" d:DesignWidth="300" Width="630" Height="400" Background="White" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}"> @@ -57,10 +57,6 @@ - - - Diagnostics/Debugging - @@ -79,10 +75,6 @@ - - - Diagnostics - @@ -98,10 +90,6 @@ - - - Diagnostics - @@ -123,6 +111,24 @@ + + + + + Diagnostics, Debug & Events + + + + + Upload HW Configuration + + + + + Keep Alive + + + diff --git a/Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs b/Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs new file mode 100644 index 000000000..f6b7e8d28 --- /dev/null +++ b/Software/Visual_Studio/Tango.Integration/Operation/StorageManager.cs @@ -0,0 +1,144 @@ +using Google.Protobuf; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Logging; +using Tango.PMR.IO; + +namespace Tango.Integration.Operation +{ + public class StorageManager : ExtendedObject + { + private IMachineOperator _operator; + + public StorageManager(IMachineOperator machineOperator) + { + _operator = machineOperator; + } + + private void EnsureOperator() + { + if (_operator.State != Transport.TransportComponentState.Connected) + { + throw new InvalidOperationException("Error executing storage command. Machine operator is not connected."); + } + } + + #region Private Methods + + /// + /// Logs the request sent. + /// + /// The message. + protected void LogRequestSent(IMessage message) + { + LogManager.Log(String.Format("Sending request '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString())); + } + + /// + /// Logs the request failed. + /// + /// The message. + protected void LogRequestFailed(IMessage message, Exception ex) + { + LogManager.Log(String.Format("Request failed '{0}'...{1}{2}{1}{3}", message.GetType().Name, Environment.NewLine, message.ToJsonString(), ex.ToString()), LogCategory.Error); + } + + /// + /// Logs the response received. + /// + /// The message. + protected void LogResponseReceived(IMessage message) + { + LogManager.Log(String.Format("Response received '{0}'...{1}{2}", message.GetType().Name, Environment.NewLine, message.ToJsonString())); + } + + #endregion + + public async Task Create(FileAttribute attr, String path, String name) + { + EnsureOperator(); + + CreateResponse response = null; + CreateRequest request = new CreateRequest() + { + Attribute = attr, + Path = path + "/" + name, + }; + + try + { + response = await _operator.SendRequest(request); + } + catch (Exception ex) + { + LogRequestFailed(request, ex); + throw ex; + } + } + + public async Task Delete(String path) + { + EnsureOperator(); + + DeleteResponse response = null; + DeleteRequest request = new DeleteRequest() + { + Path = path, + }; + + try + { + response = await _operator.SendRequest(request); + } + catch (Exception ex) + { + LogRequestFailed(request, ex); + throw ex; + } + } + + public async Task GetStorageInfo() + { + EnsureOperator(); + + GetStorageInfoResponse response = null; + GetStorageInfoRequest request = new GetStorageInfoRequest(); + + try + { + response = await _operator.SendRequest(request); + } + catch (Exception ex) + { + LogRequestFailed(request, ex); + throw ex; + } + + return response; + } + + public async Task> GetFiles(String path) + { + EnsureOperator(); + + GetFilesResponse response = null; + GetFilesRequest request = new GetFilesRequest(); + + try + { + response = await _operator.SendRequest(request); + } + catch (Exception ex) + { + LogRequestFailed(request, ex); + throw ex; + } + + return response.Items.ToList(); + } + } +} diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj index 4606cf651..b6b1999cd 100644 --- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj +++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj @@ -101,6 +101,7 @@ + @@ -151,7 +152,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index 94f4eba19..fa916a3a3 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Common { static MessageTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirdJwoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqVKQoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj", "dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n", "cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh", @@ -135,8 +135,12 @@ namespace Tango.PMR.Common { "cG9uc2UQ2TYSGwoWRmlsZUNodW5rVXBsb2FkUmVxdWVzdBDaNhIcChdGaWxl", "Q2h1bmtVcGxvYWRSZXNwb25zZRDbNhIaChVFeGVjdXRlUHJvY2Vzc1JlcXVl", "c3QQ3DYSGwoWRXhlY3V0ZVByb2Nlc3NSZXNwb25zZRDdNhIXChJLaWxsUHJv", - "Y2Vzc1JlcXVlc3QQ3jYSGAoTS2lsbFByb2Nlc3NSZXNwb25zZRDfNkIcChpj", - "b20udHdpbmUudGFuZ28ucG1yLmNvbW1vbmIGcHJvdG8z")); + "Y2Vzc1JlcXVlc3QQ3jYSGAoTS2lsbFByb2Nlc3NSZXNwb25zZRDfNhISCg1D", + "cmVhdGVSZXF1ZXN0EOA2EhMKDkNyZWF0ZVJlc3BvbnNlEOE2EhIKDURlbGV0", + "ZVJlcXVlc3QQ4jYSEwoORGVsZXRlUmVzcG9uc2UQ4zYSGgoVR2V0U3RvcmFn", + "ZUluZm9SZXF1ZXN0EOQ2EhsKFkdldFN0b3JhZ2VJbmZvUmVzcG9uc2UQ5TYS", + "FAoPR2V0RmlsZXNSZXF1ZXN0EOY2EhUKEEdldEZpbGVzUmVzcG9uc2UQ5zZC", + "HAoaY29tLnR3aW5lLnRhbmdvLnBtci5jb21tb25iBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -351,6 +355,14 @@ namespace Tango.PMR.Common { [pbr::OriginalName("ExecuteProcessResponse")] ExecuteProcessResponse = 7005, [pbr::OriginalName("KillProcessRequest")] KillProcessRequest = 7006, [pbr::OriginalName("KillProcessResponse")] KillProcessResponse = 7007, + [pbr::OriginalName("CreateRequest")] CreateRequest = 7008, + [pbr::OriginalName("CreateResponse")] CreateResponse = 7009, + [pbr::OriginalName("DeleteRequest")] DeleteRequest = 7010, + [pbr::OriginalName("DeleteResponse")] DeleteResponse = 7011, + [pbr::OriginalName("GetStorageInfoRequest")] GetStorageInfoRequest = 7012, + [pbr::OriginalName("GetStorageInfoResponse")] GetStorageInfoResponse = 7013, + [pbr::OriginalName("GetFilesRequest")] GetFilesRequest = 7014, + [pbr::OriginalName("GetFilesResponse")] GetFilesResponse = 7015, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/IO/CreateRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/CreateRequest.cs new file mode 100644 index 000000000..7ea620d55 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/CreateRequest.cs @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CreateRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from CreateRequest.proto + public static partial class CreateRequestReflection { + + #region Descriptor + /// File descriptor for CreateRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CreateRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChNDcmVhdGVSZXF1ZXN0LnByb3RvEgxUYW5nby5QTVIuSU8aE0ZpbGVBdHRy", + "aWJ1dGUucHJvdG8iTQoNQ3JlYXRlUmVxdWVzdBIuCglBdHRyaWJ1dGUYASAB", + "KA4yGy5UYW5nby5QTVIuSU8uRmlsZUF0dHJpYnV0ZRIMCgRQYXRoGAIgASgJ", + "QhgKFmNvbS50d2luZS50YW5nby5wbXIuaW9iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.IO.FileAttributeReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.CreateRequest), global::Tango.PMR.IO.CreateRequest.Parser, new[]{ "Attribute", "Path" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class CreateRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.CreateRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CreateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CreateRequest(CreateRequest other) : this() { + attribute_ = other.attribute_; + path_ = other.path_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CreateRequest Clone() { + return new CreateRequest(this); + } + + /// Field number for the "Attribute" field. + public const int AttributeFieldNumber = 1; + private global::Tango.PMR.IO.FileAttribute attribute_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.IO.FileAttribute Attribute { + get { return attribute_; } + set { + attribute_ = value; + } + } + + /// Field number for the "Path" field. + public const int PathFieldNumber = 2; + private string path_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Path { + get { return path_; } + set { + path_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CreateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CreateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Attribute != other.Attribute) return false; + if (Path != other.Path) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Attribute != 0) hash ^= Attribute.GetHashCode(); + if (Path.Length != 0) hash ^= Path.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Attribute != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) Attribute); + } + if (Path.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Path); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Attribute != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Attribute); + } + if (Path.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Path); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CreateRequest other) { + if (other == null) { + return; + } + if (other.Attribute != 0) { + Attribute = other.Attribute; + } + if (other.Path.Length != 0) { + Path = other.Path; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + attribute_ = (global::Tango.PMR.IO.FileAttribute) input.ReadEnum(); + break; + } + case 18: { + Path = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/CreateResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/CreateResponse.cs new file mode 100644 index 000000000..8f68f7806 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/CreateResponse.cs @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CreateResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from CreateResponse.proto + public static partial class CreateResponseReflection { + + #region Descriptor + /// File descriptor for CreateResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CreateResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChRDcmVhdGVSZXNwb25zZS5wcm90bxIMVGFuZ28uUE1SLklPIhAKDkNyZWF0", + "ZVJlc3BvbnNlQhgKFmNvbS50d2luZS50YW5nby5wbXIuaW9iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.CreateResponse), global::Tango.PMR.IO.CreateResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class CreateResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.CreateResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CreateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CreateResponse(CreateResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CreateResponse Clone() { + return new CreateResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CreateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CreateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CreateResponse other) { + if (other == null) { + return; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/DeleteRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/DeleteRequest.cs new file mode 100644 index 000000000..8afea70c7 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/DeleteRequest.cs @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DeleteRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from DeleteRequest.proto + public static partial class DeleteRequestReflection { + + #region Descriptor + /// File descriptor for DeleteRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static DeleteRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChNEZWxldGVSZXF1ZXN0LnByb3RvEgxUYW5nby5QTVIuSU8iHQoNRGVsZXRl", + "UmVxdWVzdBIMCgRQYXRoGAIgASgJQhgKFmNvbS50d2luZS50YW5nby5wbXIu", + "aW9iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.DeleteRequest), global::Tango.PMR.IO.DeleteRequest.Parser, new[]{ "Path" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class DeleteRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.DeleteRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DeleteRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DeleteRequest(DeleteRequest other) : this() { + path_ = other.path_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DeleteRequest Clone() { + return new DeleteRequest(this); + } + + /// Field number for the "Path" field. + public const int PathFieldNumber = 2; + private string path_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Path { + get { return path_; } + set { + path_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DeleteRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DeleteRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Path != other.Path) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Path.Length != 0) hash ^= Path.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Path.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Path); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Path.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Path); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DeleteRequest other) { + if (other == null) { + return; + } + if (other.Path.Length != 0) { + Path = other.Path; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 18: { + Path = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/DeleteResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/DeleteResponse.cs new file mode 100644 index 000000000..29af47fd9 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/DeleteResponse.cs @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DeleteResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from DeleteResponse.proto + public static partial class DeleteResponseReflection { + + #region Descriptor + /// File descriptor for DeleteResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static DeleteResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChREZWxldGVSZXNwb25zZS5wcm90bxIMVGFuZ28uUE1SLklPIhAKDkRlbGV0", + "ZVJlc3BvbnNlQhgKFmNvbS50d2luZS50YW5nby5wbXIuaW9iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.DeleteResponse), global::Tango.PMR.IO.DeleteResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class DeleteResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.DeleteResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DeleteResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DeleteResponse(DeleteResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DeleteResponse Clone() { + return new DeleteResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DeleteResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DeleteResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DeleteResponse other) { + if (other == null) { + return; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileAttribute.cs b/Software/Visual_Studio/Tango.PMR/IO/FileAttribute.cs new file mode 100644 index 000000000..efbbbfd48 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/FileAttribute.cs @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileAttribute.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from FileAttribute.proto + public static partial class FileAttributeReflection { + + #region Descriptor + /// File descriptor for FileAttribute.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FileAttributeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChNGaWxlQXR0cmlidXRlLnByb3RvEgxUYW5nby5QTVIuSU8qcwoNRmlsZUF0", + "dHJpYnV0ZRIPCgtVbnNwZWNpZmllZBAAEgsKB0FyY2hpdmUQIBINCglEaXJl", + "Y3RvcnkQEBIKCgZIaWRkZW4QAhIMCghSZWFkT25seRABEgoKBlN5c3RlbRAE", + "Eg8KC1ZvbHVtZUxhYmVsEAhCGAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IG", + "cHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.IO.FileAttribute), }, null)); + } + #endregion + + } + #region Enums + public enum FileAttribute { + [pbr::OriginalName("Unspecified")] Unspecified = 0, + [pbr::OriginalName("Archive")] Archive = 32, + [pbr::OriginalName("Directory")] Directory = 16, + [pbr::OriginalName("Hidden")] Hidden = 2, + [pbr::OriginalName("ReadOnly")] ReadOnly = 1, + [pbr::OriginalName("System")] System = 4, + [pbr::OriginalName("VolumeLabel")] VolumeLabel = 8, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileInfo.cs b/Software/Visual_Studio/Tango.PMR/IO/FileInfo.cs new file mode 100644 index 000000000..d6c1b7fbd --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/FileInfo.cs @@ -0,0 +1,302 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileInfo.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from FileInfo.proto + public static partial class FileInfoReflection { + + #region Descriptor + /// File descriptor for FileInfo.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FileInfoReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cg5GaWxlSW5mby5wcm90bxIMVGFuZ28uUE1SLklPGhNGaWxlQXR0cmlidXRl", + "LnByb3RvIp4BCghGaWxlSW5mbxIMCgROYW1lGAEgASgJEhAKCEZ1bGxQYXRo", + "GAIgASgJEg4KBkxlbmd0aBgDIAEoBRIYChBMYXN0TW9kaWZpZWREYXRlGAQg", + "ASgFEhgKEExhc3RNb2RpZmllZFRpbWUYBSABKAUSLgoJQXR0cmlidXRlGAYg", + "ASgOMhsuVGFuZ28uUE1SLklPLkZpbGVBdHRyaWJ1dGVCGAoWY29tLnR3aW5l", + "LnRhbmdvLnBtci5pb2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.IO.FileAttributeReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileInfo), global::Tango.PMR.IO.FileInfo.Parser, new[]{ "Name", "FullPath", "Length", "LastModifiedDate", "LastModifiedTime", "Attribute" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class FileInfo : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileInfo()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.FileInfoReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileInfo(FileInfo other) : this() { + name_ = other.name_; + fullPath_ = other.fullPath_; + length_ = other.length_; + lastModifiedDate_ = other.lastModifiedDate_; + lastModifiedTime_ = other.lastModifiedTime_; + attribute_ = other.attribute_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileInfo Clone() { + return new FileInfo(this); + } + + /// Field number for the "Name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "FullPath" field. + public const int FullPathFieldNumber = 2; + private string fullPath_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FullPath { + get { return fullPath_; } + set { + fullPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Length" field. + public const int LengthFieldNumber = 3; + private int length_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Length { + get { return length_; } + set { + length_ = value; + } + } + + /// Field number for the "LastModifiedDate" field. + public const int LastModifiedDateFieldNumber = 4; + private int lastModifiedDate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int LastModifiedDate { + get { return lastModifiedDate_; } + set { + lastModifiedDate_ = value; + } + } + + /// Field number for the "LastModifiedTime" field. + public const int LastModifiedTimeFieldNumber = 5; + private int lastModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int LastModifiedTime { + get { return lastModifiedTime_; } + set { + lastModifiedTime_ = value; + } + } + + /// Field number for the "Attribute" field. + public const int AttributeFieldNumber = 6; + private global::Tango.PMR.IO.FileAttribute attribute_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.IO.FileAttribute Attribute { + get { return attribute_; } + set { + attribute_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FileInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FileInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (FullPath != other.FullPath) return false; + if (Length != other.Length) return false; + if (LastModifiedDate != other.LastModifiedDate) return false; + if (LastModifiedTime != other.LastModifiedTime) return false; + if (Attribute != other.Attribute) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (FullPath.Length != 0) hash ^= FullPath.GetHashCode(); + if (Length != 0) hash ^= Length.GetHashCode(); + if (LastModifiedDate != 0) hash ^= LastModifiedDate.GetHashCode(); + if (LastModifiedTime != 0) hash ^= LastModifiedTime.GetHashCode(); + if (Attribute != 0) hash ^= Attribute.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (FullPath.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FullPath); + } + if (Length != 0) { + output.WriteRawTag(24); + output.WriteInt32(Length); + } + if (LastModifiedDate != 0) { + output.WriteRawTag(32); + output.WriteInt32(LastModifiedDate); + } + if (LastModifiedTime != 0) { + output.WriteRawTag(40); + output.WriteInt32(LastModifiedTime); + } + if (Attribute != 0) { + output.WriteRawTag(48); + output.WriteEnum((int) Attribute); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (FullPath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullPath); + } + if (Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Length); + } + if (LastModifiedDate != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(LastModifiedDate); + } + if (LastModifiedTime != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(LastModifiedTime); + } + if (Attribute != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Attribute); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FileInfo other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.FullPath.Length != 0) { + FullPath = other.FullPath; + } + if (other.Length != 0) { + Length = other.Length; + } + if (other.LastModifiedDate != 0) { + LastModifiedDate = other.LastModifiedDate; + } + if (other.LastModifiedTime != 0) { + LastModifiedTime = other.LastModifiedTime; + } + if (other.Attribute != 0) { + Attribute = other.Attribute; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + FullPath = input.ReadString(); + break; + } + case 24: { + Length = input.ReadInt32(); + break; + } + case 32: { + LastModifiedDate = input.ReadInt32(); + break; + } + case 40: { + LastModifiedTime = input.ReadInt32(); + break; + } + case 48: { + attribute_ = (global::Tango.PMR.IO.FileAttribute) input.ReadEnum(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/GetFilesRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/GetFilesRequest.cs new file mode 100644 index 000000000..1696713ac --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/GetFilesRequest.cs @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GetFilesRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from GetFilesRequest.proto + public static partial class GetFilesRequestReflection { + + #region Descriptor + /// File descriptor for GetFilesRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GetFilesRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChVHZXRGaWxlc1JlcXVlc3QucHJvdG8SDFRhbmdvLlBNUi5JTyIfCg9HZXRG", + "aWxlc1JlcXVlc3QSDAoEUGF0aBgCIAEoCUIYChZjb20udHdpbmUudGFuZ28u", + "cG1yLmlvYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.GetFilesRequest), global::Tango.PMR.IO.GetFilesRequest.Parser, new[]{ "Path" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class GetFilesRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetFilesRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.GetFilesRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetFilesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetFilesRequest(GetFilesRequest other) : this() { + path_ = other.path_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetFilesRequest Clone() { + return new GetFilesRequest(this); + } + + /// Field number for the "Path" field. + public const int PathFieldNumber = 2; + private string path_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Path { + get { return path_; } + set { + path_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GetFilesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GetFilesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Path != other.Path) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Path.Length != 0) hash ^= Path.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Path.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Path); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Path.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Path); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GetFilesRequest other) { + if (other == null) { + return; + } + if (other.Path.Length != 0) { + Path = other.Path; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 18: { + Path = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/GetFilesResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/GetFilesResponse.cs new file mode 100644 index 000000000..f6193d9b4 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/GetFilesResponse.cs @@ -0,0 +1,152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GetFilesResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from GetFilesResponse.proto + public static partial class GetFilesResponseReflection { + + #region Descriptor + /// File descriptor for GetFilesResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GetFilesResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChZHZXRGaWxlc1Jlc3BvbnNlLnByb3RvEgxUYW5nby5QTVIuSU8aDkZpbGVJ", + "bmZvLnByb3RvIjkKEEdldEZpbGVzUmVzcG9uc2USJQoFSXRlbXMYASADKAsy", + "Fi5UYW5nby5QTVIuSU8uRmlsZUluZm9CGAoWY29tLnR3aW5lLnRhbmdvLnBt", + "ci5pb2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.IO.FileInfoReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.GetFilesResponse), global::Tango.PMR.IO.GetFilesResponse.Parser, new[]{ "Items" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class GetFilesResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetFilesResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.GetFilesResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetFilesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetFilesResponse(GetFilesResponse other) : this() { + items_ = other.items_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetFilesResponse Clone() { + return new GetFilesResponse(this); + } + + /// Field number for the "Items" field. + public const int ItemsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_items_codec + = pb::FieldCodec.ForMessage(10, global::Tango.PMR.IO.FileInfo.Parser); + private readonly pbc::RepeatedField items_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Items { + get { return items_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GetFilesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GetFilesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!items_.Equals(other.items_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= items_.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + items_.WriteTo(output, _repeated_items_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += items_.CalculateSize(_repeated_items_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GetFilesResponse other) { + if (other == null) { + return; + } + items_.Add(other.items_); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + items_.AddEntriesFrom(input, _repeated_items_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoRequest.cs new file mode 100644 index 000000000..ae06664ae --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoRequest.cs @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GetStorageInfoRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from GetStorageInfoRequest.proto + public static partial class GetStorageInfoRequestReflection { + + #region Descriptor + /// File descriptor for GetStorageInfoRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GetStorageInfoRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChtHZXRTdG9yYWdlSW5mb1JlcXVlc3QucHJvdG8SDFRhbmdvLlBNUi5JTyI8", + "ChVHZXRTdG9yYWdlSW5mb1JlcXVlc3QSEAoIQ2FwYWNpdHkYASABKAUSEQoJ", + "RnJlZVNwYWNlGAIgASgFQhgKFmNvbS50d2luZS50YW5nby5wbXIuaW9iBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.GetStorageInfoRequest), global::Tango.PMR.IO.GetStorageInfoRequest.Parser, new[]{ "Capacity", "FreeSpace" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class GetStorageInfoRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetStorageInfoRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.GetStorageInfoRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetStorageInfoRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetStorageInfoRequest(GetStorageInfoRequest other) : this() { + capacity_ = other.capacity_; + freeSpace_ = other.freeSpace_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetStorageInfoRequest Clone() { + return new GetStorageInfoRequest(this); + } + + /// Field number for the "Capacity" field. + public const int CapacityFieldNumber = 1; + private int capacity_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Capacity { + get { return capacity_; } + set { + capacity_ = value; + } + } + + /// Field number for the "FreeSpace" field. + public const int FreeSpaceFieldNumber = 2; + private int freeSpace_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FreeSpace { + get { return freeSpace_; } + set { + freeSpace_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GetStorageInfoRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GetStorageInfoRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Capacity != other.Capacity) return false; + if (FreeSpace != other.FreeSpace) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Capacity != 0) hash ^= Capacity.GetHashCode(); + if (FreeSpace != 0) hash ^= FreeSpace.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Capacity != 0) { + output.WriteRawTag(8); + output.WriteInt32(Capacity); + } + if (FreeSpace != 0) { + output.WriteRawTag(16); + output.WriteInt32(FreeSpace); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Capacity != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Capacity); + } + if (FreeSpace != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FreeSpace); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GetStorageInfoRequest other) { + if (other == null) { + return; + } + if (other.Capacity != 0) { + Capacity = other.Capacity; + } + if (other.FreeSpace != 0) { + FreeSpace = other.FreeSpace; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + Capacity = input.ReadInt32(); + break; + } + case 16: { + FreeSpace = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs new file mode 100644 index 000000000..13152184d --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/GetStorageInfoResponse.cs @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GetStorageInfoResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.IO { + + /// Holder for reflection information generated from GetStorageInfoResponse.proto + public static partial class GetStorageInfoResponseReflection { + + #region Descriptor + /// File descriptor for GetStorageInfoResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GetStorageInfoResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChxHZXRTdG9yYWdlSW5mb1Jlc3BvbnNlLnByb3RvEgxUYW5nby5QTVIuSU8i", + "GAoWR2V0U3RvcmFnZUluZm9SZXNwb25zZUIYChZjb20udHdpbmUudGFuZ28u", + "cG1yLmlvYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.GetStorageInfoResponse), global::Tango.PMR.IO.GetStorageInfoResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class GetStorageInfoResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetStorageInfoResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.GetStorageInfoResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetStorageInfoResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetStorageInfoResponse(GetStorageInfoResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetStorageInfoResponse Clone() { + return new GetStorageInfoResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GetStorageInfoResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GetStorageInfoResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GetStorageInfoResponse other) { + if (other == null) { + return; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index 3d899e2bc..87a071833 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -168,12 +168,22 @@ + + + + + + + + + + @@ -230,7 +240,7 @@ - + \ No newline at end of file -- cgit v1.3.1