From 8e49a8041391c9aa946060aed2c538b1ce958a68 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 19 Sep 2019 18:29:10 +0300 Subject: Added support for multiple ColorLib versions ! Added version control and display in RML & Research Module. Implemented GenerateHive optimizations. --- .../MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml | 3 +++ .../MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml | 2 ++ 2 files changed, 5 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views') 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 628b9e402..f81ce804e 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 @@ -179,6 +179,9 @@ + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index ec1e1a78a..9f09ad248 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -61,6 +61,8 @@ + + -- cgit v1.3.1 From cd5a926df30ea7e7a4f4f4a55d71b43ec7aee3e1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 22 Sep 2019 18:23:40 +0300 Subject: Implemented auto process selection on color space volume. Implemented number of units on Device. Fixed issue with color conversion process index. Increased max volume to 200 on PPC. Implemented Thread cloning on MS! --- Software/PMR/Messages/Printing/JobTicket.proto | 5 +- .../ColorLib/Tango.ColorLib_v2/ColorConverter.cpp | 13 +++- .../Tango.ColorLib_v2/Utils/ColorTransf.cpp | 2 +- .../ViewModels/MainViewVM.cs | 74 +++++++++++++++++++++- .../Tango.MachineStudio.RML/Views/RmlsView.xaml | 6 ++ .../MachineStudioSettings.cs | 7 ++ .../Notifications/TextInputBoxWindow.xaml | 2 +- .../ViewModels/MainViewVM.cs | 1 + .../Tango.MachineStudio.UI/Views/AboutView.xaml | 12 ++-- .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 2 +- .../Printing/DefaultPrintingManager.cs | 12 +--- .../Tango.Emulations/Emulators/MachineEmulator.cs | 9 +-- .../Operation/IMachineOperator.cs | 5 ++ .../Tango.Integration/Operation/JobUnitsMethods.cs | 23 +++++++ .../Tango.Integration/Operation/MachineOperator.cs | 34 ++++++++-- .../Tango.Integration/Tango.Integration.csproj | 3 +- .../Visual_Studio/Tango.PMR/Printing/JobTicket.cs | 45 ++++++------- 17 files changed, 197 insertions(+), 58 deletions(-) create mode 100644 Software/Visual_Studio/Tango.Integration/Operation/JobUnitsMethods.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views') diff --git a/Software/PMR/Messages/Printing/JobTicket.proto b/Software/PMR/Messages/Printing/JobTicket.proto index 4bd4390fb..9824f6ef0 100644 --- a/Software/PMR/Messages/Printing/JobTicket.proto +++ b/Software/PMR/Messages/Printing/JobTicket.proto @@ -30,8 +30,9 @@ message JobTicket string JobDescriptionFile = 11; bool EnableLubrication = 12; - //repeat the job - uint32 units = 13; + + uint32 NumberOfUnits = 13; + //sample winding winds each segment densely on a small part of the spool, end moves one for the next segment bool SampleWinding = 14; } \ No newline at end of file diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/ColorConverter.cpp b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/ColorConverter.cpp index 4c6186efb..61fc387c6 100644 --- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/ColorConverter.cpp +++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/ColorConverter.cpp @@ -1333,8 +1333,19 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(ConversionInput* VectorXd NLInkP((int)(m_nVolumes)); VectorXd InkOut((int)(m_nVolumes)); //Convert to Nonlinear Inks + double SumVol_Ink = 0.0; + for (int i = 0; i < m_nVolumes; ++i) + { Volume(i) = conversionInput->inputcoordinates->inputliquids[i]->volume; //volume is given in % + SumVol_Ink += Volume(i); + } + for (int i = 0; i < int(conversionInput->n_processranges - 1); ++i) + { + if (SumVol_Ink > m_ProcessRangesMaxP[i]) + GamutRegion++; + } + VolumeToNLInkP(Volume, NLInkP); double *InkOutP = new double[m_nA2BnSepIn]; VectorToDouble(NLInkP, InkOutP); @@ -1367,7 +1378,6 @@ void Tango::ColorLib::ColorConverter::ConvertVolumeToRGBDisplay(ConversionInput* } //Convert to RGB - GamutRegion = 0; //Convert to Lab double *LabOutP = new double[m_nA2BnSepOut]; @@ -1606,6 +1616,7 @@ size_t Tango::ColorLib::ColorConverter::Convert(uint8_t * input_buffer, size_t i output_coordinates__init(outputCoords); fillRGB(outputCoords, RGBOut); fillLab(outputCoords, LabOut); + outputCoords->has_processparameterstableindex = true; outputCoords->processparameterstableindex = GamutRegion; fillVolume(outputCoords, Volume); conversionOutput->has_outofgamut = true; diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/Utils/ColorTransf.cpp b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/Utils/ColorTransf.cpp index 39b8ee983..d695c71e6 100644 --- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/Utils/ColorTransf.cpp +++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v2/Utils/ColorTransf.cpp @@ -457,7 +457,7 @@ void ColorTransf::evalInkP2Lab(double *ColorIn, double *&ColorOut, int &GamutReg ColorOut[0] = tmpLabOut.Get_x(); ColorOut[1] = tmpLabOut.Get_y(); ColorOut[2] = tmpLabOut.Get_z(); - GamutRegion = 0; + //GamutRegion = 0; if (iColorIn != NULL) { delete[] iColorIn; 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 c2637b527..a76799881 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 @@ -20,6 +20,7 @@ using Tango.MachineStudio.RML.Models; using Tango.MachineStudio.RML.Views; using Tango.PMR.ColorLab; using System.Data.Entity; +using Tango.Core.ExtensionMethods; namespace Tango.MachineStudio.RML.ViewModels { @@ -178,11 +179,14 @@ namespace Tango.MachineStudio.RML.ViewModels public RelayCommand SaveCommand { get; set; } + public RelayCommand CloneRmlCommand { get; set; } + public MainViewVM(INotificationProvider notificationProvider) { _notification = notificationProvider; ManageRmlCommand = new RelayCommand(() => LoadActiveRML(SelectedRML.Guid), () => SelectedRML != null); - RemoveRmlCommand = new RelayCommand(RemoveSelectedRml); + RemoveRmlCommand = new RelayCommand(RemoveSelectedRml, () => SelectedRML != null); + CloneRmlCommand = new RelayCommand(CloneSelectedRml, () => SelectedRML != null); AddRmlCommand = new RelayCommand(AddNewRml); BackToRmlsCommand = new RelayCommand(BackToRmls, () => IsFree); AddProcessParametersTableCommand = new RelayCommand(AddProcessParametersTable, () => IsFree); @@ -443,6 +447,74 @@ namespace Tango.MachineStudio.RML.ViewModels } } + private async void CloneSelectedRml() + { + String name = _notification.ShowTextInput("Enter thread name", "thread name"); + + if (!String.IsNullOrWhiteSpace(name)) + { + using (_notification.PushTaskItem("Cloning thread...")) + { + try + { + IsFree = false; + + using (var context = ObservablesContext.CreateDefault()) + { + var rml = await new RmlBuilder(context).Set(SelectedRML.Guid).WithActiveParametersGroup().WithLiquidFactors().BuildAsync(); + + Rml cloned = new Rml(); + rml.MapPrimitivesWithStrings(cloned); + + cloned.Code = Rmls.Max(x => x.Code) + 1; + cloned.Guid = Guid.NewGuid().ToString(); + cloned.ID = 0; + cloned.Name = name; + + ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); + group.Name = rml.GetActiveProcessGroup().Name; + group.Active = true; + + foreach (var p in rml.GetActiveProcessGroup().ProcessParametersTables) + { + var pc = new ProcessParametersTable(); + p.MapPrimitivesTo(pc); + pc.Name = p.Name; + + group.ProcessParametersTables.Add(pc); + } + + cloned.ProcessParametersTablesGroups.Add(group); + + foreach (var liquidFactor in rml.LiquidTypesRmls) + { + LiquidTypesRml l = new LiquidTypesRml(); + l.DefaultCatData = liquidFactor.DefaultCatData; + l.LiquidType = liquidFactor.LiquidType; + l.MaxNlPerCm = liquidFactor.MaxNlPerCm; + cloned.LiquidTypesRmls.Add(l); + } + + context.Rmls.Add(cloned); + await context.SaveChangesAsync(); + } + + LoadRmls(); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error cloning thread."); + _notification.ShowError($"An error occurred while trying to clone the selected thread\n{ex.Message}"); + } + finally + { + IsFree = true; + } + } + + } + } + private void AddProcessParametersTable() { var name = _notification.ShowTextInput("Enter table name", "Name"); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index 9f09ad248..719167679 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -31,6 +31,12 @@ DELETE + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config index ff251eb7d..1fafd5ffd 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/app.config @@ -20,7 +20,7 @@ - + @@ -28,27 +28,27 @@ - + - + - + - + - + - + @@ -72,7 +72,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config index 999461d6a..85174f848 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/packages.config @@ -8,6 +8,8 @@ + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index 719167679..fdfc00ba6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -40,7 +40,7 @@ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config index b8ad73b04..59f92d6b9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.config @@ -78,7 +78,7 @@ - + diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs index ad44ee56d..d23e9b1f2 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs @@ -393,24 +393,21 @@ namespace Tango.BL.Entities /// The process parameters table. public void SetLiquidVolumes(Configuration configuration, Rml rml, ProcessParametersTable processParametersTable) { - _liquidVolumes = null; + LiquidVolumes = new ObservableCollection(); - ObservableCollection liquidVolumes = new ObservableCollection(); - foreach (var idsPack in configuration.GetSupportedIdsPacks(rml)) { var liquidVolume = new LiquidVolume(configuration, idsPack, rml, processParametersTable, this); liquidVolume.VolumeChanged += LiquidVolume_VolumeChanged; - liquidVolumes.Add(liquidVolume); + LiquidVolumes.Add(liquidVolume); } - foreach (var volume in liquidVolumes.ToList()) + foreach (var volume in LiquidVolumes.ToList()) { volume.Invalidate(); } - LiquidVolumes = liquidVolumes; - + RaisePropertyChanged(nameof(LiquidVolumes)); RaisePropertyChanged(nameof(LiquidVolumesOrdered)); RaisePropertyChanged(nameof(LiquidVolumesOrderedPigmented)); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/Job.cs b/Software/Visual_Studio/Tango.BL/Entities/Job.cs index 2d536c268..de1107077 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Job.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Job.cs @@ -568,6 +568,7 @@ namespace Tango.BL.Entities using (ObservablesContext db = ObservablesContext.CreateDefault()) { var job = new JobBuilder(db).Set(Guid).WithUser().WithRML().WithSegments().WithBrushStops().Build(); + var machine = new MachineBuilder(db).Set(job.MachineGuid).WithConfiguration().Build(); var jobFile = new JobFile(); @@ -609,6 +610,24 @@ namespace Tango.BL.Entities JobFileBrushStop st = new JobFileBrushStop(); stop.MapPrimitivesWithStringsNoNullsTo(st); st.ColorCatalogItemGuid = stop.ColorCatalogsItemGuid.ToStringOrEmpty(); + + foreach (var idsPack in machine.Configuration.NoneEmptyIdsPacks) + { + try + { + var volume = stop.GetVolume(idsPack.PackIndex); + st.LiquidVolumes.Add(new JobFileLiquidVolume() + { + LiquidTypeName = idsPack.LiquidType.Name, + Volume = volume, + }); + } + catch (Exception ex) + { + throw new InvalidOperationException($"Error extracting liquid volume from ids pack {idsPack.PackIndex}", ex); + } + } + s.BrushStops.Add(st); } } @@ -624,10 +643,21 @@ namespace Tango.BL.Entities { using (ObservablesContext db = ObservablesContext.CreateDefault()) { + Machine machine; + var job = new Job(); job.MachineGuid = machineGuid; job.UserGuid = userGuid; + try + { + machine = new MachineBuilder(db).Set(machineGuid).WithConfiguration().Build(); + } + catch + { + throw new ArgumentException("Error loading the machine details."); + } + if (!String.IsNullOrEmpty(jobFile.ColorSpaceGuid)) { var job_color_space = db.ColorSpaces.SingleOrDefault(x => x.Guid == jobFile.ColorSpaceGuid); @@ -708,6 +738,19 @@ namespace Tango.BL.Entities st.SegmentGuid = s.Guid; stop.MapPrimitivesWithStringsNoNullsTo(st); + foreach (var volume in stop.LiquidVolumes) + { + var idsPack = machine.Configuration.NoneEmptyIdsPacks.SingleOrDefault(x => x.LiquidType.Name == volume.LiquidTypeName); + + if (idsPack == null) + { + throw new InvalidOperationException($"Liquid type '{volume.LiquidTypeName}' is not configured on the target machine."); + } + + st.SetVolume(idsPack.PackIndex, volume.Volume); + } + + if (!String.IsNullOrWhiteSpace(stop.ColorCatalogGuid)) { var stop_color_catalog = db.ColorCatalogs.SingleOrDefault(x => x.Guid == stop.ColorCatalogGuid); @@ -724,7 +767,7 @@ namespace Tango.BL.Entities st.ColorCatalogsItemGuid = stop.ColorCatalogItemGuid; } - + s.BrushStops.Add(st); } } diff --git a/Software/Visual_Studio/Tango.PMR/Exports/JobFileBrushStop.cs b/Software/Visual_Studio/Tango.PMR/Exports/JobFileBrushStop.cs index 26dec4be0..36da58b4e 100644 --- a/Software/Visual_Studio/Tango.PMR/Exports/JobFileBrushStop.cs +++ b/Software/Visual_Studio/Tango.PMR/Exports/JobFileBrushStop.cs @@ -22,21 +22,21 @@ namespace Tango.PMR.Exports { static JobFileBrushStopReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChZKb2JGaWxlQnJ1c2hTdG9wLnByb3RvEhFUYW5nby5QTVIuRXhwb3J0cyL1", - "AgoQSm9iRmlsZUJydXNoU3RvcBIWCg5Db2xvclNwYWNlR3VpZBgBIAEoCRIV", - "Cg1PZmZzZXRQZXJjZW50GAIgASgBEgwKBEN5YW4YAyABKAESDwoHTWFnZW50", - "YRgEIAEoARIOCgZZZWxsb3cYBSABKAESDQoFQmxhY2sYBiABKAESCwoDUmVk", - "GAcgASgFEg0KBUdyZWVuGAggASgFEgwKBEJsdWUYCSABKAUSCQoBTBgKIAEo", - "ARIJCgFBGAsgASgBEgkKAUIYDCABKAESCgoCVjAYDSABKAESCgoCVjEYDiAB", - "KAESCgoCVjIYDyABKAESCgoCVjMYECABKAESCgoCVjQYESABKAESCgoCVjUY", - "EiABKAESCgoCVjYYEyABKAESCgoCVjcYFCABKAESEQoJQ29ycmVjdGVkGBUg", - "ASgIEhgKEENvbG9yQ2F0YWxvZ0d1aWQYFiABKAkSHAoUQ29sb3JDYXRhbG9n", - "SXRlbUd1aWQYFyABKAlCHQobY29tLnR3aW5lLnRhbmdvLnBtci5leHBvcnRz", - "YgZwcm90bzM=")); + "ChZKb2JGaWxlQnJ1c2hTdG9wLnByb3RvEhFUYW5nby5QTVIuRXhwb3J0cxoZ", + "Sm9iRmlsZUxpcXVpZFZvbHVtZS5wcm90byLUAgoQSm9iRmlsZUJydXNoU3Rv", + "cBIWCg5Db2xvclNwYWNlR3VpZBgBIAEoCRIVCg1PZmZzZXRQZXJjZW50GAIg", + "ASgBEgwKBEN5YW4YAyABKAESDwoHTWFnZW50YRgEIAEoARIOCgZZZWxsb3cY", + "BSABKAESDQoFQmxhY2sYBiABKAESCwoDUmVkGAcgASgFEg0KBUdyZWVuGAgg", + "ASgFEgwKBEJsdWUYCSABKAUSCQoBTBgKIAEoARIJCgFBGAsgASgBEgkKAUIY", + "DCABKAESPQoNTGlxdWlkVm9sdW1lcxgYIAMoCzImLlRhbmdvLlBNUi5FeHBv", + "cnRzLkpvYkZpbGVMaXF1aWRWb2x1bWUSEQoJQ29ycmVjdGVkGBUgASgIEhgK", + "EENvbG9yQ2F0YWxvZ0d1aWQYFiABKAkSHAoUQ29sb3JDYXRhbG9nSXRlbUd1", + "aWQYFyABKAlCHQobY29tLnR3aW5lLnRhbmdvLnBtci5leHBvcnRzYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, + new pbr::FileDescriptor[] { global::Tango.PMR.Exports.JobFileLiquidVolumeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Exports.JobFileBrushStop), global::Tango.PMR.Exports.JobFileBrushStop.Parser, new[]{ "ColorSpaceGuid", "OffsetPercent", "Cyan", "Magenta", "Yellow", "Black", "Red", "Green", "Blue", "L", "A", "B", "V0", "V1", "V2", "V3", "V4", "V5", "V6", "V7", "Corrected", "ColorCatalogGuid", "ColorCatalogItemGuid" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Exports.JobFileBrushStop), global::Tango.PMR.Exports.JobFileBrushStop.Parser, new[]{ "ColorSpaceGuid", "OffsetPercent", "Cyan", "Magenta", "Yellow", "Black", "Red", "Green", "Blue", "L", "A", "B", "LiquidVolumes", "Corrected", "ColorCatalogGuid", "ColorCatalogItemGuid" }, null, null, null) })); } #endregion @@ -79,14 +79,7 @@ namespace Tango.PMR.Exports { l_ = other.l_; a_ = other.a_; b_ = other.b_; - v0_ = other.v0_; - v1_ = other.v1_; - v2_ = other.v2_; - v3_ = other.v3_; - v4_ = other.v4_; - v5_ = other.v5_; - v6_ = other.v6_; - v7_ = other.v7_; + liquidVolumes_ = other.liquidVolumes_.Clone(); corrected_ = other.corrected_; colorCatalogGuid_ = other.colorCatalogGuid_; colorCatalogItemGuid_ = other.colorCatalogItemGuid_; @@ -229,92 +222,14 @@ namespace Tango.PMR.Exports { } } - /// Field number for the "V0" field. - public const int V0FieldNumber = 13; - private double v0_; + /// Field number for the "LiquidVolumes" field. + public const int LiquidVolumesFieldNumber = 24; + private static readonly pb::FieldCodec _repeated_liquidVolumes_codec + = pb::FieldCodec.ForMessage(194, global::Tango.PMR.Exports.JobFileLiquidVolume.Parser); + private readonly pbc::RepeatedField liquidVolumes_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V0 { - get { return v0_; } - set { - v0_ = value; - } - } - - /// Field number for the "V1" field. - public const int V1FieldNumber = 14; - private double v1_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V1 { - get { return v1_; } - set { - v1_ = value; - } - } - - /// Field number for the "V2" field. - public const int V2FieldNumber = 15; - private double v2_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V2 { - get { return v2_; } - set { - v2_ = value; - } - } - - /// Field number for the "V3" field. - public const int V3FieldNumber = 16; - private double v3_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V3 { - get { return v3_; } - set { - v3_ = value; - } - } - - /// Field number for the "V4" field. - public const int V4FieldNumber = 17; - private double v4_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V4 { - get { return v4_; } - set { - v4_ = value; - } - } - - /// Field number for the "V5" field. - public const int V5FieldNumber = 18; - private double v5_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V5 { - get { return v5_; } - set { - v5_ = value; - } - } - - /// Field number for the "V6" field. - public const int V6FieldNumber = 19; - private double v6_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V6 { - get { return v6_; } - set { - v6_ = value; - } - } - - /// Field number for the "V7" field. - public const int V7FieldNumber = 20; - private double v7_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double V7 { - get { return v7_; } - set { - v7_ = value; - } + public pbc::RepeatedField LiquidVolumes { + get { return liquidVolumes_; } } /// Field number for the "Corrected" field. @@ -375,14 +290,7 @@ namespace Tango.PMR.Exports { if (L != other.L) return false; if (A != other.A) return false; if (B != other.B) return false; - if (V0 != other.V0) return false; - if (V1 != other.V1) return false; - if (V2 != other.V2) return false; - if (V3 != other.V3) return false; - if (V4 != other.V4) return false; - if (V5 != other.V5) return false; - if (V6 != other.V6) return false; - if (V7 != other.V7) return false; + if(!liquidVolumes_.Equals(other.liquidVolumes_)) return false; if (Corrected != other.Corrected) return false; if (ColorCatalogGuid != other.ColorCatalogGuid) return false; if (ColorCatalogItemGuid != other.ColorCatalogItemGuid) return false; @@ -404,14 +312,7 @@ namespace Tango.PMR.Exports { if (L != 0D) hash ^= L.GetHashCode(); if (A != 0D) hash ^= A.GetHashCode(); if (B != 0D) hash ^= B.GetHashCode(); - if (V0 != 0D) hash ^= V0.GetHashCode(); - if (V1 != 0D) hash ^= V1.GetHashCode(); - if (V2 != 0D) hash ^= V2.GetHashCode(); - if (V3 != 0D) hash ^= V3.GetHashCode(); - if (V4 != 0D) hash ^= V4.GetHashCode(); - if (V5 != 0D) hash ^= V5.GetHashCode(); - if (V6 != 0D) hash ^= V6.GetHashCode(); - if (V7 != 0D) hash ^= V7.GetHashCode(); + hash ^= liquidVolumes_.GetHashCode(); if (Corrected != false) hash ^= Corrected.GetHashCode(); if (ColorCatalogGuid.Length != 0) hash ^= ColorCatalogGuid.GetHashCode(); if (ColorCatalogItemGuid.Length != 0) hash ^= ColorCatalogItemGuid.GetHashCode(); @@ -473,38 +374,6 @@ namespace Tango.PMR.Exports { output.WriteRawTag(97); output.WriteDouble(B); } - if (V0 != 0D) { - output.WriteRawTag(105); - output.WriteDouble(V0); - } - if (V1 != 0D) { - output.WriteRawTag(113); - output.WriteDouble(V1); - } - if (V2 != 0D) { - output.WriteRawTag(121); - output.WriteDouble(V2); - } - if (V3 != 0D) { - output.WriteRawTag(129, 1); - output.WriteDouble(V3); - } - if (V4 != 0D) { - output.WriteRawTag(137, 1); - output.WriteDouble(V4); - } - if (V5 != 0D) { - output.WriteRawTag(145, 1); - output.WriteDouble(V5); - } - if (V6 != 0D) { - output.WriteRawTag(153, 1); - output.WriteDouble(V6); - } - if (V7 != 0D) { - output.WriteRawTag(161, 1); - output.WriteDouble(V7); - } if (Corrected != false) { output.WriteRawTag(168, 1); output.WriteBool(Corrected); @@ -517,6 +386,7 @@ namespace Tango.PMR.Exports { output.WriteRawTag(186, 1); output.WriteString(ColorCatalogItemGuid); } + liquidVolumes_.WriteTo(output, _repeated_liquidVolumes_codec); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -558,30 +428,7 @@ namespace Tango.PMR.Exports { if (B != 0D) { size += 1 + 8; } - if (V0 != 0D) { - size += 1 + 8; - } - if (V1 != 0D) { - size += 1 + 8; - } - if (V2 != 0D) { - size += 1 + 8; - } - if (V3 != 0D) { - size += 2 + 8; - } - if (V4 != 0D) { - size += 2 + 8; - } - if (V5 != 0D) { - size += 2 + 8; - } - if (V6 != 0D) { - size += 2 + 8; - } - if (V7 != 0D) { - size += 2 + 8; - } + size += liquidVolumes_.CalculateSize(_repeated_liquidVolumes_codec); if (Corrected != false) { size += 2 + 1; } @@ -635,30 +482,7 @@ namespace Tango.PMR.Exports { if (other.B != 0D) { B = other.B; } - if (other.V0 != 0D) { - V0 = other.V0; - } - if (other.V1 != 0D) { - V1 = other.V1; - } - if (other.V2 != 0D) { - V2 = other.V2; - } - if (other.V3 != 0D) { - V3 = other.V3; - } - if (other.V4 != 0D) { - V4 = other.V4; - } - if (other.V5 != 0D) { - V5 = other.V5; - } - if (other.V6 != 0D) { - V6 = other.V6; - } - if (other.V7 != 0D) { - V7 = other.V7; - } + liquidVolumes_.Add(other.liquidVolumes_); if (other.Corrected != false) { Corrected = other.Corrected; } @@ -726,38 +550,6 @@ namespace Tango.PMR.Exports { B = input.ReadDouble(); break; } - case 105: { - V0 = input.ReadDouble(); - break; - } - case 113: { - V1 = input.ReadDouble(); - break; - } - case 121: { - V2 = input.ReadDouble(); - break; - } - case 129: { - V3 = input.ReadDouble(); - break; - } - case 137: { - V4 = input.ReadDouble(); - break; - } - case 145: { - V5 = input.ReadDouble(); - break; - } - case 153: { - V6 = input.ReadDouble(); - break; - } - case 161: { - V7 = input.ReadDouble(); - break; - } case 168: { Corrected = input.ReadBool(); break; @@ -770,6 +562,10 @@ namespace Tango.PMR.Exports { ColorCatalogItemGuid = input.ReadString(); break; } + case 194: { + liquidVolumes_.AddEntriesFrom(input, _repeated_liquidVolumes_codec); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Exports/JobFileLiquidVolume.cs b/Software/Visual_Studio/Tango.PMR/Exports/JobFileLiquidVolume.cs new file mode 100644 index 000000000..ddd3f42ed --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Exports/JobFileLiquidVolume.cs @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: JobFileLiquidVolume.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.Exports { + + /// Holder for reflection information generated from JobFileLiquidVolume.proto + public static partial class JobFileLiquidVolumeReflection { + + #region Descriptor + /// File descriptor for JobFileLiquidVolume.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static JobFileLiquidVolumeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChlKb2JGaWxlTGlxdWlkVm9sdW1lLnByb3RvEhFUYW5nby5QTVIuRXhwb3J0", + "cyI9ChNKb2JGaWxlTGlxdWlkVm9sdW1lEhYKDkxpcXVpZFR5cGVOYW1lGAEg", + "ASgJEg4KBlZvbHVtZRgCIAEoAUIdChtjb20udHdpbmUudGFuZ28ucG1yLmV4", + "cG9ydHNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Exports.JobFileLiquidVolume), global::Tango.PMR.Exports.JobFileLiquidVolume.Parser, new[]{ "LiquidTypeName", "Volume" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class JobFileLiquidVolume : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JobFileLiquidVolume()); + [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.Exports.JobFileLiquidVolumeReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public JobFileLiquidVolume() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public JobFileLiquidVolume(JobFileLiquidVolume other) : this() { + liquidTypeName_ = other.liquidTypeName_; + volume_ = other.volume_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public JobFileLiquidVolume Clone() { + return new JobFileLiquidVolume(this); + } + + /// Field number for the "LiquidTypeName" field. + public const int LiquidTypeNameFieldNumber = 1; + private string liquidTypeName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string LiquidTypeName { + get { return liquidTypeName_; } + set { + liquidTypeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Volume" field. + public const int VolumeFieldNumber = 2; + private double volume_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Volume { + get { return volume_; } + set { + volume_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as JobFileLiquidVolume); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(JobFileLiquidVolume other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (LiquidTypeName != other.LiquidTypeName) return false; + if (Volume != other.Volume) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (LiquidTypeName.Length != 0) hash ^= LiquidTypeName.GetHashCode(); + if (Volume != 0D) hash ^= Volume.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 (LiquidTypeName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LiquidTypeName); + } + if (Volume != 0D) { + output.WriteRawTag(17); + output.WriteDouble(Volume); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (LiquidTypeName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LiquidTypeName); + } + if (Volume != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(JobFileLiquidVolume other) { + if (other == null) { + return; + } + if (other.LiquidTypeName.Length != 0) { + LiquidTypeName = other.LiquidTypeName; + } + if (other.Volume != 0D) { + Volume = other.Volume; + } + } + + [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: { + LiquidTypeName = input.ReadString(); + break; + } + case 17: { + Volume = input.ReadDouble(); + 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 b83f98fd6..2ede3ac5e 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -172,6 +172,7 @@ + @@ -305,7 +306,7 @@ - + \ No newline at end of file -- cgit v1.3.1