From afb6bbb2123932b3562e1af993eb847d8147bf58 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 26 Feb 2020 18:25:52 +0200 Subject: Major Changes Regarding RML & SPOOL parameters changes! --- .../Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index efbcaf5ad..c5df65f59 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -1622,7 +1622,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { LogManager.Log("Invalidating liquid factors, process parameters and process group history..."); - _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML.Guid).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().Build(); + _selectedRML = new RmlBuilder(_activeJobDbContext).Set(SelectedRML.Guid).WithAllParametersGroup().WithCAT(SelectedMachine.Guid).WithCCT().WithLiquidFactors().WithSpools().Build(); _selectedRMLBeforeLiquidFactorsSaves = RmlDTO.FromObservable(_selectedRML); -- cgit v1.3.1 From 882a6d54d60f05f3bf542ab43c3681f64152df41 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 27 Feb 2020 00:34:46 +0200 Subject: Added thread parameters DB, PMR, MachineOperator merging, Machine Studio. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes Software/PMR/Messages/Printing/JobTicket.proto | 3 + .../PMR/Messages/Printing/ThreadParameters.proto | 19 + .../Controls/JobOutlineControl.cs | 14 + .../Tango.MachineStudio.RML.csproj | 7 + .../ViewModels/MainViewVM.cs | 154 ++++---- .../Tango.MachineStudio.RML/Views/MainView.xaml | 2 +- .../Tango.MachineStudio.RML/Views/RmlView.xaml | 5 +- .../Views/ThreadParametersView.xaml | 82 +++++ .../Views/ThreadParametersView.xaml.cs | 28 ++ .../Tango.PPC.Jobs/Controls/JobOutlineControl.cs | 14 + Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs | 72 ++++ .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 342 ++++++++++++++++++ Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 9 + .../Tango.DAL.Remote/DB/RemoteADO.Designer.cs | 2 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 27 ++ .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 140 ++++---- .../Operation/IMachineOperator.cs | 9 - .../Tango.Integration/Operation/MachineOperator.cs | 224 +----------- .../Visual_Studio/Tango.PMR/Printing/JobTicket.cs | 66 +++- .../Tango.PMR/Printing/ThreadParameters.cs | 386 +++++++++++++++++++++ Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj | 3 +- 23 files changed, 1219 insertions(+), 389 deletions(-) create mode 100644 Software/PMR/Messages/Printing/ThreadParameters.proto create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index acb091ff8..d291434cb 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 85ba181a9..15e009d48 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/PMR/Messages/Printing/JobTicket.proto b/Software/PMR/Messages/Printing/JobTicket.proto index 9824f6ef0..b442893cd 100644 --- a/Software/PMR/Messages/Printing/JobTicket.proto +++ b/Software/PMR/Messages/Printing/JobTicket.proto @@ -5,6 +5,7 @@ import "ProcessParameters.proto"; import "JobWindingMethod.proto"; import "JobSpool.proto"; import "JobUploadStrategy.proto"; +import "ThreadParameters.proto"; package Tango.PMR.Printing; option java_package = "com.twine.tango.pmr.printing"; @@ -35,4 +36,6 @@ message JobTicket //sample winding winds each segment densely on a small part of the spool, end moves one for the next segment bool SampleWinding = 14; + + ThreadParameters ThreadParameters = 15; } \ No newline at end of file diff --git a/Software/PMR/Messages/Printing/ThreadParameters.proto b/Software/PMR/Messages/Printing/ThreadParameters.proto new file mode 100644 index 000000000..f5d18d1fe --- /dev/null +++ b/Software/PMR/Messages/Printing/ThreadParameters.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package Tango.PMR.Printing; +option java_package = "com.twine.tango.pmr.printing"; + +message ThreadParameters +{ + int32 FeederP = 1; + int32 FeederI = 2; + int32 FeederD = 3; + + int32 PullerP = 4; + int32 PullerI = 5; + int32 PullerD = 6; + + int32 WinderP = 7; + int32 WinderI = 8; + int32 WinderD = 9; +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs index ee570ac34..5a3f5d337 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs @@ -136,6 +136,20 @@ namespace Tango.MachineStudio.Developer.Controls _sizeControl.Height += NORMAL_FONT_HEIGHT; } } + //JobTicket.ThreadParameters + if (job.ThreadParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.ThreadParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, PackIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } //JobTicket.Segments if (job.Segments != null) { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj index 9f3a95e0b..f448932a0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj @@ -118,6 +118,9 @@ RmlView.xaml + + ThreadParametersView.xaml + SpoolsView.xaml @@ -226,6 +229,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index b75d65fe0..1ceaf07df 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -283,102 +283,114 @@ namespace Tango.MachineStudio.RML.ViewModels { using (_notification.PushTaskItem("Loading RML...")) { - IsFree = false; - - if (_active_context != null) + try { - _active_context.Dispose(); - } - - _active_context = ObservablesContext.CreateDefault(); + IsFree = false; - CCTS = _active_context.Ccts - .Select(x => new CctModel() + if (_active_context != null) { - Guid = x.Guid, - FileName = x.FileName, + _active_context.Dispose(); + } - }).ToObservableCollection(); + _active_context = ObservablesContext.CreateDefault(); - CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid); + CCTS = _active_context.Ccts + .Select(x => new CctModel() + { + Guid = x.Guid, + FileName = x.FileName, - LoadRmlProperties(); + }).ToObservableCollection(); - ActiveRML = await new RmlBuilder(_active_context) - .Set(guid) - .WithActiveParametersGroup() - .WithLiquidFactors() - .WithCCT() - .WithSpools() - .BuildAsync(); + CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid); - if (ActiveRML.Cct != null) - { - SelectedCCT = CCTS.SingleOrDefault(x => x.Guid == ActiveRML.Cct.Guid); - } + LoadRmlProperties(); - if (ActiveRML.ProcessParametersTablesGroups.ToList().Count == 0) - { - if (!_notification.ShowQuestion("Could not find any process group for the selected RML. Would you like to create one?")) + ActiveRML = await new RmlBuilder(_active_context) + .Set(guid) + .WithActiveParametersGroup() + .WithLiquidFactors() + .WithCCT() + .WithSpools() + .BuildAsync(); + + if (ActiveRML.Cct != null) { - _notification.ShowError("Cannot load an RML with no process group."); - IsFree = true; - return; + SelectedCCT = CCTS.SingleOrDefault(x => x.Guid == ActiveRML.Cct.Guid); } - else + + if (ActiveRML.ProcessParametersTablesGroups.ToList().Count == 0) { - ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); - group.Name = "Active Group"; - group.Active = true; - group.ProcessParametersTables.Add(new ProcessParametersTable() + if (!_notification.ShowQuestion("Could not find any process group for the selected RML. Would you like to create one?")) + { + _notification.ShowError("Cannot load an RML with no process group."); + IsFree = true; + return; + } + else { - Name = "Process Table 1", - }); + ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); + group.Name = "Active Group"; + group.Active = true; + group.ProcessParametersTables.Add(new ProcessParametersTable() + { + Name = "Process Table 1", + }); - group.Rml = ActiveRML; + group.Rml = ActiveRML; - _active_context.ProcessParametersTablesGroups.Add(group); - _active_context.ProcessParametersTables.Add(group.ProcessParametersTables[0]); - await _active_context.SaveChangesAsync(); - LoadActiveRML(ActiveRML.Guid); - return; + _active_context.ProcessParametersTablesGroups.Add(group); + _active_context.ProcessParametersTables.Add(group.ProcessParametersTables[0]); + await _active_context.SaveChangesAsync(); + LoadActiveRML(ActiveRML.Guid); + return; + } } - } - - ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault(); - ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables); - ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending)); - CalibrationDataViewVM = new CalibrationDataViewVM(_notification); - LiquidTypesRmls = ActiveRML.LiquidTypesRmls; + ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault(); + ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables); + ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending)); - foreach (var liquidTypeRml in LiquidTypesRmls) - { - CalibrationDataVM catVM = new CalibrationDataVM(liquidTypeRml.LiquidType); + CalibrationDataViewVM = new CalibrationDataViewVM(_notification); + LiquidTypesRmls = ActiveRML.LiquidTypesRmls; - if (liquidTypeRml.DefaultCatData != null) + foreach (var liquidTypeRml in LiquidTypesRmls) { - catVM.CalibrationPoints = liquidTypeRml.GetCalibrationData().CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection(); - } + CalibrationDataVM catVM = new CalibrationDataVM(liquidTypeRml.LiquidType); - CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM); - } + if (liquidTypeRml.DefaultCatData != null) + { + catVM.CalibrationPoints = liquidTypeRml.GetCalibrationData().CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection(); + } - ColorConversionViewVM = new ColorConversionViewVM(_notification) - { - RML = ActiveRML, - CCT = SelectedCCT, - LiquidsCalibrationData = CalibrationDataViewVM.LiquidsCalibrationData, - LiquidTypesRmls = LiquidTypesRmls, - }; + CalibrationDataViewVM.LiquidsCalibrationData.Add(catVM); + } + + ColorConversionViewVM = new ColorConversionViewVM(_notification) + { + RML = ActiveRML, + CCT = SelectedCCT, + LiquidsCalibrationData = CalibrationDataViewVM.LiquidsCalibrationData, + LiquidTypesRmls = LiquidTypesRmls, + }; - _rmlBeforeSave = RmlDTO.FromObservable(ActiveRML); + _rmlBeforeSave = RmlDTO.FromObservable(ActiveRML); - View.NavigateTo(RmlNavigationView.RmlView); + View.NavigateTo(RmlNavigationView.RmlView); - InvalidateRelayCommands(); + InvalidateRelayCommands(); - IsFree = true; + IsFree = true; + } + catch (Exception ex) + { + LogManager.Log($"Error loading RML '{ActiveRML.Name}'..."); + _notification.ShowError($"Error loading the selected thread.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } } } @@ -490,7 +502,7 @@ namespace Tango.MachineStudio.RML.ViewModels if (rml_jobs.Count > 0) { - _notification.ShowError($"The following jobs must be removed or change thread type before the selected thread can be deleted:\n{String.Join("\n",rml_jobs.Select(x => $"{x.Machine.SerialNumber} => {x.Name}"))}"); + _notification.ShowError($"The following jobs must be removed or change thread type before the selected thread can be deleted:\n{String.Join("\n", rml_jobs.Select(x => $"{x.Machine.SerialNumber} => {x.Name}"))}"); return; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml index ab5207722..e52ac4ece 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml @@ -9,7 +9,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index 6ee41ac38..e967c7d83 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -149,9 +149,12 @@ - + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml new file mode 100644 index 000000000..ef2923303 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + THREAD PARAMETERS + + + + + + + + + FEEDER + + + + + + + + + + + + + + PULLER + + + + + + + + + + + + + + WINDER + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs new file mode 100644 index 000000000..aa63e48fb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.RML.Views +{ + /// + /// Interaction logic for SpoolsView.xaml + /// + public partial class ThreadParametersView : UserControl + { + public ThreadParametersView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs index e6f090fdd..0d6a2f6be 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Controls/JobOutlineControl.cs @@ -143,6 +143,20 @@ namespace Tango.PPC.Jobs _sizeControl.Height += NORMAL_FONT_HEIGHT; } } + //JobTicket.ThreadParameters + if (job.ThreadParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.ThreadParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } //JobTicket.Segments if (job.Segments != null) { diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs index 0c5c0480d..7ffc640f1 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs @@ -269,5 +269,77 @@ namespace Tango.BL.DTO get; set; } + /// + /// feeder p + /// + public Int32 FeederP + { + get; set; + } + + /// + /// feeder i + /// + public Int32 FeederI + { + get; set; + } + + /// + /// feeder d + /// + public Int32 FeederD + { + get; set; + } + + /// + /// puller p + /// + public Int32 PullerP + { + get; set; + } + + /// + /// puller i + /// + public Int32 PullerI + { + get; set; + } + + /// + /// puller d + /// + public Int32 PullerD + { + get; set; + } + + /// + /// winder p + /// + public Int32 WinderP + { + get; set; + } + + /// + /// winder i + /// + public Int32 WinderI + { + get; set; + } + + /// + /// winder d + /// + public Int32 WinderD + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index a592fc694..758c7fa41 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -75,6 +75,24 @@ namespace Tango.BL.Entities public event EventHandler SpoolsCalibrationsStringChanged; + public event EventHandler FeederPChanged; + + public event EventHandler FeederIChanged; + + public event EventHandler FeederDChanged; + + public event EventHandler PullerPChanged; + + public event EventHandler PullerIChanged; + + public event EventHandler PullerDChanged; + + public event EventHandler WinderPChanged; + + public event EventHandler WinderIChanged; + + public event EventHandler WinderDChanged; + public event EventHandler> CatsChanged; public event EventHandler CctChanged; @@ -933,6 +951,249 @@ namespace Tango.BL.Entities } } + protected Int32 _feederp; + + /// + /// Gets or sets the rmlbase feeder p. + /// + + [Column("FEEDER_P")] + + public Int32 FeederP + { + get + { + return _feederp; + } + + set + { + if (_feederp != value) + { + _feederp = value; + + OnFeederPChanged(value); + + } + } + } + + protected Int32 _feederi; + + /// + /// Gets or sets the rmlbase feeder i. + /// + + [Column("FEEDER_I")] + + public Int32 FeederI + { + get + { + return _feederi; + } + + set + { + if (_feederi != value) + { + _feederi = value; + + OnFeederIChanged(value); + + } + } + } + + protected Int32 _feederd; + + /// + /// Gets or sets the rmlbase feeder d. + /// + + [Column("FEEDER_D")] + + public Int32 FeederD + { + get + { + return _feederd; + } + + set + { + if (_feederd != value) + { + _feederd = value; + + OnFeederDChanged(value); + + } + } + } + + protected Int32 _pullerp; + + /// + /// Gets or sets the rmlbase puller p. + /// + + [Column("PULLER_P")] + + public Int32 PullerP + { + get + { + return _pullerp; + } + + set + { + if (_pullerp != value) + { + _pullerp = value; + + OnPullerPChanged(value); + + } + } + } + + protected Int32 _pulleri; + + /// + /// Gets or sets the rmlbase puller i. + /// + + [Column("PULLER_I")] + + public Int32 PullerI + { + get + { + return _pulleri; + } + + set + { + if (_pulleri != value) + { + _pulleri = value; + + OnPullerIChanged(value); + + } + } + } + + protected Int32 _pullerd; + + /// + /// Gets or sets the rmlbase puller d. + /// + + [Column("PULLER_D")] + + public Int32 PullerD + { + get + { + return _pullerd; + } + + set + { + if (_pullerd != value) + { + _pullerd = value; + + OnPullerDChanged(value); + + } + } + } + + protected Int32 _winderp; + + /// + /// Gets or sets the rmlbase winder p. + /// + + [Column("WINDER_P")] + + public Int32 WinderP + { + get + { + return _winderp; + } + + set + { + if (_winderp != value) + { + _winderp = value; + + OnWinderPChanged(value); + + } + } + } + + protected Int32 _winderi; + + /// + /// Gets or sets the rmlbase winder i. + /// + + [Column("WINDER_I")] + + public Int32 WinderI + { + get + { + return _winderi; + } + + set + { + if (_winderi != value) + { + _winderi = value; + + OnWinderIChanged(value); + + } + } + } + + protected Int32 _winderd; + + /// + /// Gets or sets the rmlbase winder d. + /// + + [Column("WINDER_D")] + + public Int32 WinderD + { + get + { + return _winderd; + } + + set + { + if (_winderd != value) + { + _winderd = value; + + OnWinderDChanged(value); + + } + } + } + protected SynchronizedObservableCollection _cats; /// @@ -1548,6 +1809,87 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(SpoolsCalibrationsString)); } + /// + /// Called when the FeederP has changed. + /// + protected virtual void OnFeederPChanged(Int32 feederp) + { + FeederPChanged?.Invoke(this, feederp); + RaisePropertyChanged(nameof(FeederP)); + } + + /// + /// Called when the FeederI has changed. + /// + protected virtual void OnFeederIChanged(Int32 feederi) + { + FeederIChanged?.Invoke(this, feederi); + RaisePropertyChanged(nameof(FeederI)); + } + + /// + /// Called when the FeederD has changed. + /// + protected virtual void OnFeederDChanged(Int32 feederd) + { + FeederDChanged?.Invoke(this, feederd); + RaisePropertyChanged(nameof(FeederD)); + } + + /// + /// Called when the PullerP has changed. + /// + protected virtual void OnPullerPChanged(Int32 pullerp) + { + PullerPChanged?.Invoke(this, pullerp); + RaisePropertyChanged(nameof(PullerP)); + } + + /// + /// Called when the PullerI has changed. + /// + protected virtual void OnPullerIChanged(Int32 pulleri) + { + PullerIChanged?.Invoke(this, pulleri); + RaisePropertyChanged(nameof(PullerI)); + } + + /// + /// Called when the PullerD has changed. + /// + protected virtual void OnPullerDChanged(Int32 pullerd) + { + PullerDChanged?.Invoke(this, pullerd); + RaisePropertyChanged(nameof(PullerD)); + } + + /// + /// Called when the WinderP has changed. + /// + protected virtual void OnWinderPChanged(Int32 winderp) + { + WinderPChanged?.Invoke(this, winderp); + RaisePropertyChanged(nameof(WinderP)); + } + + /// + /// Called when the WinderI has changed. + /// + protected virtual void OnWinderIChanged(Int32 winderi) + { + WinderIChanged?.Invoke(this, winderi); + RaisePropertyChanged(nameof(WinderI)); + } + + /// + /// Called when the WinderD has changed. + /// + protected virtual void OnWinderDChanged(Int32 winderd) + { + WinderDChanged?.Invoke(this, winderd); + RaisePropertyChanged(nameof(WinderD)); + } + /// /// Called when the Cats has changed. /// diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index 2772e1958..6f5119865 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -60,6 +60,15 @@ namespace Tango.DAL.Remote.DB public int QUALIFICATION_LEVEL { get; set; } public Nullable QUALIFICATION_DATE { get; set; } public string SPOOLS_CALIBRATIONS_STRING { get; set; } + public int FEEDER_P { get; set; } + public int FEEDER_I { get; set; } + public int FEEDER_D { get; set; } + public int PULLER_P { get; set; } + public int PULLER_I { get; set; } + public int PULLER_D { get; set; } + public int WINDER_P { get; set; } + public int WINDER_I { get; set; } + public int WINDER_D { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CATS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs index 17bc2683d..d26e67908 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs @@ -1,4 +1,4 @@ -// T4 code generation is enabled for model 'D:\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. +// T4 code generation is enabled for model 'C:\DATA\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 4bccfc804..f10a28eee 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -933,6 +933,15 @@ + + + + + + + + + @@ -4257,6 +4266,15 @@ + + + + + + + + + @@ -6670,6 +6688,15 @@ + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 354839477..6785d4c6e 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,85 +5,85 @@ - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + - + - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index 44128a2ae..b6698a208 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -273,15 +273,6 @@ namespace Tango.Integration.Operation /// Task Print(Job job); - /// - /// Executes a print stub for emulating a full job. - /// The process parameters table will be calculated using color conversion gamut region. - /// This method cannot accept brush stops with 'Volume' as color space. - /// - /// The job. - /// - Task PrintStub(Job job); - /// /// Prints the specified job using the specified job parameters. /// diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 4084e4ee7..d020fd2a6 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -2258,6 +2258,10 @@ namespace Tango.Integration.Operation ticket.Spool.LimitSwitchStartPointOffset = machineSpool.LimitSwitchStartPointOffset != null ? machineSpool.LimitSwitchStartPointOffset.Value : ticket.Spool.LimitSwitchStartPointOffset; } + //Thread parameters + ticket.ThreadParameters = new ThreadParameters(); + job.Rml.MapPrimitivesTo(ticket.ThreadParameters); + ProcessParameters process = new ProcessParameters(); processParameters.MapPrimitivesTo(process); ticket.ProcessParameters = process; @@ -2629,226 +2633,6 @@ namespace Tango.Integration.Operation }); } - /// - /// Executes a print stub for emulating a full job. - /// The process parameters table will be calculated using color conversion gamut region. - /// This method cannot accept brush stops with 'Volume' as color space. - /// - /// The job. - /// - /// - /// Cannot print a brush stop with volume color space when process parameters table has not been specified. - /// or - /// Could not print while status = " + Status - /// - /// - /// Job RML is null - /// or - /// Could not locate an active process parameters tables group for RML " + job.Rml.Name - /// or - /// Could not locate process parameters table index " + processParametersTableIndex + " in group " + processGroup.Name + " for RML " + job.Rml.Name - /// or - /// Liquid volume not found for color conversion output liquid '" + outputLiquid.LiquidType + "'. - /// - public Task PrintStub(Job job) - { - return Task.Factory.StartNew(() => - { - - //Check not brush stop has color space 'Volume'. - if (job.Segments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.ColorSpace.Code == ColorSpaces.Volume.ToInt32())) - { - throw new InvalidOperationException("Cannot print a brush stop with volume color space when process parameters table has not been specified."); - } - - //Get least common process parameters table index. - int processParametersTableIndex = 0; - - if (job.Rml == null) - { - throw new NullReferenceException("Job RML is null"); - } - - var processGroup = job.Rml.ProcessParametersTablesGroups.FirstOrDefault(x => x.Active); - - if (processGroup == null) - { - throw new NullReferenceException("Could not locate an active process parameters tables group for RML " + job.Rml.Name); - } - - var processParameters = processGroup.ProcessParametersTables.FirstOrDefault(x => x.TableIndex == processParametersTableIndex); - - if (processParameters == null) - { - throw new NullReferenceException("Could not locate process parameters table index " + processParametersTableIndex + " in group " + processGroup.Name + " for RML " + job.Rml.Name); - } - - //Perform color correction - foreach (var stop in job.Segments.SelectMany(x => x.BrushStops)) - { - if (stop.LiquidVolumes == null) - { - stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); - } - - foreach (var liquidVolume in stop.LiquidVolumes) - { - liquidVolume.Volume = 10; - } - } - - if (!CanPrint) - { - throw new InvalidOperationException("Could not print while status = " + Status); - } - - RunningJob = null; - RunningJobStatus = null; - - var originalJob = job; - - CurrentProcessParameters = processParameters; - - StubJobRequest request = new StubJobRequest(); - - if (job.NumberOfUnits < 1) - { - job.NumberOfUnits = 1; - } - - job = job.Clone(); - - var segments = job.OrderedSegments.ToList(); - - for (int i = 0; i < job.NumberOfUnits - 1; i++) - { - foreach (var s in segments) - { - job.Segments.Add(s); - } - } - - JobTicket ticket = new JobTicket(); - ticket.Guid = originalJob.Guid; - ticket.EnableInterSegment = job.EnableInterSegment; - ticket.InterSegmentLength = job.InterSegmentLength; - ticket.Length = job.Length; - ticket.WindingMethod = (JobWindingMethod)job.WindingMethod.Code; - ticket.Spool = new JobSpool(); - - job.SpoolType.MapPrimitivesTo(ticket.Spool); - ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code; - - ProcessParameters process = new ProcessParameters(); - processParameters.MapPrimitivesTo(process); - ticket.ProcessParameters = process; - - foreach (var segment in job.OrderedSegments) - { - JobSegment jobSegment = new JobSegment(); - jobSegment.Length = segment.LengthWithFactor; - jobSegment.Name = segment.Name; - - foreach (var stop in segment.BrushStops) - { - JobBrushStop jobStop = new JobBrushStop(); - jobStop.Index = stop.StopIndex; - jobStop.OffsetPercent = stop.OffsetPercent; - jobStop.OffsetMeters = stop.OffsetMeters; - - if (stop.LiquidVolumes == null) - { - stop.SetLiquidVolumes(job.Machine.Configuration, job.Rml, processParameters); - } - - foreach (var liquidVolume in stop.LiquidVolumes) - { - JobDispenser dispenser = new JobDispenser(); - dispenser.Index = liquidVolume.IdsPack.PackIndex; - dispenser.Volume = liquidVolume.Volume; - dispenser.DispenserLiquidType = (DispenserLiquidType)liquidVolume.IdsPack.LiquidType.Code; - dispenser.DispenserStepDivision = (DispenserStepDivision)liquidVolume.DispenserStepDivision; - - dispenser.NanoliterPerPulse = liquidVolume.IdsPack.Dispenser.NlPerPulse; - - dispenser.LiquidMaxNanoliterPerCentimeter = liquidVolume.LiquidMaxNanoliterPerCentimeter; - dispenser.NanoliterPerCentimeter = liquidVolume.NanoliterPerCentimeter; - dispenser.NanolitterPerSecond = liquidVolume.NanoliterPerSecond; - dispenser.PulsePerSecond = liquidVolume.PulsePerSecond; - - jobStop.Dispensers.Add(dispenser); - } - - jobSegment.BrushStops.Add(jobStop); - } - - ticket.Segments.Add(jobSegment); - } - - request.JobTicket = ticket; - - JobHandler handler = null; - - handler = new JobHandler(async () => - { - try - { - var result = await SendRequest(new StubAbortJobRequest(), new TransportRequestConfig() { ShouldLog = true }); - OnPrintingAborted(handler, originalJob); - handler.RaiseCanceled(); - } - catch (Exception ex) - { - LogManager.Log(ex, "Failed to cancel job."); - } - }, originalJob, ticket, processParameters, JobHandlingMode); - - handler.StatusChanged += (x, s) => - { - RunningJobStatus = s; - }; - - bool responseLogged = false; - - SendContinuousRequest(request, new TransportContinuousRequestConfig() { ContinuousTimeout = ContinuousRequestTimeout, ShouldLog = true }).Subscribe((response) => - { - handler.RaiseStatusReceived(response.Message.Status); - - if (!responseLogged) - { - responseLogged = true; - Status = MachineStatuses.Printing; - RunningJob = originalJob; - OnPrintingStarted(handler, originalJob); - } - }, (ex) => - { - if (!(ex is ContinuousResponseAbortedException)) - { - Status = MachineStatuses.ReadyToDye; - - if (!handler.IsCanceled) - { - OnPrintingFailed(handler, originalJob, ex); - handler.RaiseFailed(ex); - } - } - else - { - Status = MachineStatuses.ReadyToDye; - } - }, () => - { - Status = MachineStatuses.ReadyToDye; - OnPrintingCompleted(handler, originalJob); - handler.RaiseCompleted(); - }); - - return handler; - - }); - } - /// /// Uploads the specified process parameters to the embedded device. /// diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs index b6ac9c9e1..0431913a4 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobTicket.cs @@ -25,23 +25,25 @@ namespace Tango.PMR.Printing { "Cg9Kb2JUaWNrZXQucHJvdG8SElRhbmdvLlBNUi5QcmludGluZxoQSm9iU2Vn", "bWVudC5wcm90bxoXUHJvY2Vzc1BhcmFtZXRlcnMucHJvdG8aFkpvYldpbmRp", "bmdNZXRob2QucHJvdG8aDkpvYlNwb29sLnByb3RvGhdKb2JVcGxvYWRTdHJh", - "dGVneS5wcm90byLxAwoJSm9iVGlja2V0EgwKBEd1aWQYASABKAkSDAoETmFt", - "ZRgCIAEoCRIaChJFbmFibGVJbnRlclNlZ21lbnQYAyABKAgSGgoSSW50ZXJT", - "ZWdtZW50TGVuZ3RoGAQgASgBEg4KBkxlbmd0aBgFIAEoARJAChFQcm9jZXNz", - "UGFyYW1ldGVycxgGIAEoCzIlLlRhbmdvLlBNUi5QcmludGluZy5Qcm9jZXNz", - "UGFyYW1ldGVycxI7Cg1XaW5kaW5nTWV0aG9kGAcgASgOMiQuVGFuZ28uUE1S", - "LlByaW50aW5nLkpvYldpbmRpbmdNZXRob2QSKwoFU3Bvb2wYCCABKAsyHC5U", - "YW5nby5QTVIuUHJpbnRpbmcuSm9iU3Bvb2wSMAoIU2VnbWVudHMYCSADKAsy", - "Hi5UYW5nby5QTVIuUHJpbnRpbmcuSm9iU2VnbWVudBI9Cg5VcGxvYWRTdHJh", - "dGVneRgKIAEoDjIlLlRhbmdvLlBNUi5QcmludGluZy5Kb2JVcGxvYWRTdHJh", - "dGVneRIaChJKb2JEZXNjcmlwdGlvbkZpbGUYCyABKAkSGQoRRW5hYmxlTHVi", - "cmljYXRpb24YDCABKAgSFQoNTnVtYmVyT2ZVbml0cxgNIAEoDRIVCg1TYW1w", - "bGVXaW5kaW5nGA4gASgIQh4KHGNvbS50d2luZS50YW5nby5wbXIucHJpbnRp", - "bmdiBnByb3RvMw==")); + "dGVneS5wcm90bxoWVGhyZWFkUGFyYW1ldGVycy5wcm90byKxBAoJSm9iVGlj", + "a2V0EgwKBEd1aWQYASABKAkSDAoETmFtZRgCIAEoCRIaChJFbmFibGVJbnRl", + "clNlZ21lbnQYAyABKAgSGgoSSW50ZXJTZWdtZW50TGVuZ3RoGAQgASgBEg4K", + "Bkxlbmd0aBgFIAEoARJAChFQcm9jZXNzUGFyYW1ldGVycxgGIAEoCzIlLlRh", + "bmdvLlBNUi5QcmludGluZy5Qcm9jZXNzUGFyYW1ldGVycxI7Cg1XaW5kaW5n", + "TWV0aG9kGAcgASgOMiQuVGFuZ28uUE1SLlByaW50aW5nLkpvYldpbmRpbmdN", + "ZXRob2QSKwoFU3Bvb2wYCCABKAsyHC5UYW5nby5QTVIuUHJpbnRpbmcuSm9i", + "U3Bvb2wSMAoIU2VnbWVudHMYCSADKAsyHi5UYW5nby5QTVIuUHJpbnRpbmcu", + "Sm9iU2VnbWVudBI9Cg5VcGxvYWRTdHJhdGVneRgKIAEoDjIlLlRhbmdvLlBN", + "Ui5QcmludGluZy5Kb2JVcGxvYWRTdHJhdGVneRIaChJKb2JEZXNjcmlwdGlv", + "bkZpbGUYCyABKAkSGQoRRW5hYmxlTHVicmljYXRpb24YDCABKAgSFQoNTnVt", + "YmVyT2ZVbml0cxgNIAEoDRIVCg1TYW1wbGVXaW5kaW5nGA4gASgIEj4KEFRo", + "cmVhZFBhcmFtZXRlcnMYDyABKAsyJC5UYW5nby5QTVIuUHJpbnRpbmcuVGhy", + "ZWFkUGFyYW1ldGVyc0IeChxjb20udHdpbmUudGFuZ28ucG1yLnByaW50aW5n", + "YgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSegmentReflection.Descriptor, global::Tango.PMR.Printing.ProcessParametersReflection.Descriptor, global::Tango.PMR.Printing.JobWindingMethodReflection.Descriptor, global::Tango.PMR.Printing.JobSpoolReflection.Descriptor, global::Tango.PMR.Printing.JobUploadStrategyReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSegmentReflection.Descriptor, global::Tango.PMR.Printing.ProcessParametersReflection.Descriptor, global::Tango.PMR.Printing.JobWindingMethodReflection.Descriptor, global::Tango.PMR.Printing.JobSpoolReflection.Descriptor, global::Tango.PMR.Printing.JobUploadStrategyReflection.Descriptor, global::Tango.PMR.Printing.ThreadParametersReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobTicket), global::Tango.PMR.Printing.JobTicket.Parser, new[]{ "Guid", "Name", "EnableInterSegment", "InterSegmentLength", "Length", "ProcessParameters", "WindingMethod", "Spool", "Segments", "UploadStrategy", "JobDescriptionFile", "EnableLubrication", "NumberOfUnits", "SampleWinding" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobTicket), global::Tango.PMR.Printing.JobTicket.Parser, new[]{ "Guid", "Name", "EnableInterSegment", "InterSegmentLength", "Length", "ProcessParameters", "WindingMethod", "Spool", "Segments", "UploadStrategy", "JobDescriptionFile", "EnableLubrication", "NumberOfUnits", "SampleWinding", "ThreadParameters" }, null, null, null) })); } #endregion @@ -86,6 +88,7 @@ namespace Tango.PMR.Printing { enableLubrication_ = other.enableLubrication_; numberOfUnits_ = other.numberOfUnits_; sampleWinding_ = other.sampleWinding_; + ThreadParameters = other.threadParameters_ != null ? other.ThreadParameters.Clone() : null; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -249,6 +252,17 @@ namespace Tango.PMR.Printing { } } + /// Field number for the "ThreadParameters" field. + public const int ThreadParametersFieldNumber = 15; + private global::Tango.PMR.Printing.ThreadParameters threadParameters_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Printing.ThreadParameters ThreadParameters { + get { return threadParameters_; } + set { + threadParameters_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as JobTicket); @@ -276,6 +290,7 @@ namespace Tango.PMR.Printing { if (EnableLubrication != other.EnableLubrication) return false; if (NumberOfUnits != other.NumberOfUnits) return false; if (SampleWinding != other.SampleWinding) return false; + if (!object.Equals(ThreadParameters, other.ThreadParameters)) return false; return true; } @@ -296,6 +311,7 @@ namespace Tango.PMR.Printing { if (EnableLubrication != false) hash ^= EnableLubrication.GetHashCode(); if (NumberOfUnits != 0) hash ^= NumberOfUnits.GetHashCode(); if (SampleWinding != false) hash ^= SampleWinding.GetHashCode(); + if (threadParameters_ != null) hash ^= ThreadParameters.GetHashCode(); return hash; } @@ -359,6 +375,10 @@ namespace Tango.PMR.Printing { output.WriteRawTag(112); output.WriteBool(SampleWinding); } + if (threadParameters_ != null) { + output.WriteRawTag(122); + output.WriteMessage(ThreadParameters); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -404,6 +424,9 @@ namespace Tango.PMR.Printing { if (SampleWinding != false) { size += 1 + 1; } + if (threadParameters_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ThreadParameters); + } return size; } @@ -458,6 +481,12 @@ namespace Tango.PMR.Printing { if (other.SampleWinding != false) { SampleWinding = other.SampleWinding; } + if (other.threadParameters_ != null) { + if (threadParameters_ == null) { + threadParameters_ = new global::Tango.PMR.Printing.ThreadParameters(); + } + ThreadParameters.MergeFrom(other.ThreadParameters); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -530,6 +559,13 @@ namespace Tango.PMR.Printing { SampleWinding = input.ReadBool(); break; } + case 122: { + if (threadParameters_ == null) { + threadParameters_ = new global::Tango.PMR.Printing.ThreadParameters(); + } + input.ReadMessage(threadParameters_); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs b/Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs new file mode 100644 index 000000000..3c927627f --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Printing/ThreadParameters.cs @@ -0,0 +1,386 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ThreadParameters.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.Printing { + + /// Holder for reflection information generated from ThreadParameters.proto + public static partial class ThreadParametersReflection { + + #region Descriptor + /// File descriptor for ThreadParameters.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ThreadParametersReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChZUaHJlYWRQYXJhbWV0ZXJzLnByb3RvEhJUYW5nby5QTVIuUHJpbnRpbmci", + "qwEKEFRocmVhZFBhcmFtZXRlcnMSDwoHRmVlZGVyUBgBIAEoBRIPCgdGZWVk", + "ZXJJGAIgASgFEg8KB0ZlZWRlckQYAyABKAUSDwoHUHVsbGVyUBgEIAEoBRIP", + "CgdQdWxsZXJJGAUgASgFEg8KB1B1bGxlckQYBiABKAUSDwoHV2luZGVyUBgH", + "IAEoBRIPCgdXaW5kZXJJGAggASgFEg8KB1dpbmRlckQYCSABKAVCHgocY29t", + "LnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.ThreadParameters), global::Tango.PMR.Printing.ThreadParameters.Parser, new[]{ "FeederP", "FeederI", "FeederD", "PullerP", "PullerI", "PullerD", "WinderP", "WinderI", "WinderD" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ThreadParameters : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThreadParameters()); + [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.Printing.ThreadParametersReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThreadParameters() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThreadParameters(ThreadParameters other) : this() { + feederP_ = other.feederP_; + feederI_ = other.feederI_; + feederD_ = other.feederD_; + pullerP_ = other.pullerP_; + pullerI_ = other.pullerI_; + pullerD_ = other.pullerD_; + winderP_ = other.winderP_; + winderI_ = other.winderI_; + winderD_ = other.winderD_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThreadParameters Clone() { + return new ThreadParameters(this); + } + + /// Field number for the "FeederP" field. + public const int FeederPFieldNumber = 1; + private int feederP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FeederP { + get { return feederP_; } + set { + feederP_ = value; + } + } + + /// Field number for the "FeederI" field. + public const int FeederIFieldNumber = 2; + private int feederI_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FeederI { + get { return feederI_; } + set { + feederI_ = value; + } + } + + /// Field number for the "FeederD" field. + public const int FeederDFieldNumber = 3; + private int feederD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FeederD { + get { return feederD_; } + set { + feederD_ = value; + } + } + + /// Field number for the "PullerP" field. + public const int PullerPFieldNumber = 4; + private int pullerP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PullerP { + get { return pullerP_; } + set { + pullerP_ = value; + } + } + + /// Field number for the "PullerI" field. + public const int PullerIFieldNumber = 5; + private int pullerI_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PullerI { + get { return pullerI_; } + set { + pullerI_ = value; + } + } + + /// Field number for the "PullerD" field. + public const int PullerDFieldNumber = 6; + private int pullerD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PullerD { + get { return pullerD_; } + set { + pullerD_ = value; + } + } + + /// Field number for the "WinderP" field. + public const int WinderPFieldNumber = 7; + private int winderP_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WinderP { + get { return winderP_; } + set { + winderP_ = value; + } + } + + /// Field number for the "WinderI" field. + public const int WinderIFieldNumber = 8; + private int winderI_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WinderI { + get { return winderI_; } + set { + winderI_ = value; + } + } + + /// Field number for the "WinderD" field. + public const int WinderDFieldNumber = 9; + private int winderD_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WinderD { + get { return winderD_; } + set { + winderD_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ThreadParameters); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ThreadParameters other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FeederP != other.FeederP) return false; + if (FeederI != other.FeederI) return false; + if (FeederD != other.FeederD) return false; + if (PullerP != other.PullerP) return false; + if (PullerI != other.PullerI) return false; + if (PullerD != other.PullerD) return false; + if (WinderP != other.WinderP) return false; + if (WinderI != other.WinderI) return false; + if (WinderD != other.WinderD) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (FeederP != 0) hash ^= FeederP.GetHashCode(); + if (FeederI != 0) hash ^= FeederI.GetHashCode(); + if (FeederD != 0) hash ^= FeederD.GetHashCode(); + if (PullerP != 0) hash ^= PullerP.GetHashCode(); + if (PullerI != 0) hash ^= PullerI.GetHashCode(); + if (PullerD != 0) hash ^= PullerD.GetHashCode(); + if (WinderP != 0) hash ^= WinderP.GetHashCode(); + if (WinderI != 0) hash ^= WinderI.GetHashCode(); + if (WinderD != 0) hash ^= WinderD.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 (FeederP != 0) { + output.WriteRawTag(8); + output.WriteInt32(FeederP); + } + if (FeederI != 0) { + output.WriteRawTag(16); + output.WriteInt32(FeederI); + } + if (FeederD != 0) { + output.WriteRawTag(24); + output.WriteInt32(FeederD); + } + if (PullerP != 0) { + output.WriteRawTag(32); + output.WriteInt32(PullerP); + } + if (PullerI != 0) { + output.WriteRawTag(40); + output.WriteInt32(PullerI); + } + if (PullerD != 0) { + output.WriteRawTag(48); + output.WriteInt32(PullerD); + } + if (WinderP != 0) { + output.WriteRawTag(56); + output.WriteInt32(WinderP); + } + if (WinderI != 0) { + output.WriteRawTag(64); + output.WriteInt32(WinderI); + } + if (WinderD != 0) { + output.WriteRawTag(72); + output.WriteInt32(WinderD); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (FeederP != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FeederP); + } + if (FeederI != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FeederI); + } + if (FeederD != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FeederD); + } + if (PullerP != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PullerP); + } + if (PullerI != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PullerI); + } + if (PullerD != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PullerD); + } + if (WinderP != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinderP); + } + if (WinderI != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinderI); + } + if (WinderD != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinderD); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ThreadParameters other) { + if (other == null) { + return; + } + if (other.FeederP != 0) { + FeederP = other.FeederP; + } + if (other.FeederI != 0) { + FeederI = other.FeederI; + } + if (other.FeederD != 0) { + FeederD = other.FeederD; + } + if (other.PullerP != 0) { + PullerP = other.PullerP; + } + if (other.PullerI != 0) { + PullerI = other.PullerI; + } + if (other.PullerD != 0) { + PullerD = other.PullerD; + } + if (other.WinderP != 0) { + WinderP = other.WinderP; + } + if (other.WinderI != 0) { + WinderI = other.WinderI; + } + if (other.WinderD != 0) { + WinderD = other.WinderD; + } + } + + [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: { + FeederP = input.ReadInt32(); + break; + } + case 16: { + FeederI = input.ReadInt32(); + break; + } + case 24: { + FeederD = input.ReadInt32(); + break; + } + case 32: { + PullerP = input.ReadInt32(); + break; + } + case 40: { + PullerI = input.ReadInt32(); + break; + } + case 48: { + PullerD = input.ReadInt32(); + break; + } + case 56: { + WinderP = input.ReadInt32(); + break; + } + case 64: { + WinderI = input.ReadInt32(); + break; + } + case 72: { + WinderD = input.ReadInt32(); + 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 0eecc5283..3dd9d7f48 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -283,6 +283,7 @@ + @@ -322,7 +323,7 @@ - + \ No newline at end of file -- cgit v1.3.1