From b5c5758e431077d84fb53a3ff62f8e751fca2731 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 23 Sep 2019 18:22:32 +0300 Subject: Implemented Insufficient liquid levels !!! --- .../ViewModels/InsufficientLiquidQuantityViewVM.cs | 20 ++++++++++++++++++++ .../ViewModels/MainViewVM.cs | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/InsufficientLiquidQuantityViewVM.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/InsufficientLiquidQuantityViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/InsufficientLiquidQuantityViewVM.cs new file mode 100644 index 000000000..e18fc842f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/InsufficientLiquidQuantityViewVM.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Integration.Operation; +using Tango.SharedUI; + +namespace Tango.MachineStudio.Developer.ViewModels +{ + public class InsufficientLiquidQuantityViewVM : DialogViewVM + { + public InsufficientLiquidQuantityException Exception { get; set; } + + public InsufficientLiquidQuantityViewVM(InsufficientLiquidQuantityException ex) + { + Exception = ex; + } + } +} 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 3f551c866..c2fad9d87 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 @@ -1446,6 +1446,16 @@ namespace Tango.MachineStudio.Developer.ViewModels //Finally Canceled.. }; } + catch (InsufficientLiquidQuantityException ex) + { + _notification.ShowModalDialog(new InsufficientLiquidQuantityViewVM(ex), (x) => + { + + MachineOperator.EnableJobLiquidQuantityValidation = false; + StartJob(); + + }, () => { }); + } catch (Exception ex) { LogManager.Log(ex); -- cgit v1.3.1 From cb769a96ca8841ced9cff6ed4a6c99939e139610 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 24 Sep 2019 12:07:14 +0300 Subject: Implemented auto process selection on Research module. --- ...Foundation.ProcessTools.TemplateEditor__2_.vsix | Bin 0 -> 3347595 bytes .../DeveloperModuleSettings.cs | 2 + .../ViewModels/MainViewVM.cs | 60 ++++++++++++++++++++- .../Views/JobView.xaml | 60 ++++++++++++--------- .../Views/JobView.xaml.cs | 32 ++++++----- .../Tango.ColorConversion/DefaultColorConverter.cs | 11 ++-- .../Tango.ColorConversion/IColorConverter.cs | 1 + 7 files changed, 123 insertions(+), 43 deletions(-) create mode 100644 Software/Visual_Studio/Installers/VS Extensions/Microsoft.TeamFoundation.ProcessTools.TemplateEditor__2_.vsix (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') diff --git a/Software/Visual_Studio/Installers/VS Extensions/Microsoft.TeamFoundation.ProcessTools.TemplateEditor__2_.vsix b/Software/Visual_Studio/Installers/VS Extensions/Microsoft.TeamFoundation.ProcessTools.TemplateEditor__2_.vsix new file mode 100644 index 000000000..6e752a2ae Binary files /dev/null and b/Software/Visual_Studio/Installers/VS Extensions/Microsoft.TeamFoundation.ProcessTools.TemplateEditor__2_.vsix differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs index 3d0ee2461..ce2c02fe7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModuleSettings.cs @@ -44,6 +44,8 @@ namespace Tango.MachineStudio.Developer set { _usePreferredLiquidVolumeIndex = value; RaisePropertyChangedAuto(); } } + public bool AutoProcessSelection { get; set; } + public DeveloperModuleSettings() { ProcessParametersIndices = new List(); 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 c2fad9d87..f5313d4cd 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 @@ -552,14 +552,35 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _enableColorConversion = value; RaisePropertyChangedAuto(); } } + /// + /// Gets or sets the authentication provider. + /// public IAuthenticationProvider AuthenticationProvider { get; set; } + /// + /// Gets or sets the module settings. + /// public DeveloperModuleSettings Settings { get { return _settings; } set { _settings = value; RaisePropertyChangedAuto(); } } + private bool _autoProcessSelection; + /// + /// Gets or sets a value indicating whether [automatic process selection]. + /// + public bool AutoProcessSelection + { + get { return _autoProcessSelection; } + set + { + _autoProcessSelection = value; + RaisePropertyChangedAuto(); + Settings.AutoProcessSelection = _autoProcessSelection; + } + } + #endregion #region Commands @@ -864,6 +885,23 @@ namespace Tango.MachineStudio.Developer.ViewModels catch { } } + if (AutoProcessSelection) + { + try + { + var recommendedProcess = _converter.GetRecommendedProcessParameters(ActiveJob, RmlProcessParametersTableGroup); + + if (recommendedProcess != null && recommendedProcess != SelectedProcessParametersTable) + { + SelectedProcessParametersTable = recommendedProcess; + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error resolving recommended process parameters."); + } + } + Thread.Sleep(500); } } @@ -1338,6 +1376,26 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable); } + if (AutoProcessSelection) + { + LogManager.Log("Auto process parameters selection enabled. Trying to resolve the recommended process parameters..."); + try + { + var recommendedProcess = _converter.GetRecommendedProcessParameters(ActiveJob, RmlProcessParametersTableGroup); + + if (recommendedProcess != null && recommendedProcess != SelectedProcessParametersTable) + { + SelectedProcessParametersTable = recommendedProcess; + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error resolving recommended process parameters."); + _notification.ShowError("An error occurred while trying to resolve the recommended process parameters.Please try to disable the auto selection."); + return; + } + } + JobEvents.Clear(); IsJobFailed = false; IsJobCanceled = false; @@ -1448,7 +1506,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } catch (InsufficientLiquidQuantityException ex) { - _notification.ShowModalDialog(new InsufficientLiquidQuantityViewVM(ex), (x) => + _notification.ShowModalDialog(new InsufficientLiquidQuantityViewVM(ex), (x) => { MachineOperator.EnableJobLiquidQuantityValidation = false; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index 742798ce4..3bda86036 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -1431,20 +1431,15 @@ - + - - + @@ -1526,7 +1526,8 @@ - + + @@ -1559,6 +1560,7 @@ + @@ -1566,24 +1568,32 @@ - - - - + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index 18dc795bd..28e488aae 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -251,7 +251,7 @@ namespace Tango.MachineStudio.Developer.Views private void BrushPicker_ColorChanged(object sender, BrushPicker.ColorChangedEventArgs e) { - + } private void ColorCanvas_SelectedColorChanged(object sender, RoutedPropertyChangedEventArgs e) @@ -284,7 +284,7 @@ namespace Tango.MachineStudio.Developer.Views private void listBoxSegments_PreviewMouseDown(object sender, MouseButtonEventArgs e) { - + } private void listBoxSegments_MouseEnter(object sender, MouseEventArgs e) @@ -295,22 +295,26 @@ namespace Tango.MachineStudio.Developer.Views private void OnBrushStopFieldValueChanged(object sender, RoutedPropertyChangedEventArgs e) { - BrushStop stop = null; - var dataContext = (sender as FrameworkElement).DataContext; - - if (dataContext != null) + try { - if (dataContext is BrushStop) - { - stop = dataContext as BrushStop; - } - else + BrushStop stop = null; + var dataContext = (sender as FrameworkElement).DataContext; + + if (dataContext != null) { - stop = (dataContext as LiquidVolume).BrushStop; - } + if (dataContext is BrushStop) + { + stop = dataContext as BrushStop; + } + else + { + stop = (dataContext as LiquidVolume).BrushStop; + } - _vm.OnBrushStopFieldValueChanged(stop); + _vm.OnBrushStopFieldValueChanged(stop); + } } + catch { } } private void OnBrushStopMouseDown(object sender, MouseButtonEventArgs e) diff --git a/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs b/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs index 9adbd59c3..46792f311 100644 --- a/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs +++ b/Software/Visual_Studio/Tango.ColorConversion/DefaultColorConverter.cs @@ -127,7 +127,7 @@ namespace Tango.ColorConversion conversionInput.ForwardData = ByteString.CopyFrom(rml.Cct.Data); - foreach (var processTable in rml.ProcessParametersTablesGroups.First(x => x.Active).ProcessParametersTables) + foreach (var processTable in rml.GetActiveProcessGroup().ProcessParametersTables) { conversionInput.ProcessRanges.Add(new ProcessRange() { @@ -223,6 +223,11 @@ namespace Tango.ColorConversion } public ProcessParametersTable GetRecommendedProcessParameters(Job job) + { + return GetRecommendedProcessParameters(job, job.Rml.GetActiveProcessGroup()); + } + + public ProcessParametersTable GetRecommendedProcessParameters(Job job, ProcessParametersTablesGroup group) { var stops = job.Segments.SelectMany(x => x.BrushStops).ToList(); @@ -257,11 +262,11 @@ namespace Tango.ColorConversion index = Math.Max(max_standard, max_catalog); } - var processParameters = job.Rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault(x => x.TableIndex == index); + var processParameters = group.ProcessParametersTables.FirstOrDefault(x => x.TableIndex == index); if (processParameters == null) { - processParameters = job.Rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault(); + processParameters = group.ProcessParametersTables.FirstOrDefault(); } return processParameters; diff --git a/Software/Visual_Studio/Tango.ColorConversion/IColorConverter.cs b/Software/Visual_Studio/Tango.ColorConversion/IColorConverter.cs index b6b569034..64615f4ae 100644 --- a/Software/Visual_Studio/Tango.ColorConversion/IColorConverter.cs +++ b/Software/Visual_Studio/Tango.ColorConversion/IColorConverter.cs @@ -20,5 +20,6 @@ namespace Tango.ColorConversion ConversionOutput Convert(Job job, Color color, bool generateHive); bool IsOutOfGamut(BrushStop stop); ProcessParametersTable GetRecommendedProcessParameters(Job job); + ProcessParametersTable GetRecommendedProcessParameters(Job job, ProcessParametersTablesGroup group); } } -- cgit v1.3.1 From f3d5875915904417ac5dddc2e16add4d81b9e393 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 24 Sep 2019 18:25:07 +0300 Subject: Added version to machine studio window title. Fixed LAB support in PPC. --- .../ViewModels/MainViewVM.cs | 2 ++ .../Tango.MachineStudio.UI/MainWindow.xaml.cs | 2 ++ .../Dialogs/BasicColorCorrectionView.xaml | 37 ++++++++++++++++++---- .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 15 ++++++++- 4 files changed, 49 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') 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 f5313d4cd..c8f0b4681 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 @@ -816,6 +816,8 @@ namespace Tango.MachineStudio.Developer.ViewModels { Settings = SettingsManager.Default.GetOrCreate(); + AutoProcessSelection = Settings.AutoProcessSelection; + SelectedJobs = new ObservableCollection(); JobEvents = new ObservableCollection(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs index 4c5e2b9a6..d0eec65e2 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs @@ -86,6 +86,8 @@ namespace Tango.MachineStudio.UI private void MainWindow_ContentRendered(object sender, EventArgs e) { WindowState = WindowState.Maximized; + + Title = "MACHINE STUDIO " + TangoIOC.Default.GetInstance().Version.ToString(3); } private void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml index 4fcccc9e5..4c100c2fc 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/BasicColorCorrectionView.xaml @@ -52,9 +52,9 @@ - , - , - + , + , + @@ -110,9 +110,34 @@ - , - , - + + + + , + , + + + + + + + , + , + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index a99e45eb3..b5fbbe2ea 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -897,7 +897,20 @@ namespace Tango.PPC.Jobs.ViewModels if (vm.Result == BasicColorCorrectionViewVM.ColorCorrectionDialogResult.Confirmed) { LogManager.Log($"Color suggestion selected: {vm.SelectedSuggestion.Color.ToString()}."); - brushStop.Color = vm.SelectedSuggestion.Color; + + if (brushStop.BrushColorSpace == BL.Enumerations.ColorSpaces.RGB) + { + brushStop.Red = vm.SelectedSuggestion.Coordinates.Red; + brushStop.Green = vm.SelectedSuggestion.Coordinates.Green; + brushStop.Blue = vm.SelectedSuggestion.Coordinates.Blue; + } + else if (brushStop.BrushColorSpace == BL.Enumerations.ColorSpaces.LAB) + { + brushStop.L = vm.SelectedSuggestion.Coordinates.L; + brushStop.A = vm.SelectedSuggestion.Coordinates.A; + brushStop.B = vm.SelectedSuggestion.Coordinates.B; + } + brushStop.Corrected = true; brushStop.IsOutOfGamut = false; brushStop.OutOfGamutChecked = true; -- cgit v1.3.1 From e6febb2cda232a2c89467690d9e1fbb82423618a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 25 Sep 2019 15:20:42 +0300 Subject: Implemented MultiGraph data series colors from configuration. Added dispensers & mid-tanks diagnostics monitors. --- .../Messages/Diagnostics/DiagnosticsMonitors.proto | 6 + .../PMR/Messages/Hardware/HardwareBlower.proto | 1 + .../ViewModels/MainViewVM.cs | 2 +- .../Editors/MultiGraphElementEditor.xaml | 27 ++ .../ViewModels/MachineTechViewVM.cs | 70 +++- .../DefaultStudioApplicationManager.cs | 3 +- .../Tango.BL/Enumerations/TechMonitors.cs | 12 + .../Tango.Emulations/Emulators/MachineEmulator.cs | 10 + .../Tango.PMR/Diagnostics/CartridgeTagContent.cs | 382 +++++++++++++++------ .../Tango.PMR/Diagnostics/DiagnosticsMonitors.cs | 57 ++- .../Tango.PMR/Hardware/HardwareBlower.cs | 3 + .../Utilities/Tango.PMRGenerator.CLI/App.config | 4 + .../Utilities/Tango.PMRGenerator.CLI/Program.cs | 18 +- .../Tango.PMRGenerator.CLI.csproj | 5 +- .../Tango.PMRGenerator.CLI/packages.config | 1 + 15 files changed, 485 insertions(+), 116 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels') diff --git a/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto b/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto index 781cbb650..82d8d3192 100644 --- a/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto +++ b/Software/PMR/Messages/Diagnostics/DiagnosticsMonitors.proto @@ -207,4 +207,10 @@ message DiagnosticsMonitors //Mixer 1 Heater Current (Min = 0, Max = 100, PPF = 1) repeated double Mixer1HeaterCurrent = 63; + //Dispensers Ink Level (Min = 0, Max = 130000000, PPF = 1) Channel Count = 8 + repeated DoubleArray DispensersInkLevel = 64; + + //Mid Tanks Ink Level (Min = 0, Max = 2, PPF = 1) Channel Count = 8 + repeated DoubleArray MidTanksInkLevel = 65; + } diff --git a/Software/PMR/Messages/Hardware/HardwareBlower.proto b/Software/PMR/Messages/Hardware/HardwareBlower.proto index f628fea36..0d5aadac1 100644 --- a/Software/PMR/Messages/Hardware/HardwareBlower.proto +++ b/Software/PMR/Messages/Hardware/HardwareBlower.proto @@ -22,6 +22,7 @@ message HardwareBlower bool Enabled = 2; + //Voltage Description double Voltage = 3; double HeatingVoltage = 4; 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 c8f0b4681..2d04866d8 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 @@ -887,7 +887,7 @@ namespace Tango.MachineStudio.Developer.ViewModels catch { } } - if (AutoProcessSelection) + if (AutoProcessSelection && IsJobVisible && IsVisible && ActiveJob != null && ActiveJob.Segments != null && !_rml_has_no_cct && !_disable_gamut_check) { try { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml index 9b9334355..6011102a2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml @@ -34,6 +34,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index 8eb792f0d..f6b8a35df 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -39,6 +39,8 @@ using RealTimeGraphX.DataPoints; using Tango.MachineStudio.Technician.Views; using RealTimeGraphX.WPF; using Tango.Core.ExtensionMethods; +using System.Diagnostics; +using Tango.BL.Builders; namespace Tango.MachineStudio.Technician.ViewModels { @@ -49,6 +51,13 @@ namespace Tango.MachineStudio.Technician.ViewModels /// public class MachineTechViewVM : StudioViewModel { + private class PackColor + { + public int Index { get; set; } + public Color Color { get; set; } + public String Name { get; set; } + } + private List _diagnoticsMonitorsDataProperties; private IDiagnosticsFrameProvider _diagnosticsFrameProvider; private Dictionary _singleControllers; @@ -68,6 +77,8 @@ namespace Tango.MachineStudio.Technician.ViewModels private DateTime _start_time = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0); private DateTime _last_time = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0); + private Machine _machine; + private List _packsColors; #region Properties @@ -374,7 +385,7 @@ namespace Tango.MachineStudio.Technician.ViewModels /// /// The sender. /// The machine. - private void ApplicationManager_ConnectedMachineChanged(object sender, IExternalBridgeClient machine) + private async void ApplicationManager_ConnectedMachineChanged(object sender, IExternalBridgeClient machine) { MachineOperator = machine; @@ -384,6 +395,45 @@ namespace Tango.MachineStudio.Technician.ViewModels } ClearAllGraphs(); + + if (machine != null) + { + try + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + _machine = await new MachineBuilder(db).Set(machine.Machine.Guid).WithConfiguration().BuildAsync(); + + _packsColors = new List(); + + foreach (var pack in _machine.Configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex).ToList()) + { + PackColor pc = new PackColor(); + pc.Index = pack.PackIndex; + pc.Name = pack.LiquidType.Name; + + if (pack.LiquidType.LiquidTypeColor == Colors.Black) + { + pc.Color = Colors.Gray; + } + else if (pack.LiquidType.LiquidTypeColor == Colors.Transparent) + { + pc.Color = Colors.White; + } + else + { + pc.Color = pack.LiquidType.LiquidTypeColor; + } + + _packsColors.Add(pc); + } + } + } + catch (Exception ex) + { + LogManager.Log(ex, LogCategory.Warning, "Error loading the connected machine details from db."); + } + } } /// @@ -543,6 +593,22 @@ namespace Tango.MachineStudio.Technician.ViewModels timesMat.Add(times); } + try + { + if (_packsColors != null) + { + foreach (var pack in _packsColors) + { + controller.DataSeriesCollection[pack.Index].Stroke = pack.Color; + controller.DataSeriesCollection[pack.Index].Name = pack.Name; + } + } + } + catch (Exception ex) + { + Debug.WriteLine($"Error assigning multi graph colors.\n{ex.ToString()}"); + } + controller.PushData(timesMat, dPoints); } @@ -2490,4 +2556,4 @@ namespace Tango.MachineStudio.Technician.ViewModels #endregion } -} +} \ No newline at end of file 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 1be62565b..0235f8cca 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -26,6 +26,7 @@ using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.UI.Views; using Tango.Integration.Operation; using Tango.MachineStudio.UI.Windows; +using Tango.BL.Builders; namespace Tango.MachineStudio.UI.StudioApplication { @@ -375,8 +376,8 @@ namespace Tango.MachineStudio.UI.StudioApplication throw new NullReferenceException($"The specified machine '{connectedMachine.SerialNumber}' could not be found on the database."); } + connectedMachine.SetMachine(Machine); ConnectedMachine = connectedMachine; - ConnectedMachine.SetMachine(Machine); var settings = SettingsManager.Default.GetOrCreate(); ConnectedMachine.JobUploadStrategy = settings.JobUploadStrategy; } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/TechMonitors.cs b/Software/Visual_Studio/Tango.BL/Enumerations/TechMonitors.cs index 1f3aa6a97..a017c18d1 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/TechMonitors.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/TechMonitors.cs @@ -151,6 +151,12 @@ namespace Tango.BL.Enumerations [Description("Dispensers Angular Encoders")] DispensersAngularEncoders = 22, + /// + /// (Dispensers Ink Level) + /// + [Description("Dispensers Ink Level")] + DispensersInkLevel = 100, + /// /// (Dispensers Linear Positions) /// @@ -349,6 +355,12 @@ namespace Tango.BL.Enumerations [Description("Mid Tank 8 Level")] MidTank8Level = 55, + /// + /// (Mid Tanks Ink Level) + /// + [Description("Mid Tanks Ink Level")] + MidTanksInkLevel = 101, + /// /// (Mixer 1 Heater Current) /// diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index cfd9a59f5..64071a554 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -466,6 +466,16 @@ namespace Tango.Emulations.Emulators monitors.Dancer3Angle.Add(y); } + for (int i = 0; i < MachineStatus.IDSPacksLevels.Count; i++) + { + var dispensers = new DoubleArray(); + dispensers.Data.Add(MachineStatus.IDSPacksLevels[i].DispenserLevel); + monitors.DispensersInkLevel.Add(dispensers); + + var midTanks = new DoubleArray(); + midTanks.Data.Add(MachineStatus.IDSPacksLevels[i].MidTankLevel); + monitors.MidTanksInkLevel.Add(midTanks); + } var dispenserFrequencies = new RepeatedField(); diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/CartridgeTagContent.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/CartridgeTagContent.cs index e2327b3a2..4880e278e 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/CartridgeTagContent.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/CartridgeTagContent.cs @@ -23,25 +23,27 @@ namespace Tango.PMR.Diagnostics { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChlDYXJ0cmlkZ2VUYWdDb250ZW50LnByb3RvEhVUYW5nby5QTVIuRGlhZ25v", - "c3RpY3MixQQKE0NhcnRyaWRnZVRhZ0NvbnRlbnQSEAoIVW5pcXVlSWQYASAB", - "KA0SFAoMU2VyaWFsTnVtYmVyGAIgASgJEhEKCUZhY3RvcnlJZBgDIAEoCRIX", - "Cg9GaWxsaW5nU3lzdGVtSWQYBCABKAUSEQoJQ29sb3JOYW1lGAUgASgJEhUK", - "DUNvbG9yQ2F0ZWdvcnkYBiABKAUSGQoRQ29sb3JUeXBlUmV2aXNpb24YByAB", - "KAUSFQoNQ2FydHJpZGdlU2l6ZRgIIAEoBRIXCg9GaWxsZWRJbmtWb2x1bWUY", - "CSABKAUSEwoLSW5rQmF0Y2hOdW0YCiABKAkSEgoKSW5rTUZHRGF0ZRgLIAEo", - "CRISCgpJbmtFT0xEYXRlGAwgASgJEhwKFENhcnRyaWRnZUZpbGxpbmdEYXRl", - "GA0gASgJEhcKD1dhc3RlRmlsbGVkRGF0ZRgOIAEoCRIVCg1QbHVnSW5Db3Vu", - "dGVyGA8gASgFEg8KB0lua2ZpbGwYECABKAgSDwoHSW5rVXNlZBgRIAEoCBIQ", - "CghJbmtFbXB0eRgSIAEoCBISCgpXYXN0ZUVtcHR5GBMgASgIEhQKDFdhc3Rl", - "RmlsbGluZxgUIAEoCBIRCglXYXN0ZUZ1bGwYFSABKAgSDwoHQmxvY2tlZBgW", - "IAEoCBIMCgRGYWlsGBcgASgIEhQKDFdhc3RlQ291bnRlchgYIAEoBRIYChBN", - "YWNoaW5lSWRJbmtVc2VkGBkgASgJEhoKEk1hY2hpbmVJZFdhc3RlVXNlZBga", - "IAEoCUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0aWNzYgZwcm90", - "bzM=")); + "c3RpY3MitAUKE0NhcnRyaWRnZVRhZ0NvbnRlbnQSEAoIVW5pcXVlSWQYASAB", + "KAkSFAoMU2VyaWFsTnVtYmVyGAIgASgJEhEKCUZhY3RvcnlJZBgDIAEoBRIX", + "Cg9GaWxsaW5nU3lzdGVtSWQYBCABKAUSEQoJV29ya09yZGVyGAUgASgJEhEK", + "CUNvbG9yTmFtZRgGIAEoCRIVCg1Db2xvckNhdGVnb3J5GAcgASgFEhkKEUNv", + "bG9yVHlwZVJldmlzaW9uGAggASgFEhUKDUNhcnRyaWRnZVNpemUYCSABKAUS", + "FwoPRmlsbGVkSW5rVm9sdW1lGAogASgFEhMKC0lua0JhdGNoTnVtGAsgASgJ", + "EhIKCklua01GR0RhdGUYDCABKAkSEgoKSW5rRU9MRGF0ZRgNIAEoCRIcChRD", + "YXJ0cmlkZ2VGaWxsaW5nRGF0ZRgOIAEoCRIXCg9XYXN0ZUZpbGxlZERhdGUY", + "DyABKAkSFQoNUGx1Z0luQ291bnRlchgQIAEoBRIMCgRNaXNjGBEgASgNEg8K", + "B0lua2ZpbGwYEiABKAgSDwoHSW5rVXNlZBgTIAEoCBIQCghJbmtFbXB0eRgU", + "IAEoCBISCgpXYXN0ZUVtcHR5GBUgASgIEhQKDFdhc3RlRmlsbGluZxgWIAEo", + "CBIRCglXYXN0ZUZ1bGwYFyABKAgSDwoHQmxvY2tlZBgYIAEoCBIMCgRGYWls", + "GBkgASgIEhQKDFdhc3RlQ291bnRlchgaIAEoBRIYChBNYWNoaW5lSWRJbmtV", + "c2VkGBsgASgJEhoKEk1hY2hpbmVJZFdhc3RlVXNlZBgcIAEoCRIPCgdDb3Vu", + "dGVyGB0gASgNEhAKCFRhZ1ZhbGlkGB4gASgIEhEKCUhhc2hWYWx1ZRgfIAEo", + "CRIWCg5DaGVja3N1bV9DUkMxNhggIAEoDUIhCh9jb20udHdpbmUudGFuZ28u", + "cG1yLmRpYWdub3N0aWNzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.CartridgeTagContent), global::Tango.PMR.Diagnostics.CartridgeTagContent.Parser, new[]{ "UniqueId", "SerialNumber", "FactoryId", "FillingSystemId", "ColorName", "ColorCategory", "ColorTypeRevision", "CartridgeSize", "FilledInkVolume", "InkBatchNum", "InkMFGDate", "InkEOLDate", "CartridgeFillingDate", "WasteFilledDate", "PlugInCounter", "Inkfill", "InkUsed", "InkEmpty", "WasteEmpty", "WasteFilling", "WasteFull", "Blocked", "Fail", "WasteCounter", "MachineIdInkUsed", "MachineIdWasteUsed" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.CartridgeTagContent), global::Tango.PMR.Diagnostics.CartridgeTagContent.Parser, new[]{ "UniqueId", "SerialNumber", "FactoryId", "FillingSystemId", "WorkOrder", "ColorName", "ColorCategory", "ColorTypeRevision", "CartridgeSize", "FilledInkVolume", "InkBatchNum", "InkMFGDate", "InkEOLDate", "CartridgeFillingDate", "WasteFilledDate", "PlugInCounter", "Misc", "Inkfill", "InkUsed", "InkEmpty", "WasteEmpty", "WasteFilling", "WasteFull", "Blocked", "Fail", "WasteCounter", "MachineIdInkUsed", "MachineIdWasteUsed", "Counter", "TagValid", "HashValue", "ChecksumCRC16" }, null, null, null) })); } #endregion @@ -76,6 +78,7 @@ namespace Tango.PMR.Diagnostics { serialNumber_ = other.serialNumber_; factoryId_ = other.factoryId_; fillingSystemId_ = other.fillingSystemId_; + workOrder_ = other.workOrder_; colorName_ = other.colorName_; colorCategory_ = other.colorCategory_; colorTypeRevision_ = other.colorTypeRevision_; @@ -87,6 +90,7 @@ namespace Tango.PMR.Diagnostics { cartridgeFillingDate_ = other.cartridgeFillingDate_; wasteFilledDate_ = other.wasteFilledDate_; plugInCounter_ = other.plugInCounter_; + misc_ = other.misc_; inkfill_ = other.inkfill_; inkUsed_ = other.inkUsed_; inkEmpty_ = other.inkEmpty_; @@ -98,6 +102,10 @@ namespace Tango.PMR.Diagnostics { wasteCounter_ = other.wasteCounter_; machineIdInkUsed_ = other.machineIdInkUsed_; machineIdWasteUsed_ = other.machineIdWasteUsed_; + counter_ = other.counter_; + tagValid_ = other.tagValid_; + hashValue_ = other.hashValue_; + checksumCRC16_ = other.checksumCRC16_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -107,12 +115,12 @@ namespace Tango.PMR.Diagnostics { /// Field number for the "UniqueId" field. public const int UniqueIdFieldNumber = 1; - private uint uniqueId_; + private string uniqueId_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint UniqueId { + public string UniqueId { get { return uniqueId_; } set { - uniqueId_ = value; + uniqueId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } @@ -129,12 +137,12 @@ namespace Tango.PMR.Diagnostics { /// Field number for the "FactoryId" field. public const int FactoryIdFieldNumber = 3; - private string factoryId_ = ""; + private int factoryId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string FactoryId { + public int FactoryId { get { return factoryId_; } set { - factoryId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + factoryId_ = value; } } @@ -149,8 +157,19 @@ namespace Tango.PMR.Diagnostics { } } + /// Field number for the "WorkOrder" field. + public const int WorkOrderFieldNumber = 5; + private string workOrder_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string WorkOrder { + get { return workOrder_; } + set { + workOrder_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Field number for the "ColorName" field. - public const int ColorNameFieldNumber = 5; + public const int ColorNameFieldNumber = 6; private string colorName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string ColorName { @@ -161,7 +180,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "ColorCategory" field. - public const int ColorCategoryFieldNumber = 6; + public const int ColorCategoryFieldNumber = 7; private int colorCategory_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int ColorCategory { @@ -172,7 +191,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "ColorTypeRevision" field. - public const int ColorTypeRevisionFieldNumber = 7; + public const int ColorTypeRevisionFieldNumber = 8; private int colorTypeRevision_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int ColorTypeRevision { @@ -183,7 +202,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "CartridgeSize" field. - public const int CartridgeSizeFieldNumber = 8; + public const int CartridgeSizeFieldNumber = 9; private int cartridgeSize_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CartridgeSize { @@ -194,7 +213,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "FilledInkVolume" field. - public const int FilledInkVolumeFieldNumber = 9; + public const int FilledInkVolumeFieldNumber = 10; private int filledInkVolume_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int FilledInkVolume { @@ -205,7 +224,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "InkBatchNum" field. - public const int InkBatchNumFieldNumber = 10; + public const int InkBatchNumFieldNumber = 11; private string inkBatchNum_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string InkBatchNum { @@ -216,7 +235,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "InkMFGDate" field. - public const int InkMFGDateFieldNumber = 11; + public const int InkMFGDateFieldNumber = 12; private string inkMFGDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string InkMFGDate { @@ -227,7 +246,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "InkEOLDate" field. - public const int InkEOLDateFieldNumber = 12; + public const int InkEOLDateFieldNumber = 13; private string inkEOLDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string InkEOLDate { @@ -238,7 +257,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "CartridgeFillingDate" field. - public const int CartridgeFillingDateFieldNumber = 13; + public const int CartridgeFillingDateFieldNumber = 14; private string cartridgeFillingDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string CartridgeFillingDate { @@ -249,7 +268,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "WasteFilledDate" field. - public const int WasteFilledDateFieldNumber = 14; + public const int WasteFilledDateFieldNumber = 15; private string wasteFilledDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string WasteFilledDate { @@ -260,7 +279,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "PlugInCounter" field. - public const int PlugInCounterFieldNumber = 15; + public const int PlugInCounterFieldNumber = 16; private int plugInCounter_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int PlugInCounter { @@ -270,8 +289,19 @@ namespace Tango.PMR.Diagnostics { } } + /// Field number for the "Misc" field. + public const int MiscFieldNumber = 17; + private uint misc_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Misc { + get { return misc_; } + set { + misc_ = value; + } + } + /// Field number for the "Inkfill" field. - public const int InkfillFieldNumber = 16; + public const int InkfillFieldNumber = 18; private bool inkfill_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Inkfill { @@ -282,7 +312,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "InkUsed" field. - public const int InkUsedFieldNumber = 17; + public const int InkUsedFieldNumber = 19; private bool inkUsed_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool InkUsed { @@ -293,7 +323,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "InkEmpty" field. - public const int InkEmptyFieldNumber = 18; + public const int InkEmptyFieldNumber = 20; private bool inkEmpty_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool InkEmpty { @@ -304,7 +334,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "WasteEmpty" field. - public const int WasteEmptyFieldNumber = 19; + public const int WasteEmptyFieldNumber = 21; private bool wasteEmpty_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool WasteEmpty { @@ -315,7 +345,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "WasteFilling" field. - public const int WasteFillingFieldNumber = 20; + public const int WasteFillingFieldNumber = 22; private bool wasteFilling_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool WasteFilling { @@ -326,7 +356,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "WasteFull" field. - public const int WasteFullFieldNumber = 21; + public const int WasteFullFieldNumber = 23; private bool wasteFull_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool WasteFull { @@ -337,7 +367,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "Blocked" field. - public const int BlockedFieldNumber = 22; + public const int BlockedFieldNumber = 24; private bool blocked_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Blocked { @@ -348,7 +378,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "Fail" field. - public const int FailFieldNumber = 23; + public const int FailFieldNumber = 25; private bool fail_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool Fail { @@ -359,7 +389,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "WasteCounter" field. - public const int WasteCounterFieldNumber = 24; + public const int WasteCounterFieldNumber = 26; private int wasteCounter_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int WasteCounter { @@ -370,7 +400,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "MachineIdInkUsed" field. - public const int MachineIdInkUsedFieldNumber = 25; + public const int MachineIdInkUsedFieldNumber = 27; private string machineIdInkUsed_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string MachineIdInkUsed { @@ -381,7 +411,7 @@ namespace Tango.PMR.Diagnostics { } /// Field number for the "MachineIdWasteUsed" field. - public const int MachineIdWasteUsedFieldNumber = 26; + public const int MachineIdWasteUsedFieldNumber = 28; private string machineIdWasteUsed_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string MachineIdWasteUsed { @@ -391,6 +421,50 @@ namespace Tango.PMR.Diagnostics { } } + /// Field number for the "Counter" field. + public const int CounterFieldNumber = 29; + private uint counter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Counter { + get { return counter_; } + set { + counter_ = value; + } + } + + /// Field number for the "TagValid" field. + public const int TagValidFieldNumber = 30; + private bool tagValid_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool TagValid { + get { return tagValid_; } + set { + tagValid_ = value; + } + } + + /// Field number for the "HashValue" field. + public const int HashValueFieldNumber = 31; + private string hashValue_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string HashValue { + get { return hashValue_; } + set { + hashValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "Checksum_CRC16" field. + public const int ChecksumCRC16FieldNumber = 32; + private uint checksumCRC16_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint ChecksumCRC16 { + get { return checksumCRC16_; } + set { + checksumCRC16_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as CartridgeTagContent); @@ -408,6 +482,7 @@ namespace Tango.PMR.Diagnostics { if (SerialNumber != other.SerialNumber) return false; if (FactoryId != other.FactoryId) return false; if (FillingSystemId != other.FillingSystemId) return false; + if (WorkOrder != other.WorkOrder) return false; if (ColorName != other.ColorName) return false; if (ColorCategory != other.ColorCategory) return false; if (ColorTypeRevision != other.ColorTypeRevision) return false; @@ -419,6 +494,7 @@ namespace Tango.PMR.Diagnostics { if (CartridgeFillingDate != other.CartridgeFillingDate) return false; if (WasteFilledDate != other.WasteFilledDate) return false; if (PlugInCounter != other.PlugInCounter) return false; + if (Misc != other.Misc) return false; if (Inkfill != other.Inkfill) return false; if (InkUsed != other.InkUsed) return false; if (InkEmpty != other.InkEmpty) return false; @@ -430,16 +506,21 @@ namespace Tango.PMR.Diagnostics { if (WasteCounter != other.WasteCounter) return false; if (MachineIdInkUsed != other.MachineIdInkUsed) return false; if (MachineIdWasteUsed != other.MachineIdWasteUsed) return false; + if (Counter != other.Counter) return false; + if (TagValid != other.TagValid) return false; + if (HashValue != other.HashValue) return false; + if (ChecksumCRC16 != other.ChecksumCRC16) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (UniqueId != 0) hash ^= UniqueId.GetHashCode(); + if (UniqueId.Length != 0) hash ^= UniqueId.GetHashCode(); if (SerialNumber.Length != 0) hash ^= SerialNumber.GetHashCode(); - if (FactoryId.Length != 0) hash ^= FactoryId.GetHashCode(); + if (FactoryId != 0) hash ^= FactoryId.GetHashCode(); if (FillingSystemId != 0) hash ^= FillingSystemId.GetHashCode(); + if (WorkOrder.Length != 0) hash ^= WorkOrder.GetHashCode(); if (ColorName.Length != 0) hash ^= ColorName.GetHashCode(); if (ColorCategory != 0) hash ^= ColorCategory.GetHashCode(); if (ColorTypeRevision != 0) hash ^= ColorTypeRevision.GetHashCode(); @@ -451,6 +532,7 @@ namespace Tango.PMR.Diagnostics { if (CartridgeFillingDate.Length != 0) hash ^= CartridgeFillingDate.GetHashCode(); if (WasteFilledDate.Length != 0) hash ^= WasteFilledDate.GetHashCode(); if (PlugInCounter != 0) hash ^= PlugInCounter.GetHashCode(); + if (Misc != 0) hash ^= Misc.GetHashCode(); if (Inkfill != false) hash ^= Inkfill.GetHashCode(); if (InkUsed != false) hash ^= InkUsed.GetHashCode(); if (InkEmpty != false) hash ^= InkEmpty.GetHashCode(); @@ -462,6 +544,10 @@ namespace Tango.PMR.Diagnostics { if (WasteCounter != 0) hash ^= WasteCounter.GetHashCode(); if (MachineIdInkUsed.Length != 0) hash ^= MachineIdInkUsed.GetHashCode(); if (MachineIdWasteUsed.Length != 0) hash ^= MachineIdWasteUsed.GetHashCode(); + if (Counter != 0) hash ^= Counter.GetHashCode(); + if (TagValid != false) hash ^= TagValid.GetHashCode(); + if (HashValue.Length != 0) hash ^= HashValue.GetHashCode(); + if (ChecksumCRC16 != 0) hash ^= ChecksumCRC16.GetHashCode(); return hash; } @@ -472,127 +558,154 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (UniqueId != 0) { - output.WriteRawTag(8); - output.WriteUInt32(UniqueId); + if (UniqueId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UniqueId); } if (SerialNumber.Length != 0) { output.WriteRawTag(18); output.WriteString(SerialNumber); } - if (FactoryId.Length != 0) { - output.WriteRawTag(26); - output.WriteString(FactoryId); + if (FactoryId != 0) { + output.WriteRawTag(24); + output.WriteInt32(FactoryId); } if (FillingSystemId != 0) { output.WriteRawTag(32); output.WriteInt32(FillingSystemId); } - if (ColorName.Length != 0) { + if (WorkOrder.Length != 0) { output.WriteRawTag(42); + output.WriteString(WorkOrder); + } + if (ColorName.Length != 0) { + output.WriteRawTag(50); output.WriteString(ColorName); } if (ColorCategory != 0) { - output.WriteRawTag(48); + output.WriteRawTag(56); output.WriteInt32(ColorCategory); } if (ColorTypeRevision != 0) { - output.WriteRawTag(56); + output.WriteRawTag(64); output.WriteInt32(ColorTypeRevision); } if (CartridgeSize != 0) { - output.WriteRawTag(64); + output.WriteRawTag(72); output.WriteInt32(CartridgeSize); } if (FilledInkVolume != 0) { - output.WriteRawTag(72); + output.WriteRawTag(80); output.WriteInt32(FilledInkVolume); } if (InkBatchNum.Length != 0) { - output.WriteRawTag(82); + output.WriteRawTag(90); output.WriteString(InkBatchNum); } if (InkMFGDate.Length != 0) { - output.WriteRawTag(90); + output.WriteRawTag(98); output.WriteString(InkMFGDate); } if (InkEOLDate.Length != 0) { - output.WriteRawTag(98); + output.WriteRawTag(106); output.WriteString(InkEOLDate); } if (CartridgeFillingDate.Length != 0) { - output.WriteRawTag(106); + output.WriteRawTag(114); output.WriteString(CartridgeFillingDate); } if (WasteFilledDate.Length != 0) { - output.WriteRawTag(114); + output.WriteRawTag(122); output.WriteString(WasteFilledDate); } if (PlugInCounter != 0) { - output.WriteRawTag(120); + output.WriteRawTag(128, 1); output.WriteInt32(PlugInCounter); } + if (Misc != 0) { + output.WriteRawTag(136, 1); + output.WriteUInt32(Misc); + } if (Inkfill != false) { - output.WriteRawTag(128, 1); + output.WriteRawTag(144, 1); output.WriteBool(Inkfill); } if (InkUsed != false) { - output.WriteRawTag(136, 1); + output.WriteRawTag(152, 1); output.WriteBool(InkUsed); } if (InkEmpty != false) { - output.WriteRawTag(144, 1); + output.WriteRawTag(160, 1); output.WriteBool(InkEmpty); } if (WasteEmpty != false) { - output.WriteRawTag(152, 1); + output.WriteRawTag(168, 1); output.WriteBool(WasteEmpty); } if (WasteFilling != false) { - output.WriteRawTag(160, 1); + output.WriteRawTag(176, 1); output.WriteBool(WasteFilling); } if (WasteFull != false) { - output.WriteRawTag(168, 1); + output.WriteRawTag(184, 1); output.WriteBool(WasteFull); } if (Blocked != false) { - output.WriteRawTag(176, 1); + output.WriteRawTag(192, 1); output.WriteBool(Blocked); } if (Fail != false) { - output.WriteRawTag(184, 1); + output.WriteRawTag(200, 1); output.WriteBool(Fail); } if (WasteCounter != 0) { - output.WriteRawTag(192, 1); + output.WriteRawTag(208, 1); output.WriteInt32(WasteCounter); } if (MachineIdInkUsed.Length != 0) { - output.WriteRawTag(202, 1); + output.WriteRawTag(218, 1); output.WriteString(MachineIdInkUsed); } if (MachineIdWasteUsed.Length != 0) { - output.WriteRawTag(210, 1); + output.WriteRawTag(226, 1); output.WriteString(MachineIdWasteUsed); } + if (Counter != 0) { + output.WriteRawTag(232, 1); + output.WriteUInt32(Counter); + } + if (TagValid != false) { + output.WriteRawTag(240, 1); + output.WriteBool(TagValid); + } + if (HashValue.Length != 0) { + output.WriteRawTag(250, 1); + output.WriteString(HashValue); + } + if (ChecksumCRC16 != 0) { + output.WriteRawTag(128, 2); + output.WriteUInt32(ChecksumCRC16); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (UniqueId != 0) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UniqueId); + if (UniqueId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UniqueId); } if (SerialNumber.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(SerialNumber); } - if (FactoryId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(FactoryId); + if (FactoryId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FactoryId); } if (FillingSystemId != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(FillingSystemId); } + if (WorkOrder.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(WorkOrder); + } if (ColorName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(ColorName); } @@ -624,7 +737,10 @@ namespace Tango.PMR.Diagnostics { size += 1 + pb::CodedOutputStream.ComputeStringSize(WasteFilledDate); } if (PlugInCounter != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlugInCounter); + size += 2 + pb::CodedOutputStream.ComputeInt32Size(PlugInCounter); + } + if (Misc != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(Misc); } if (Inkfill != false) { size += 2 + 1; @@ -659,6 +775,18 @@ namespace Tango.PMR.Diagnostics { if (MachineIdWasteUsed.Length != 0) { size += 2 + pb::CodedOutputStream.ComputeStringSize(MachineIdWasteUsed); } + if (Counter != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(Counter); + } + if (TagValid != false) { + size += 2 + 1; + } + if (HashValue.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(HashValue); + } + if (ChecksumCRC16 != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(ChecksumCRC16); + } return size; } @@ -667,18 +795,21 @@ namespace Tango.PMR.Diagnostics { if (other == null) { return; } - if (other.UniqueId != 0) { + if (other.UniqueId.Length != 0) { UniqueId = other.UniqueId; } if (other.SerialNumber.Length != 0) { SerialNumber = other.SerialNumber; } - if (other.FactoryId.Length != 0) { + if (other.FactoryId != 0) { FactoryId = other.FactoryId; } if (other.FillingSystemId != 0) { FillingSystemId = other.FillingSystemId; } + if (other.WorkOrder.Length != 0) { + WorkOrder = other.WorkOrder; + } if (other.ColorName.Length != 0) { ColorName = other.ColorName; } @@ -712,6 +843,9 @@ namespace Tango.PMR.Diagnostics { if (other.PlugInCounter != 0) { PlugInCounter = other.PlugInCounter; } + if (other.Misc != 0) { + Misc = other.Misc; + } if (other.Inkfill != false) { Inkfill = other.Inkfill; } @@ -745,6 +879,18 @@ namespace Tango.PMR.Diagnostics { if (other.MachineIdWasteUsed.Length != 0) { MachineIdWasteUsed = other.MachineIdWasteUsed; } + if (other.Counter != 0) { + Counter = other.Counter; + } + if (other.TagValid != false) { + TagValid = other.TagValid; + } + if (other.HashValue.Length != 0) { + HashValue = other.HashValue; + } + if (other.ChecksumCRC16 != 0) { + ChecksumCRC16 = other.ChecksumCRC16; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -755,16 +901,16 @@ namespace Tango.PMR.Diagnostics { default: input.SkipLastField(); break; - case 8: { - UniqueId = input.ReadUInt32(); + case 10: { + UniqueId = input.ReadString(); break; } case 18: { SerialNumber = input.ReadString(); break; } - case 26: { - FactoryId = input.ReadString(); + case 24: { + FactoryId = input.ReadInt32(); break; } case 32: { @@ -772,93 +918,117 @@ namespace Tango.PMR.Diagnostics { break; } case 42: { + WorkOrder = input.ReadString(); + break; + } + case 50: { ColorName = input.ReadString(); break; } - case 48: { + case 56: { ColorCategory = input.ReadInt32(); break; } - case 56: { + case 64: { ColorTypeRevision = input.ReadInt32(); break; } - case 64: { + case 72: { CartridgeSize = input.ReadInt32(); break; } - case 72: { + case 80: { FilledInkVolume = input.ReadInt32(); break; } - case 82: { + case 90: { InkBatchNum = input.ReadString(); break; } - case 90: { + case 98: { InkMFGDate = input.ReadString(); break; } - case 98: { + case 106: { InkEOLDate = input.ReadString(); break; } - case 106: { + case 114: { CartridgeFillingDate = input.ReadString(); break; } - case 114: { + case 122: { WasteFilledDate = input.ReadString(); break; } - case 120: { + case 128: { PlugInCounter = input.ReadInt32(); break; } - case 128: { + case 136: { + Misc = input.ReadUInt32(); + break; + } + case 144: { Inkfill = input.ReadBool(); break; } - case 136: { + case 152: { InkUsed = input.ReadBool(); break; } - case 144: { + case 160: { InkEmpty = input.ReadBool(); break; } - case 152: { + case 168: { WasteEmpty = input.ReadBool(); break; } - case 160: { + case 176: { WasteFilling = input.ReadBool(); break; } - case 168: { + case 184: { WasteFull = input.ReadBool(); break; } - case 176: { + case 192: { Blocked = input.ReadBool(); break; } - case 184: { + case 200: { Fail = input.ReadBool(); break; } - case 192: { + case 208: { WasteCounter = input.ReadInt32(); break; } - case 202: { + case 218: { MachineIdInkUsed = input.ReadString(); break; } - case 210: { + case 226: { MachineIdWasteUsed = input.ReadString(); break; } + case 232: { + Counter = input.ReadUInt32(); + break; + } + case 240: { + TagValid = input.ReadBool(); + break; + } + case 250: { + HashValue = input.ReadString(); + break; + } + case 256: { + ChecksumCRC16 = input.ReadUInt32(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs index a5c2d4c07..2e7191370 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/DiagnosticsMonitors.cs @@ -23,7 +23,7 @@ namespace Tango.PMR.Diagnostics { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChlEaWFnbm9zdGljc01vbml0b3JzLnByb3RvEhVUYW5nby5QTVIuRGlhZ25v", - "c3RpY3MaEURvdWJsZUFycmF5LnByb3RvIoUPChNEaWFnbm9zdGljc01vbml0", + "c3RpY3MaEURvdWJsZUFycmF5LnByb3RvIoMQChNEaWFnbm9zdGljc01vbml0", "b3JzEhQKDERhbmNlcjFBbmdsZRgBIAMoARIUCgxEYW5jZXIyQW5nbGUYAiAD", "KAESFAoMRGFuY2VyM0FuZ2xlGAMgAygBEhwKFEZlZWRlck1vdG9yRnJlcXVl", "bmN5GAQgAygBEhIKCkRyeWVyTW90b3IYBSADKAESEwoLUG9sbGVyTW90b3IY", @@ -66,12 +66,15 @@ namespace Tango.PMR.Diagnostics { "ZFpvbmUySGVhdGVyQ3VycmVudBg7IAMoARIeChZIZWFkWm9uZTNIZWF0ZXJD", "dXJyZW50GDwgAygBEh4KFkhlYWRab25lNEhlYXRlckN1cnJlbnQYPSADKAES", "IAoYSGVhZFpvbmU1XzZIZWF0ZXJDdXJyZW50GD4gAygBEhsKE01peGVyMUhl", - "YXRlckN1cnJlbnQYPyADKAFCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFn", - "bm9zdGljc2IGcHJvdG8z")); + "YXRlckN1cnJlbnQYPyADKAESPgoSRGlzcGVuc2Vyc0lua0xldmVsGEAgAygL", + "MiIuVGFuZ28uUE1SLkRpYWdub3N0aWNzLkRvdWJsZUFycmF5EjwKEE1pZFRh", + "bmtzSW5rTGV2ZWwYQSADKAsyIi5UYW5nby5QTVIuRGlhZ25vc3RpY3MuRG91", + "YmxlQXJyYXlCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGljc2IG", + "cHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.DoubleArrayReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DiagnosticsMonitors), global::Tango.PMR.Diagnostics.DiagnosticsMonitors.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle", "FeederMotorFrequency", "DryerMotor", "PollerMotor", "WinderMotor", "ScrewMotor", "ThreadSpeed", "MixerTemperature", "HeadZone1Temperature", "HeadZone2Temperature", "HeadZone3Temperature", "HeadAirFlow", "FeederTension", "PullerTension", "DryerZone1Temperature", "DryerZone2Temperature", "DryerZone3Temperature", "DryerAirFlow", "WinderTension", "DispensersMotorsFrequency", "DispensersAngularEncoders", "DispensersLinearPositions", "DispensersPressure", "FilterDeltaPressure", "ChillerTemperature", "Dispenser1MotorFrequency", "Dispenser2MotorFrequency", "Dispenser3MotorFrequency", "Dispenser4MotorFrequency", "Dispenser5MotorFrequency", "Dispenser6MotorFrequency", "Dispenser7MotorFrequency", "Dispenser8MotorFrequency", "HeadZone4Temperature", "HeadZone5Temperature", "HeadZone6Temperature", "BlowerVoltage", "Dispenser1Pressure", "Dispenser2Pressure", "Dispenser3Pressure", "Dispenser4Pressure", "Dispenser5Pressure", "Dispenser6Pressure", "Dispenser7Pressure", "Dispenser8Pressure", "MidTank1Level", "MidTank2Level", "MidTank3Level", "MidTank4Level", "MidTank5Level", "MidTank6Level", "MidTank7Level", "MidTank8Level", "DrierZone1HeaterCurrent", "DrierZone2HeaterCurrent", "HeadZone1HeaterCurrent", "HeadZone2HeaterCurrent", "HeadZone3HeaterCurrent", "HeadZone4HeaterCurrent", "HeadZone56HeaterCurrent", "Mixer1HeaterCurrent" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.DiagnosticsMonitors), global::Tango.PMR.Diagnostics.DiagnosticsMonitors.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle", "FeederMotorFrequency", "DryerMotor", "PollerMotor", "WinderMotor", "ScrewMotor", "ThreadSpeed", "MixerTemperature", "HeadZone1Temperature", "HeadZone2Temperature", "HeadZone3Temperature", "HeadAirFlow", "FeederTension", "PullerTension", "DryerZone1Temperature", "DryerZone2Temperature", "DryerZone3Temperature", "DryerAirFlow", "WinderTension", "DispensersMotorsFrequency", "DispensersAngularEncoders", "DispensersLinearPositions", "DispensersPressure", "FilterDeltaPressure", "ChillerTemperature", "Dispenser1MotorFrequency", "Dispenser2MotorFrequency", "Dispenser3MotorFrequency", "Dispenser4MotorFrequency", "Dispenser5MotorFrequency", "Dispenser6MotorFrequency", "Dispenser7MotorFrequency", "Dispenser8MotorFrequency", "HeadZone4Temperature", "HeadZone5Temperature", "HeadZone6Temperature", "BlowerVoltage", "Dispenser1Pressure", "Dispenser2Pressure", "Dispenser3Pressure", "Dispenser4Pressure", "Dispenser5Pressure", "Dispenser6Pressure", "Dispenser7Pressure", "Dispenser8Pressure", "MidTank1Level", "MidTank2Level", "MidTank3Level", "MidTank4Level", "MidTank5Level", "MidTank6Level", "MidTank7Level", "MidTank8Level", "DrierZone1HeaterCurrent", "DrierZone2HeaterCurrent", "HeadZone1HeaterCurrent", "HeadZone2HeaterCurrent", "HeadZone3HeaterCurrent", "HeadZone4HeaterCurrent", "HeadZone56HeaterCurrent", "Mixer1HeaterCurrent", "DispensersInkLevel", "MidTanksInkLevel" }, null, null, null) })); } #endregion @@ -165,6 +168,8 @@ namespace Tango.PMR.Diagnostics { headZone4HeaterCurrent_ = other.headZone4HeaterCurrent_.Clone(); headZone56HeaterCurrent_ = other.headZone56HeaterCurrent_.Clone(); mixer1HeaterCurrent_ = other.mixer1HeaterCurrent_.Clone(); + dispensersInkLevel_ = other.dispensersInkLevel_.Clone(); + midTanksInkLevel_ = other.midTanksInkLevel_.Clone(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -991,6 +996,32 @@ namespace Tango.PMR.Diagnostics { get { return mixer1HeaterCurrent_; } } + /// Field number for the "DispensersInkLevel" field. + public const int DispensersInkLevelFieldNumber = 64; + private static readonly pb::FieldCodec _repeated_dispensersInkLevel_codec + = pb::FieldCodec.ForMessage(514, global::Tango.PMR.Diagnostics.DoubleArray.Parser); + private readonly pbc::RepeatedField dispensersInkLevel_ = new pbc::RepeatedField(); + /// + ///Dispensers Ink Level (Min = 0, Max = 130000000, PPF = 1) Channel Count = 8 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField DispensersInkLevel { + get { return dispensersInkLevel_; } + } + + /// Field number for the "MidTanksInkLevel" field. + public const int MidTanksInkLevelFieldNumber = 65; + private static readonly pb::FieldCodec _repeated_midTanksInkLevel_codec + = pb::FieldCodec.ForMessage(522, global::Tango.PMR.Diagnostics.DoubleArray.Parser); + private readonly pbc::RepeatedField midTanksInkLevel_ = new pbc::RepeatedField(); + /// + ///Mid Tanks Ink Level (Min = 0, Max = 2, PPF = 1) Channel Count = 8 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MidTanksInkLevel { + get { return midTanksInkLevel_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as DiagnosticsMonitors); @@ -1067,6 +1098,8 @@ namespace Tango.PMR.Diagnostics { if(!headZone4HeaterCurrent_.Equals(other.headZone4HeaterCurrent_)) return false; if(!headZone56HeaterCurrent_.Equals(other.headZone56HeaterCurrent_)) return false; if(!mixer1HeaterCurrent_.Equals(other.mixer1HeaterCurrent_)) return false; + if(!dispensersInkLevel_.Equals(other.dispensersInkLevel_)) return false; + if(!midTanksInkLevel_.Equals(other.midTanksInkLevel_)) return false; return true; } @@ -1136,6 +1169,8 @@ namespace Tango.PMR.Diagnostics { hash ^= headZone4HeaterCurrent_.GetHashCode(); hash ^= headZone56HeaterCurrent_.GetHashCode(); hash ^= mixer1HeaterCurrent_.GetHashCode(); + hash ^= dispensersInkLevel_.GetHashCode(); + hash ^= midTanksInkLevel_.GetHashCode(); return hash; } @@ -1209,6 +1244,8 @@ namespace Tango.PMR.Diagnostics { headZone4HeaterCurrent_.WriteTo(output, _repeated_headZone4HeaterCurrent_codec); headZone56HeaterCurrent_.WriteTo(output, _repeated_headZone56HeaterCurrent_codec); mixer1HeaterCurrent_.WriteTo(output, _repeated_mixer1HeaterCurrent_codec); + dispensersInkLevel_.WriteTo(output, _repeated_dispensersInkLevel_codec); + midTanksInkLevel_.WriteTo(output, _repeated_midTanksInkLevel_codec); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1277,6 +1314,8 @@ namespace Tango.PMR.Diagnostics { size += headZone4HeaterCurrent_.CalculateSize(_repeated_headZone4HeaterCurrent_codec); size += headZone56HeaterCurrent_.CalculateSize(_repeated_headZone56HeaterCurrent_codec); size += mixer1HeaterCurrent_.CalculateSize(_repeated_mixer1HeaterCurrent_codec); + size += dispensersInkLevel_.CalculateSize(_repeated_dispensersInkLevel_codec); + size += midTanksInkLevel_.CalculateSize(_repeated_midTanksInkLevel_codec); return size; } @@ -1348,6 +1387,8 @@ namespace Tango.PMR.Diagnostics { headZone4HeaterCurrent_.Add(other.headZone4HeaterCurrent_); headZone56HeaterCurrent_.Add(other.headZone56HeaterCurrent_); mixer1HeaterCurrent_.Add(other.mixer1HeaterCurrent_); + dispensersInkLevel_.Add(other.dispensersInkLevel_); + midTanksInkLevel_.Add(other.midTanksInkLevel_); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1669,6 +1710,14 @@ namespace Tango.PMR.Diagnostics { mixer1HeaterCurrent_.AddEntriesFrom(input, _repeated_mixer1HeaterCurrent_codec); break; } + case 514: { + dispensersInkLevel_.AddEntriesFrom(input, _repeated_dispensersInkLevel_codec); + break; + } + case 522: { + midTanksInkLevel_.AddEntriesFrom(input, _repeated_midTanksInkLevel_codec); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareBlower.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareBlower.cs index 8138b2d70..4685c17fa 100644 --- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareBlower.cs +++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareBlower.cs @@ -98,6 +98,9 @@ namespace Tango.PMR.Hardware { /// Field number for the "Voltage" field. public const int VoltageFieldNumber = 3; private double voltage_; + /// + ///Voltage Description + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Voltage { get { return voltage_; } diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/App.config b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/App.config index 5e14aa35c..feee84b8b 100644 --- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/App.config +++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/App.config @@ -19,6 +19,10 @@ + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs index b5442e72b..78a9d0380 100644 --- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs @@ -11,6 +11,7 @@ using Tango.BL; using static Tango.Core.Components.DataBaseDescriptionsHelper; using Tango.Core.Components; using System.ComponentModel.DataAnnotations.Schema; +using Newtonsoft.Json; namespace Tango.PMRGenerator.CLI { @@ -747,7 +748,22 @@ namespace Tango.PMRGenerator.CLI if (db_des != null) { - return db_des.ColumnDescription.ToLines().Take(1).Concat(db_des.ColumnDescription.ToLines().Skip(1).Select(x => "//" + x)).Join(Environment.NewLine); + RangeDescriptionModel rangeDescription = null; + + try + { + rangeDescription = JsonConvert.DeserializeObject(db_des.ColumnDescription); + } + catch { } + + if (rangeDescription != null && rangeDescription.Description != null) + { + return rangeDescription.Description.ToLines().Take(1).Concat(rangeDescription.Description.ToLines().Skip(1).Select(x => "//" + x)).Join(Environment.NewLine); + } + else + { + return db_des.ColumnDescription.ToLines().Take(1).Concat(db_des.ColumnDescription.ToLines().Skip(1).Select(x => "//" + x)).Join(Environment.NewLine); + } } return null; diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Tango.PMRGenerator.CLI.csproj b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Tango.PMRGenerator.CLI.csproj index 21e77f3d4..a02aca302 100644 --- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Tango.PMRGenerator.CLI.csproj +++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Tango.PMRGenerator.CLI.csproj @@ -38,6 +38,9 @@ ..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + @@ -80,7 +83,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/packages.config b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/packages.config index b3daf0d6c..1127d4e32 100644 --- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/packages.config +++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file -- cgit v1.3.1