aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-30 18:33:30 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-30 18:33:30 +0200
commit4760444d7276aec024dac5fbbc202becc41105dd (patch)
tree5993065e325350e782415c07c41bda25f504d854 /Software
parent78895e61c773c785dd8d8e3ed4f17236cdcefcd0 (diff)
downloadTango-4760444d7276aec024dac5fbbc202becc41105dd.tar.gz
Tango-4760444d7276aec024dac5fbbc202becc41105dd.zip
Machine designer working with spools !
PMR of dispenser & spools changed.
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin22675456 -> 22675456 bytes
-rw-r--r--Software/PMR/Messages/Hardware/HardwareDispenser.proto4
-rw-r--r--Software/PMR/Messages/Printing/JobSpool.proto10
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs44
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml81
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs4
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/Spool.cs188
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs152
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx38
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram152
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs6
-rw-r--r--Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs4
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs12
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs56
-rw-r--r--Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs88
-rw-r--r--Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs13
22 files changed, 534 insertions, 360 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index ddbc9be45..2da0d929f 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index 3dff3f627..f758ff284 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/PMR/Messages/Hardware/HardwareDispenser.proto b/Software/PMR/Messages/Hardware/HardwareDispenser.proto
index 0326aa7f8..7167ac517 100644
--- a/Software/PMR/Messages/Hardware/HardwareDispenser.proto
+++ b/Software/PMR/Messages/Hardware/HardwareDispenser.proto
@@ -22,8 +22,8 @@ message HardwareDispenser
int32 Index = 2;
- double NlPerPulse = 3;
+ double Capacity = 3;
- double Capacity = 4;
+ double NlPerPulse = 4;
}
diff --git a/Software/PMR/Messages/Printing/JobSpool.proto b/Software/PMR/Messages/Printing/JobSpool.proto
index ba140aaaa..a1d6b65ab 100644
--- a/Software/PMR/Messages/Printing/JobSpool.proto
+++ b/Software/PMR/Messages/Printing/JobSpool.proto
@@ -26,14 +26,14 @@ message JobSpool
double Diameter = 4;
- int32 StartOffsetPulses = 5;
+ double RotationsPerPassage = 5;
- int32 BackingRate = 6;
+ int32 StartOffsetPulses = 6;
- int32 SegmentOffsetPulses = 7;
+ int32 BackingRate = 7;
- int32 BottomBackingRate = 8;
+ int32 SegmentOffsetPulses = 8;
- double RotationsPerPassage = 9;
+ int32 BottomBackingRate = 9;
}
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 84fffcc74..8b0a89336 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
@@ -1695,6 +1695,9 @@ namespace Tango.MachineStudio.Developer.ViewModels
WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection();
SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection();
+ LogManager.Log("Loading machine spools...");
+ _activeJobDbContext.Spools.Where(x => x.MachineGuid == SelectedMachine.Guid).Load();
+
LogManager.Log("Setting active job...");
ActiveJob = new JobBuilder(_activeJobDbContext).Set(SelectedMachineJob.Guid).WithUser().WithSegments().WithBrushStops().WithConfiguration().WithRML().Build();
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
index a55d7e696..6857df3c7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj
@@ -102,6 +102,9 @@
<Compile Include="Views\MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\SpoolsView.xaml.cs">
+ <DependentUpon>SpoolsView.xaml</DependentUpon>
+ </Compile>
<Page Include="Views\MachineDetailsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -130,6 +133,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Views\SpoolsView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
index b0b97d7d4..a5b54fed2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs
@@ -101,6 +101,14 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
set { _filter = value; RaisePropertyChangedAuto(); OnFilterChanged(); }
}
+ private Spool _selectedSpool;
+ public Spool SelectedSpool
+ {
+ get { return _selectedSpool; }
+ set { _selectedSpool = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); }
+ }
+
+
#endregion
#region Commands
@@ -140,6 +148,16 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
/// </summary>
public RelayCommand BackToMachinesCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the add spool command.
+ /// </summary>
+ public RelayCommand AddSpoolCommand { get; set; }
+
+ /// <summary>
+ /// Gets or sets the remove spool command.
+ /// </summary>
+ public RelayCommand RemoveSpoolCommand { get; set; }
+
#endregion
#region Constructors
@@ -165,8 +183,11 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
SaveCommand = new RelayCommand(SaveMachine);
AddMachineCommand = new RelayCommand(AddNewMachine);
RemoveMachineCommand = new RelayCommand(RemoveSelectedMachine,() => SelectedMachine != null);
+ AddSpoolCommand = new RelayCommand(AddNewSpool);
+ RemoveSpoolCommand = new RelayCommand(RemoveSpool,() => SelectedSpool != null);
}
+
#endregion
#region Application Ready
@@ -489,6 +510,11 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
}
}
+ if (ActiveMachine.Spools.GroupBy(x => x.SpoolType).Any(x => x.Count() > 1))
+ {
+ errors.Add($"Same spool type is registered multiple times.");
+ }
+
if (errors.Count > 0)
{
String errorsString = "Please fix the following validation errors before trying to save." + Environment.NewLine + Environment.NewLine;
@@ -508,6 +534,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
ActiveMachine.LastUpdated = DateTime.UtcNow;
ActiveMachine.ProductionDate = DateTime.UtcNow;
await ActiveMachineAdapter.Context.SaveChangesAsync();
+ await SelectedMachine.Reload(MachinesAdapter.Context);
}
}
catch (Exception ex)
@@ -554,6 +581,23 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
#endregion
+ private void AddNewSpool()
+ {
+ _activeMachineAdapter.Context.Spools.Add(new Spool()
+ {
+ Machine = ActiveMachine,
+ });
+ }
+
+ private void RemoveSpool()
+ {
+ if (SelectedSpool != null)
+ {
+ _activeMachineAdapter.Context.Spools.Remove(SelectedSpool);
+ ActiveMachine.Spools.Remove(SelectedSpool);
+ }
+ }
+
private async void OnFilterChanged()
{
if (Filter != null)
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml
index 4b021e424..5db96a3a1 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineDetailsView.xaml
@@ -50,7 +50,7 @@
<local:ConfigurationView/>
</TabItem>
<TabItem Header="SPOOLS">
-
+ <local:SpoolsView/>
</TabItem>
</TabControl>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
index 63d1d2305..afd52f38d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineSettingsView.xaml
@@ -28,7 +28,7 @@
<local:MachineView DataContext="{Binding ActiveMachine}" IsHitTestVisible="False" />
<Border Grid.Column="1" Margin="100 140" CornerRadius="5" Background="#68F6F6F6" Padding="10" BorderBrush="Silver" BorderThickness="1">
- <Grid>
+ <Grid TextElement.Foreground="#3E3E3E">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml
new file mode 100644
index 000000000..d04389ae7
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml
@@ -0,0 +1,81 @@
+<UserControl x:Class="Tango.MachineStudio.MachineDesigner.Views.SpoolsView"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+ <Grid Margin="20">
+ <DockPanel>
+ <Grid DockPanel.Dock="Bottom">
+
+ </Grid>
+
+ <Grid Margin="0 20">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="38*"/>
+ <ColumnDefinition Width="117*"/>
+ </Grid.ColumnDefinitions>
+
+ <local:MachineView Margin="30 80 0 0" DataContext="{Binding ActiveMachine}" IsHitTestVisible="False" VerticalAlignment="Top" Height="241" />
+
+ <DockPanel Grid.Column="1" Margin="50 100">
+ <Grid DockPanel.Dock="Bottom">
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveSpoolCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Margin="0 0 0 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddSpoolCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">NEW SPOOL</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+
+ </StackPanel>
+ </Grid>
+ <Grid>
+ <DataGrid Margin="0 0 0 10" SelectionUnit="FullRow" BorderBrush="Silver" BorderThickness="1" Background="#93FFFFFF" AlternatingRowBackground="#C9F6F6F6" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding ActiveMachine.Spools}" SelectedItem="{Binding SelectedSpool}">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridComboBoxColumn Header="SPOOL TYPE" SelectedItemBinding="{Binding SpoolType}" DisplayMemberPath="Name" Width="Auto">
+ <DataGridComboBoxColumn.ElementStyle>
+ <Style TargetType="ComboBox">
+ <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid},Path=DataContext.ActiveMachineAdapter.SpoolTypes}"/>
+ </Style>
+ </DataGridComboBoxColumn.ElementStyle>
+ <DataGridComboBoxColumn.EditingElementStyle>
+ <Style TargetType="ComboBox">
+ <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid},Path=DataContext.ActiveMachineAdapter.SpoolTypes}"/>
+ </Style>
+ </DataGridComboBoxColumn.EditingElementStyle>
+ </DataGridComboBoxColumn>
+ <DataGridTextColumn Header="START OFFSET PULSES" Binding="{Binding StartOffsetPulses}" Width="Auto" />
+ <DataGridTextColumn Header="BACKING RATE" Binding="{Binding BackingRate}" Width="Auto" />
+ <DataGridTextColumn Header="SEGMENT OFFSET PULSES" Binding="{Binding SegmentOffsetPulses}" Width="Auto" />
+ <DataGridTextColumn Header="BOTTOM BACKING RATE" Binding="{Binding BottomBackingRate}" Width="1*" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml.cs
new file mode 100644
index 000000000..90a0c37f2
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/SpoolsView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.MachineStudio.MachineDesigner.Views
+{
+ /// <summary>
+ /// Interaction logic for SpoolsView.xaml
+ /// </summary>
+ public partial class SpoolsView : UserControl
+ {
+ public SpoolsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs
index c75c7cec0..dd27d94f0 100644
--- a/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs
+++ b/Software/Visual_Studio/Tango.BL/Builders/MachineBuilder.cs
@@ -47,9 +47,9 @@ namespace Tango.BL.Builders
public virtual MachineBuilder WithSpools()
{
- return AddStep(3, () =>
+ return AddStep(4, () =>
{
- Context.Spools.Where(x => x.MachineGuide == Entity.Guid).Include(x => x.SpoolType).ToList();
+ Context.Spools.Where(x => x.MachineGuid == Entity.Guid).Include(x => x.SpoolType).ToList();
});
}
}
diff --git a/Software/Visual_Studio/Tango.BL/Entities/Spool.cs b/Software/Visual_Studio/Tango.BL/Entities/Spool.cs
index a38c1eb48..fa8816ec5 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/Spool.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/Spool.cs
@@ -25,9 +25,15 @@ namespace Tango.BL.Entities
public partial class Spool : ObservableEntity<Spool>
{
- public event EventHandler<String> MachineGuideChanged;
+ public event EventHandler<Int32> StartOffsetPulsesChanged;
- public event EventHandler<Machine> MachineeChanged;
+ public event EventHandler<Int32> BackingRateChanged;
+
+ public event EventHandler<Int32> SegmentOffsetPulsesChanged;
+
+ public event EventHandler<Int32> BottomBackingRateChanged;
+
+ public event EventHandler<Machine> MachineChanged;
public event EventHandler<SpoolType> SpoolTypeChanged;
@@ -56,35 +62,140 @@ namespace Tango.BL.Entities
}
}
- protected String _machineguide;
+ protected String _machineguid;
+
+ /// <summary>
+ /// Gets or sets the spool machine guid.
+ /// </summary>
+
+ [Column("MACHINE_GUID")]
+ [ForeignKey("Machine")]
+
+ public String MachineGuid
+ {
+ get
+ {
+ return _machineguid;
+ }
+
+ set
+ {
+ if (_machineguid != value)
+ {
+ _machineguid = value;
+ }
+ }
+ }
+
+ protected Int32 _startoffsetpulses;
+
+ /// <summary>
+ /// Gets or sets the spool start offset pulses.
+ /// </summary>
+
+ [Column("START_OFFSET_PULSES")]
+
+ public Int32 StartOffsetPulses
+ {
+ get
+ {
+ return _startoffsetpulses;
+ }
+
+ set
+ {
+ if (_startoffsetpulses != value)
+ {
+ _startoffsetpulses = value;
+
+ OnStartOffsetPulsesChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _backingrate;
+
+ /// <summary>
+ /// Gets or sets the spool backing rate.
+ /// </summary>
+
+ [Column("BACKING_RATE")]
+
+ public Int32 BackingRate
+ {
+ get
+ {
+ return _backingrate;
+ }
+
+ set
+ {
+ if (_backingrate != value)
+ {
+ _backingrate = value;
+
+ OnBackingRateChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _segmentoffsetpulses;
+
+ /// <summary>
+ /// Gets or sets the spool segment offset pulses.
+ /// </summary>
+
+ [Column("SEGMENT_OFFSET_PULSES")]
+
+ public Int32 SegmentOffsetPulses
+ {
+ get
+ {
+ return _segmentoffsetpulses;
+ }
+
+ set
+ {
+ if (_segmentoffsetpulses != value)
+ {
+ _segmentoffsetpulses = value;
+
+ OnSegmentOffsetPulsesChanged(value);
+
+ }
+ }
+ }
+
+ protected Int32 _bottombackingrate;
/// <summary>
- /// Gets or sets the spool machine guide.
+ /// Gets or sets the spool bottom backing rate.
/// </summary>
- [Column("MACHINE_GUIDE")]
- [ForeignKey("Machinee")]
+ [Column("BOTTOM_BACKING_RATE")]
- public String MachineGuide
+ public Int32 BottomBackingRate
{
get
{
- return _machineguide;
+ return _bottombackingrate;
}
set
{
- if (_machineguide != value)
+ if (_bottombackingrate != value)
{
- _machineguide = value;
+ _bottombackingrate = value;
- OnMachineGuideChanged(value);
+ OnBottomBackingRateChanged(value);
}
}
}
- protected Machine _machinee;
+ protected Machine _machine;
/// <summary>
/// Gets or sets the spool machine.
@@ -92,20 +203,20 @@ namespace Tango.BL.Entities
[XmlIgnore]
[JsonIgnore]
- public virtual Machine Machinee
+ public virtual Machine Machine
{
get
{
- return _machinee;
+ return _machine;
}
set
{
- if (_machinee != value)
+ if (_machine != value)
{
- _machinee = value;
+ _machine = value;
- OnMachineeChanged(value);
+ OnMachineChanged(value);
}
}
@@ -139,21 +250,48 @@ namespace Tango.BL.Entities
}
/// <summary>
- /// Called when the MachineGuide has changed.
+ /// Called when the StartOffsetPulses has changed.
+ /// </summary>
+ protected virtual void OnStartOffsetPulsesChanged(Int32 startoffsetpulses)
+ {
+ StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses);
+ RaisePropertyChanged(nameof(StartOffsetPulses));
+ }
+
+ /// <summary>
+ /// Called when the BackingRate has changed.
+ /// </summary>
+ protected virtual void OnBackingRateChanged(Int32 backingrate)
+ {
+ BackingRateChanged?.Invoke(this, backingrate);
+ RaisePropertyChanged(nameof(BackingRate));
+ }
+
+ /// <summary>
+ /// Called when the SegmentOffsetPulses has changed.
+ /// </summary>
+ protected virtual void OnSegmentOffsetPulsesChanged(Int32 segmentoffsetpulses)
+ {
+ SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses);
+ RaisePropertyChanged(nameof(SegmentOffsetPulses));
+ }
+
+ /// <summary>
+ /// Called when the BottomBackingRate has changed.
/// </summary>
- protected virtual void OnMachineGuideChanged(String machineguide)
+ protected virtual void OnBottomBackingRateChanged(Int32 bottombackingrate)
{
- MachineGuideChanged?.Invoke(this, machineguide);
- RaisePropertyChanged(nameof(MachineGuide));
+ BottomBackingRateChanged?.Invoke(this, bottombackingrate);
+ RaisePropertyChanged(nameof(BottomBackingRate));
}
/// <summary>
- /// Called when the Machinee has changed.
+ /// Called when the Machine has changed.
/// </summary>
- protected virtual void OnMachineeChanged(Machine machinee)
+ protected virtual void OnMachineChanged(Machine machine)
{
- MachineeChanged?.Invoke(this, machinee);
- RaisePropertyChanged(nameof(Machinee));
+ MachineChanged?.Invoke(this, machine);
+ RaisePropertyChanged(nameof(Machine));
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs b/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
index eafc39a25..a469220c5 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/SpoolType.cs
@@ -35,14 +35,6 @@ namespace Tango.BL.Entities
public event EventHandler<Double> DiameterChanged;
- public event EventHandler<Int32> StartOffsetPulsesChanged;
-
- public event EventHandler<Int32> BackingRateChanged;
-
- public event EventHandler<Int32> SegmentOffsetPulsesChanged;
-
- public event EventHandler<Int32> BottomBackingRateChanged;
-
public event EventHandler<Double> RotationsPerPassageChanged;
public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;
@@ -186,114 +178,6 @@ namespace Tango.BL.Entities
}
}
- protected Int32 _startoffsetpulses;
-
- /// <summary>
- /// Gets or sets the spooltype start offset pulses.
- /// </summary>
-
- [Column("START_OFFSET_PULSES")]
-
- public Int32 StartOffsetPulses
- {
- get
- {
- return _startoffsetpulses;
- }
-
- set
- {
- if (_startoffsetpulses != value)
- {
- _startoffsetpulses = value;
-
- OnStartOffsetPulsesChanged(value);
-
- }
- }
- }
-
- protected Int32 _backingrate;
-
- /// <summary>
- /// Gets or sets the spooltype backing rate.
- /// </summary>
-
- [Column("BACKING_RATE")]
-
- public Int32 BackingRate
- {
- get
- {
- return _backingrate;
- }
-
- set
- {
- if (_backingrate != value)
- {
- _backingrate = value;
-
- OnBackingRateChanged(value);
-
- }
- }
- }
-
- protected Int32 _segmentoffsetpulses;
-
- /// <summary>
- /// Gets or sets the spooltype segment offset pulses.
- /// </summary>
-
- [Column("SEGMENT_OFFSET_PULSES")]
-
- public Int32 SegmentOffsetPulses
- {
- get
- {
- return _segmentoffsetpulses;
- }
-
- set
- {
- if (_segmentoffsetpulses != value)
- {
- _segmentoffsetpulses = value;
-
- OnSegmentOffsetPulsesChanged(value);
-
- }
- }
- }
-
- protected Int32 _bottombackingrate;
-
- /// <summary>
- /// Gets or sets the spooltype bottom backing rate.
- /// </summary>
-
- [Column("BOTTOM_BACKING_RATE")]
-
- public Int32 BottomBackingRate
- {
- get
- {
- return _bottombackingrate;
- }
-
- set
- {
- if (_bottombackingrate != value)
- {
- _bottombackingrate = value;
-
- OnBottomBackingRateChanged(value);
-
- }
- }
- }
-
protected Double _rotationsperpassage;
/// <summary>
@@ -442,42 +326,6 @@ namespace Tango.BL.Entities
}
/// <summary>
- /// Called when the StartOffsetPulses has changed.
- /// </summary>
- protected virtual void OnStartOffsetPulsesChanged(Int32 startoffsetpulses)
- {
- StartOffsetPulsesChanged?.Invoke(this, startoffsetpulses);
- RaisePropertyChanged(nameof(StartOffsetPulses));
- }
-
- /// <summary>
- /// Called when the BackingRate has changed.
- /// </summary>
- protected virtual void OnBackingRateChanged(Int32 backingrate)
- {
- BackingRateChanged?.Invoke(this, backingrate);
- RaisePropertyChanged(nameof(BackingRate));
- }
-
- /// <summary>
- /// Called when the SegmentOffsetPulses has changed.
- /// </summary>
- protected virtual void OnSegmentOffsetPulsesChanged(Int32 segmentoffsetpulses)
- {
- SegmentOffsetPulsesChanged?.Invoke(this, segmentoffsetpulses);
- RaisePropertyChanged(nameof(SegmentOffsetPulses));
- }
-
- /// <summary>
- /// Called when the BottomBackingRate has changed.
- /// </summary>
- protected virtual void OnBottomBackingRateChanged(Int32 bottombackingrate)
- {
- BottomBackingRateChanged?.Invoke(this, bottombackingrate);
- RaisePropertyChanged(nameof(BottomBackingRate));
- }
-
- /// <summary>
/// Called when the RotationsPerPassage has changed.
/// </summary>
protected virtual void OnRotationsPerPassageChanged(Double rotationsperpassage)
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
index bb3d1be20..eecb142ee 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx
@@ -932,10 +932,6 @@
<Property Name="LENGTH" Type="float" Nullable="false" />
<Property Name="WEIGHT" Type="float" Nullable="false" />
<Property Name="DIAMETER" Type="float" Nullable="false" />
- <Property Name="START_OFFSET_PULSES" Type="int" Nullable="false" />
- <Property Name="BACKING_RATE" Type="int" Nullable="false" />
- <Property Name="SEGMENT_OFFSET_PULSES" Type="int" Nullable="false" />
- <Property Name="BOTTOM_BACKING_RATE" Type="int" Nullable="false" />
<Property Name="ROTATIONS_PER_PASSAGE" Type="float" Nullable="false" />
</EntityType>
<EntityType Name="SPOOLS">
@@ -946,7 +942,11 @@
<Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" />
<Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" />
<Property Name="SPOOL_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
- <Property Name="MACHINE_GUIDE" Type="varchar" MaxLength="36" />
+ <Property Name="MACHINE_GUID" Type="varchar" MaxLength="36" Nullable="false" />
+ <Property Name="START_OFFSET_PULSES" Type="int" Nullable="false" />
+ <Property Name="BACKING_RATE" Type="int" Nullable="false" />
+ <Property Name="SEGMENT_OFFSET_PULSES" Type="int" Nullable="false" />
+ <Property Name="BOTTOM_BACKING_RATE" Type="int" Nullable="false" />
</EntityType>
<EntityType Name="SYNC_CONFIGURATIONS">
<Key>
@@ -2071,7 +2071,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_SPOOLS_MACHINES">
- <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="0..1">
+ <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Role="SPOOLS" Type="Self.SPOOLS" Multiplicity="*" />
@@ -2080,7 +2080,7 @@
<PropertyRef Name="GUID" />
</Principal>
<Dependent Role="SPOOLS">
- <PropertyRef Name="MACHINE_GUIDE" />
+ <PropertyRef Name="MACHINE_GUID" />
</Dependent>
</ReferentialConstraint>
</Association>
@@ -4107,10 +4107,6 @@
<Property Name="LENGTH" Type="Double" Nullable="false" />
<Property Name="WEIGHT" Type="Double" Nullable="false" />
<Property Name="DIAMETER" Type="Double" Nullable="false" />
- <Property Name="START_OFFSET_PULSES" Type="Int32" Nullable="false" />
- <Property Name="BACKING_RATE" Type="Int32" Nullable="false" />
- <Property Name="SEGMENT_OFFSET_PULSES" Type="Int32" Nullable="false" />
- <Property Name="BOTTOM_BACKING_RATE" Type="Int32" Nullable="false" />
<Property Name="ROTATIONS_PER_PASSAGE" Type="Double" Nullable="false" />
<NavigationProperty Name="JOBS" Relationship="RemoteModel.FK_JOBS_SPOOL_TYPES" FromRole="SPOOL_TYPES" ToRole="JOB" />
<NavigationProperty Name="MACHINES" Relationship="RemoteModel.FK_MACHINES_SPOOL_TYPES" FromRole="SPOOL_TYPES" ToRole="MACHINE" />
@@ -4124,7 +4120,11 @@
<Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
<Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" />
<Property Name="SPOOL_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
- <Property Name="MACHINE_GUIDE" Type="String" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="MACHINE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" />
+ <Property Name="START_OFFSET_PULSES" Type="Int32" Nullable="false" />
+ <Property Name="BACKING_RATE" Type="Int32" Nullable="false" />
+ <Property Name="SEGMENT_OFFSET_PULSES" Type="Int32" Nullable="false" />
+ <Property Name="BOTTOM_BACKING_RATE" Type="Int32" Nullable="false" />
<NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_SPOOLS_MACHINES" FromRole="SPOOL" ToRole="MACHINE" />
<NavigationProperty Name="SPOOL_TYPES" Relationship="RemoteModel.FK_SPOOLS_SPOOL_TYPES" FromRole="SPOOL" ToRole="SPOOL_TYPES" />
</EntityType>
@@ -5180,7 +5180,7 @@
</ReferentialConstraint>
</Association>
<Association Name="FK_SPOOLS_MACHINES">
- <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="0..1">
+ <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="1">
<OnDelete Action="Cascade" />
</End>
<End Type="RemoteModel.SPOOL" Role="SPOOL" Multiplicity="*" />
@@ -5189,7 +5189,7 @@
<PropertyRef Name="GUID" />
</Principal>
<Dependent Role="SPOOL">
- <PropertyRef Name="MACHINE_GUIDE" />
+ <PropertyRef Name="MACHINE_GUID" />
</Dependent>
</ReferentialConstraint>
</Association>
@@ -6370,10 +6370,6 @@
<EntityTypeMapping TypeName="RemoteModel.SPOOL_TYPES">
<MappingFragment StoreEntitySet="SPOOL_TYPES">
<ScalarProperty Name="ROTATIONS_PER_PASSAGE" ColumnName="ROTATIONS_PER_PASSAGE" />
- <ScalarProperty Name="BOTTOM_BACKING_RATE" ColumnName="BOTTOM_BACKING_RATE" />
- <ScalarProperty Name="SEGMENT_OFFSET_PULSES" ColumnName="SEGMENT_OFFSET_PULSES" />
- <ScalarProperty Name="BACKING_RATE" ColumnName="BACKING_RATE" />
- <ScalarProperty Name="START_OFFSET_PULSES" ColumnName="START_OFFSET_PULSES" />
<ScalarProperty Name="DIAMETER" ColumnName="DIAMETER" />
<ScalarProperty Name="WEIGHT" ColumnName="WEIGHT" />
<ScalarProperty Name="LENGTH" ColumnName="LENGTH" />
@@ -6388,7 +6384,11 @@
<EntitySetMapping Name="SPOOLS">
<EntityTypeMapping TypeName="RemoteModel.SPOOL">
<MappingFragment StoreEntitySet="SPOOLS">
- <ScalarProperty Name="MACHINE_GUIDE" ColumnName="MACHINE_GUIDE" />
+ <ScalarProperty Name="BOTTOM_BACKING_RATE" ColumnName="BOTTOM_BACKING_RATE" />
+ <ScalarProperty Name="SEGMENT_OFFSET_PULSES" ColumnName="SEGMENT_OFFSET_PULSES" />
+ <ScalarProperty Name="BACKING_RATE" ColumnName="BACKING_RATE" />
+ <ScalarProperty Name="START_OFFSET_PULSES" ColumnName="START_OFFSET_PULSES" />
+ <ScalarProperty Name="MACHINE_GUID" ColumnName="MACHINE_GUID" />
<ScalarProperty Name="SPOOL_TYPE_GUID" ColumnName="SPOOL_TYPE_GUID" />
<ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" />
<ScalarProperty Name="GUID" ColumnName="GUID" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
index d42da3d76..dc1208fee 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram
@@ -5,82 +5,82 @@
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1">
- <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="13.25" PointY="78" />
- <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="3.5" PointY="44.5" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="8.75" PointY="13.375" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="8.75" PointY="19.25" />
- <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="8.75" PointY="16.375" />
- <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15.75" PointY="33.75" />
- <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="11" PointY="67.375" />
- <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="31.625" />
- <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="59" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="13.5" PointY="40.625" />
- <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="8" PointY="35.25" />
- <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="11" PointY="8.375" />
- <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="3.5" PointY="48.75" />
- <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="8" PointY="47.125" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="8.75" PointY="70.5" />
- <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="11" PointY="70.375" />
- <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="8.75" PointY="22.125" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="13.25" PointY="49.125" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="15.5" PointY="50" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="11" PointY="49.875" />
- <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="11" PointY="46.75" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="22.625" />
- <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="36.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="11.75" PointY="74.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="14" PointY="9.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="14.75" PointY="20.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="17" PointY="3.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="8.75" PointY="60.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="11" PointY="13.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="14.75" PointY="54.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="17" PointY="7.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="8.75" PointY="56.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="11" PointY="0.75" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="13.75" PointY="60.625" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="16" PointY="15.375" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="8.75" PointY="9.125" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="11.75" PointY="57.25" />
- <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="14" PointY="5.5" />
- <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="11" PointY="53" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="11" PointY="61" />
- <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="13.25" PointY="14.875" />
- <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="12.5" PointY="22.875" />
- <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="10.25" PointY="26.375" />
- <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="30.125" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="22.625" />
- <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="23.75" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="10.25" PointY="37.125" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="11" PointY="19.375" />
- <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="13.25" PointY="27.25" />
- <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="15.5" PointY="29.5" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="33.375" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="25.5" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="42.625" />
- <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="39.625" />
- <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="11" PointY="64.25" />
- <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="5.75" PointY="46.75" />
- <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="14" PointY="68.375" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="26.125" />
- <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="27.75" />
- <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="27" />
- <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="14" PointY="64.25" />
- <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="16.25" PointY="64.375" />
- <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="12.5" PointY="36.625" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="11" PointY="40.875" />
- <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="18.5" PointY="30" />
- <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="0.75" PointY="9.625" />
- <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="16.25" PointY="25.125" />
- <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="2.75" PointY="9.625" />
- <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="4.75" PointY="9.625" />
- <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="0.75" PointY="13.625" />
- <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="2.75" PointY="13.625" />
- <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="4.75" PointY="12.625" />
- <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="4.75" PointY="17.625" />
- <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="8" PointY="39.25" />
- <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="16.25" PointY="43.25" />
- <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="8" PointY="52.875" />
+ <EntityTypeShape EntityType="RemoteModel.ACTION_TYPES" Width="1.5" PointX="5.25" PointY="71.5" />
+ <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="0.75" PointY="55.75" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="0.75" PointY="50.125" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="40" />
+ <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="0.75" PointY="42.875" />
+ <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15.75" PointY="19.875" />
+ <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="0.875" />
+ <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="20.625" />
+ <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="5.25" PointY="50.125" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="13.5" PointY="26.625" />
+ <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="3" PointY="37" />
+ <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3" PointY="42.625" />
+ <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="0.75" PointY="60" />
+ <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="25.5" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="3.75" PointY="67.25" />
+ <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="6" PointY="67" />
+ <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="37.125" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="5.25" PointY="4.625" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_ACTIONS" Width="1.5" PointX="7.5" PointY="5.5" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_CATEGORIES" Width="1.5" PointX="3" PointY="8.625" />
+ <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES_GROUPS" Width="1.5" PointX="3" PointY="2.25" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="27.75" />
+ <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="24.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="5.75" PointY="75.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="8" PointY="50" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="7.75" PointY="71.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="10" PointY="46.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="3.75" PointY="62.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="6" PointY="54.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="8.75" PointY="54.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="11" PointY="50" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="7.75" PointY="60.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="10" PointY="38.5" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="3.75" PointY="33.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="6" PointY="39.125" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="0.75" PointY="45.875" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="10.75" PointY="58.375" />
+ <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="13" PointY="46.25" />
+ <EntityTypeShape EntityType="RemoteModel.HTML_PAGES" Width="1.5" PointX="3" PointY="5.375" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="63.75" />
+ <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="32.625" />
+ <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="13.5" PointY="19" />
+ <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="17.5" />
+ <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="30.75" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="6" PointY="30.75" />
+ <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="20.875" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="7.5" PointY="10.875" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3" PointY="48.125" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="5.25" PointY="12.375" />
+ <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="7.5" PointY="14.625" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_COLORS" Width="1.5" PointX="0.75" PointY="16.625" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="13.625" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="21.125" />
+ <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="33.625" />
+ <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="34.75" />
+ <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3" PointY="57.875" />
+ <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="14.25" PointY="36.875" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="43.25" />
+ <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="45" />
+ <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="18.125" />
+ <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="11.25" PointY="30.75" />
+ <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="16.5" PointY="30.875" />
+ <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="13.5" PointY="22.75" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="3" PointY="51.625" />
+ <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="10.5" PointY="12.625" />
+ <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="8.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="10.5" PointY="34.375" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="9.75" PointY="3.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="9.75" PointY="7.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="10.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="11.75" PointY="3.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="12.75" PointY="8.75" />
+ <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="13.75" PointY="0.75" />
+ <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="5.25" PointY="24.75" />
+ <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="13.5" PointY="32.75" />
+ <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="28.625" />
<AssociationConnector Association="RemoteModel.FK_EVENTS_ACTIONS_ACTIONS" />
<AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" />
<AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" />
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs
index 0194eb67f..74996acd0 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL.cs
@@ -18,7 +18,11 @@ namespace Tango.DAL.Remote.DB
public string GUID { get; set; }
public System.DateTime LAST_UPDATED { get; set; }
public string SPOOL_TYPE_GUID { get; set; }
- public string MACHINE_GUIDE { get; set; }
+ public string MACHINE_GUID { get; set; }
+ public int START_OFFSET_PULSES { get; set; }
+ public int BACKING_RATE { get; set; }
+ public int SEGMENT_OFFSET_PULSES { get; set; }
+ public int BOTTOM_BACKING_RATE { get; set; }
public virtual MACHINE MACHINE { get; set; }
public virtual SPOOL_TYPES SPOOL_TYPES { get; set; }
diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs
index dc264ea58..1d8b75f90 100644
--- a/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs
+++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/SPOOL_TYPES.cs
@@ -30,10 +30,6 @@ namespace Tango.DAL.Remote.DB
public double LENGTH { get; set; }
public double WEIGHT { get; set; }
public double DIAMETER { get; set; }
- public int START_OFFSET_PULSES { get; set; }
- public int BACKING_RATE { get; set; }
- public int SEGMENT_OFFSET_PULSES { get; set; }
- public int BOTTOM_BACKING_RATE { get; set; }
public double ROTATIONS_PER_PASSAGE { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index aa5f93b11..868a87d97 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -1213,6 +1213,18 @@ namespace Tango.Integration.Operation
ticket.Spool = new JobSpool();
job.SpoolType.MapPrimitivesTo(ticket.Spool);
+
+ var spool = job.Machine.Spools.SingleOrDefault(x => x.SpoolType == job.SpoolType);
+
+ if (spool == null)
+ {
+ throw new InvalidOperationException("Job spool type is not registered with this machine.");
+ }
+ else
+ {
+ spool.MapPrimitivesTo(ticket.Spool);
+ }
+
ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code;
ProcessParameters process = new ProcessParameters();
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
index 9e5920f01..25a6742a3 100644
--- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
@@ -26,12 +26,12 @@ namespace Tango.PMR.Hardware {
"GhtIYXJkd2FyZURpc3BlbnNlclR5cGUucHJvdG8ikgEKEUhhcmR3YXJlRGlz",
"cGVuc2VyEkgKFUhhcmR3YXJlRGlzcGVuc2VyVHlwZRgBIAEoDjIpLlRhbmdv",
"LlBNUi5IYXJkd2FyZS5IYXJkd2FyZURpc3BlbnNlclR5cGUSDQoFSW5kZXgY",
- "AiABKAUSEgoKTmxQZXJQdWxzZRgDIAEoARIQCghDYXBhY2l0eRgEIAEoAUIe",
+ "AiABKAUSEAoIQ2FwYWNpdHkYAyABKAESEgoKTmxQZXJQdWxzZRgEIAEoAUIe",
"Chxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareDispenserTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDispenser), global::Tango.PMR.Hardware.HardwareDispenser.Parser, new[]{ "HardwareDispenserType", "Index", "NlPerPulse", "Capacity" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDispenser), global::Tango.PMR.Hardware.HardwareDispenser.Parser, new[]{ "HardwareDispenserType", "Index", "Capacity", "NlPerPulse" }, null, null, null)
}));
}
#endregion
@@ -64,8 +64,8 @@ namespace Tango.PMR.Hardware {
public HardwareDispenser(HardwareDispenser other) : this() {
hardwareDispenserType_ = other.hardwareDispenserType_;
index_ = other.index_;
- nlPerPulse_ = other.nlPerPulse_;
capacity_ = other.capacity_;
+ nlPerPulse_ = other.nlPerPulse_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -95,19 +95,8 @@ namespace Tango.PMR.Hardware {
}
}
- /// <summary>Field number for the "NlPerPulse" field.</summary>
- public const int NlPerPulseFieldNumber = 3;
- private double nlPerPulse_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double NlPerPulse {
- get { return nlPerPulse_; }
- set {
- nlPerPulse_ = value;
- }
- }
-
/// <summary>Field number for the "Capacity" field.</summary>
- public const int CapacityFieldNumber = 4;
+ public const int CapacityFieldNumber = 3;
private double capacity_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double Capacity {
@@ -117,6 +106,17 @@ namespace Tango.PMR.Hardware {
}
}
+ /// <summary>Field number for the "NlPerPulse" field.</summary>
+ public const int NlPerPulseFieldNumber = 4;
+ private double nlPerPulse_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double NlPerPulse {
+ get { return nlPerPulse_; }
+ set {
+ nlPerPulse_ = value;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as HardwareDispenser);
@@ -132,8 +132,8 @@ namespace Tango.PMR.Hardware {
}
if (HardwareDispenserType != other.HardwareDispenserType) return false;
if (Index != other.Index) return false;
- if (NlPerPulse != other.NlPerPulse) return false;
if (Capacity != other.Capacity) return false;
+ if (NlPerPulse != other.NlPerPulse) return false;
return true;
}
@@ -142,8 +142,8 @@ namespace Tango.PMR.Hardware {
int hash = 1;
if (HardwareDispenserType != 0) hash ^= HardwareDispenserType.GetHashCode();
if (Index != 0) hash ^= Index.GetHashCode();
- if (NlPerPulse != 0D) hash ^= NlPerPulse.GetHashCode();
if (Capacity != 0D) hash ^= Capacity.GetHashCode();
+ if (NlPerPulse != 0D) hash ^= NlPerPulse.GetHashCode();
return hash;
}
@@ -162,13 +162,13 @@ namespace Tango.PMR.Hardware {
output.WriteRawTag(16);
output.WriteInt32(Index);
}
- if (NlPerPulse != 0D) {
+ if (Capacity != 0D) {
output.WriteRawTag(25);
- output.WriteDouble(NlPerPulse);
+ output.WriteDouble(Capacity);
}
- if (Capacity != 0D) {
+ if (NlPerPulse != 0D) {
output.WriteRawTag(33);
- output.WriteDouble(Capacity);
+ output.WriteDouble(NlPerPulse);
}
}
@@ -181,10 +181,10 @@ namespace Tango.PMR.Hardware {
if (Index != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index);
}
- if (NlPerPulse != 0D) {
+ if (Capacity != 0D) {
size += 1 + 8;
}
- if (Capacity != 0D) {
+ if (NlPerPulse != 0D) {
size += 1 + 8;
}
return size;
@@ -201,12 +201,12 @@ namespace Tango.PMR.Hardware {
if (other.Index != 0) {
Index = other.Index;
}
- if (other.NlPerPulse != 0D) {
- NlPerPulse = other.NlPerPulse;
- }
if (other.Capacity != 0D) {
Capacity = other.Capacity;
}
+ if (other.NlPerPulse != 0D) {
+ NlPerPulse = other.NlPerPulse;
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -226,11 +226,11 @@ namespace Tango.PMR.Hardware {
break;
}
case 25: {
- NlPerPulse = input.ReadDouble();
+ Capacity = input.ReadDouble();
break;
}
case 33: {
- Capacity = input.ReadDouble();
+ NlPerPulse = input.ReadDouble();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs
index afe846303..7261ba19b 100644
--- a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs
+++ b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs
@@ -25,15 +25,15 @@ namespace Tango.PMR.Printing {
"Cg5Kb2JTcG9vbC5wcm90bxISVGFuZ28uUE1SLlByaW50aW5nGhJKb2JTcG9v",
"bFR5cGUucHJvdG8i+QEKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo",
"DjIgLlRhbmdvLlBNUi5QcmludGluZy5Kb2JTcG9vbFR5cGUSDgoGTGVuZ3Ro",
- "GAIgASgBEg4KBldlaWdodBgDIAEoARIQCghEaWFtZXRlchgEIAEoARIZChFT",
- "dGFydE9mZnNldFB1bHNlcxgFIAEoBRITCgtCYWNraW5nUmF0ZRgGIAEoBRIb",
- "ChNTZWdtZW50T2Zmc2V0UHVsc2VzGAcgASgFEhkKEUJvdHRvbUJhY2tpbmdS",
- "YXRlGAggASgFEhsKE1JvdGF0aW9uc1BlclBhc3NhZ2UYCSABKAFCHgocY29t",
+ "GAIgASgBEg4KBldlaWdodBgDIAEoARIQCghEaWFtZXRlchgEIAEoARIbChNS",
+ "b3RhdGlvbnNQZXJQYXNzYWdlGAUgASgBEhkKEVN0YXJ0T2Zmc2V0UHVsc2Vz",
+ "GAYgASgFEhMKC0JhY2tpbmdSYXRlGAcgASgFEhsKE1NlZ21lbnRPZmZzZXRQ",
+ "dWxzZXMYCCABKAUSGQoRQm90dG9tQmFja2luZ1JhdGUYCSABKAVCHgocY29t",
"LnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "BottomBackingRate", "RotationsPerPassage" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "RotationsPerPassage", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "BottomBackingRate" }, null, null, null)
}));
}
#endregion
@@ -68,11 +68,11 @@ namespace Tango.PMR.Printing {
length_ = other.length_;
weight_ = other.weight_;
diameter_ = other.diameter_;
+ rotationsPerPassage_ = other.rotationsPerPassage_;
startOffsetPulses_ = other.startOffsetPulses_;
backingRate_ = other.backingRate_;
segmentOffsetPulses_ = other.segmentOffsetPulses_;
bottomBackingRate_ = other.bottomBackingRate_;
- rotationsPerPassage_ = other.rotationsPerPassage_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -124,8 +124,19 @@ namespace Tango.PMR.Printing {
}
}
+ /// <summary>Field number for the "RotationsPerPassage" field.</summary>
+ public const int RotationsPerPassageFieldNumber = 5;
+ private double rotationsPerPassage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double RotationsPerPassage {
+ get { return rotationsPerPassage_; }
+ set {
+ rotationsPerPassage_ = value;
+ }
+ }
+
/// <summary>Field number for the "StartOffsetPulses" field.</summary>
- public const int StartOffsetPulsesFieldNumber = 5;
+ public const int StartOffsetPulsesFieldNumber = 6;
private int startOffsetPulses_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int StartOffsetPulses {
@@ -136,7 +147,7 @@ namespace Tango.PMR.Printing {
}
/// <summary>Field number for the "BackingRate" field.</summary>
- public const int BackingRateFieldNumber = 6;
+ public const int BackingRateFieldNumber = 7;
private int backingRate_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int BackingRate {
@@ -147,7 +158,7 @@ namespace Tango.PMR.Printing {
}
/// <summary>Field number for the "SegmentOffsetPulses" field.</summary>
- public const int SegmentOffsetPulsesFieldNumber = 7;
+ public const int SegmentOffsetPulsesFieldNumber = 8;
private int segmentOffsetPulses_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int SegmentOffsetPulses {
@@ -158,7 +169,7 @@ namespace Tango.PMR.Printing {
}
/// <summary>Field number for the "BottomBackingRate" field.</summary>
- public const int BottomBackingRateFieldNumber = 8;
+ public const int BottomBackingRateFieldNumber = 9;
private int bottomBackingRate_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int BottomBackingRate {
@@ -168,17 +179,6 @@ namespace Tango.PMR.Printing {
}
}
- /// <summary>Field number for the "RotationsPerPassage" field.</summary>
- public const int RotationsPerPassageFieldNumber = 9;
- private double rotationsPerPassage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double RotationsPerPassage {
- get { return rotationsPerPassage_; }
- set {
- rotationsPerPassage_ = value;
- }
- }
-
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as JobSpool);
@@ -196,11 +196,11 @@ namespace Tango.PMR.Printing {
if (Length != other.Length) return false;
if (Weight != other.Weight) return false;
if (Diameter != other.Diameter) return false;
+ if (RotationsPerPassage != other.RotationsPerPassage) return false;
if (StartOffsetPulses != other.StartOffsetPulses) return false;
if (BackingRate != other.BackingRate) return false;
if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false;
if (BottomBackingRate != other.BottomBackingRate) return false;
- if (RotationsPerPassage != other.RotationsPerPassage) return false;
return true;
}
@@ -211,11 +211,11 @@ namespace Tango.PMR.Printing {
if (Length != 0D) hash ^= Length.GetHashCode();
if (Weight != 0D) hash ^= Weight.GetHashCode();
if (Diameter != 0D) hash ^= Diameter.GetHashCode();
+ if (RotationsPerPassage != 0D) hash ^= RotationsPerPassage.GetHashCode();
if (StartOffsetPulses != 0) hash ^= StartOffsetPulses.GetHashCode();
if (BackingRate != 0) hash ^= BackingRate.GetHashCode();
if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode();
if (BottomBackingRate != 0) hash ^= BottomBackingRate.GetHashCode();
- if (RotationsPerPassage != 0D) hash ^= RotationsPerPassage.GetHashCode();
return hash;
}
@@ -242,26 +242,26 @@ namespace Tango.PMR.Printing {
output.WriteRawTag(33);
output.WriteDouble(Diameter);
}
+ if (RotationsPerPassage != 0D) {
+ output.WriteRawTag(41);
+ output.WriteDouble(RotationsPerPassage);
+ }
if (StartOffsetPulses != 0) {
- output.WriteRawTag(40);
+ output.WriteRawTag(48);
output.WriteInt32(StartOffsetPulses);
}
if (BackingRate != 0) {
- output.WriteRawTag(48);
+ output.WriteRawTag(56);
output.WriteInt32(BackingRate);
}
if (SegmentOffsetPulses != 0) {
- output.WriteRawTag(56);
+ output.WriteRawTag(64);
output.WriteInt32(SegmentOffsetPulses);
}
if (BottomBackingRate != 0) {
- output.WriteRawTag(64);
+ output.WriteRawTag(72);
output.WriteInt32(BottomBackingRate);
}
- if (RotationsPerPassage != 0D) {
- output.WriteRawTag(73);
- output.WriteDouble(RotationsPerPassage);
- }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -279,6 +279,9 @@ namespace Tango.PMR.Printing {
if (Diameter != 0D) {
size += 1 + 8;
}
+ if (RotationsPerPassage != 0D) {
+ size += 1 + 8;
+ }
if (StartOffsetPulses != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartOffsetPulses);
}
@@ -291,9 +294,6 @@ namespace Tango.PMR.Printing {
if (BottomBackingRate != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(BottomBackingRate);
}
- if (RotationsPerPassage != 0D) {
- size += 1 + 8;
- }
return size;
}
@@ -314,6 +314,9 @@ namespace Tango.PMR.Printing {
if (other.Diameter != 0D) {
Diameter = other.Diameter;
}
+ if (other.RotationsPerPassage != 0D) {
+ RotationsPerPassage = other.RotationsPerPassage;
+ }
if (other.StartOffsetPulses != 0) {
StartOffsetPulses = other.StartOffsetPulses;
}
@@ -326,9 +329,6 @@ namespace Tango.PMR.Printing {
if (other.BottomBackingRate != 0) {
BottomBackingRate = other.BottomBackingRate;
}
- if (other.RotationsPerPassage != 0D) {
- RotationsPerPassage = other.RotationsPerPassage;
- }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -355,24 +355,24 @@ namespace Tango.PMR.Printing {
Diameter = input.ReadDouble();
break;
}
- case 40: {
- StartOffsetPulses = input.ReadInt32();
+ case 41: {
+ RotationsPerPassage = input.ReadDouble();
break;
}
case 48: {
- BackingRate = input.ReadInt32();
+ StartOffsetPulses = input.ReadInt32();
break;
}
case 56: {
- SegmentOffsetPulses = input.ReadInt32();
+ BackingRate = input.ReadInt32();
break;
}
case 64: {
- BottomBackingRate = input.ReadInt32();
+ SegmentOffsetPulses = input.ReadInt32();
break;
}
- case 73: {
- RotationsPerPassage = input.ReadDouble();
+ case 72: {
+ BottomBackingRate = input.ReadInt32();
break;
}
}
diff --git a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
index fda19dbd1..849dd5cde 100644
--- a/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
+++ b/Software/Visual_Studio/Utilities/Tango.PMRGenerator.CLI/Program.cs
@@ -214,6 +214,14 @@ namespace Tango.PMRGenerator.CLI
}
}
+ foreach (var prop in typeof(Dispenser).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive))
+ {
+ if (prop.Name != nameof(Dispenser.IsInstalled))
+ {
+ messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType), GetDbDescription<DispenserType>(prop)));
+ }
+ }
+
String enumString = enumFile.GenerateCode();
String messageString = messageFile.GenerateCode();
@@ -534,6 +542,11 @@ namespace Tango.PMRGenerator.CLI
}
}
+ foreach (var prop in typeof(Spool).GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly).Where(x => x.PropertyType.IsPrimitive))
+ {
+ messageFile.Properties.Add(new ProtoProperty(prop.Name, CoercePropertyType(prop.PropertyType)));
+ }
+
String enumString = enumFile.GenerateCode();
String messageString = messageFile.GenerateCode();