aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-08 19:22:42 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-08 19:22:42 +0200
commit6103db0f792e396583929c08117e07fb6b9aa389 (patch)
treeb7606b44cce5c3b224ddba8ac6491aff48438b50
parenta1432b11d087a4b2f4530504e18434225b36bf48 (diff)
downloadTango-6103db0f792e396583929c08117e07fb6b9aa389.tar.gz
Tango-6103db0f792e396583929c08117e07fb6b9aa389.zip
Working on MachineTechView...
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin8388608 -> 8388608 bytes
-rw-r--r--Software/Graphics/analog.pngbin0 -> 7334 bytes
-rw-r--r--Software/Graphics/graph.pngbin0 -> 1842 bytes
-rw-r--r--Software/Graphics/single-graph.pngbin0 -> 4236 bytes
-rw-r--r--Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/MonitorsToSingleChannleMonitorsConverter.cs34
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml.cs27
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml79
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml.cs102
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/analog.pngbin0 -> 7334 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/graph.pngbin0 -> 1842 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/single-graph.pngbin0 -> 4236 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml.cs29
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj36
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Items/MonitorItem.cs)14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs60
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Items/TechItem.cs)41
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModule.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs153
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml94
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs29
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs11
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs9
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs188
30 files changed, 945 insertions, 55 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index 1f3e96a4c..8f36c9d40 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 d64502c82..29ebe00a1 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Graphics/analog.png b/Software/Graphics/analog.png
new file mode 100644
index 000000000..2651a64b0
--- /dev/null
+++ b/Software/Graphics/analog.png
Binary files differ
diff --git a/Software/Graphics/graph.png b/Software/Graphics/graph.png
new file mode 100644
index 000000000..0aca05e00
--- /dev/null
+++ b/Software/Graphics/graph.png
Binary files differ
diff --git a/Software/Graphics/single-graph.png b/Software/Graphics/single-graph.png
new file mode 100644
index 000000000..f72f56a87
--- /dev/null
+++ b/Software/Graphics/single-graph.png
Binary files differ
diff --git a/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto b/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto
index 340a636df..e45cb3040 100644
--- a/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto
+++ b/Software/PMR/Messages/Diagnostics/PushDiagnosticsResponse.proto
@@ -10,5 +10,17 @@ message PushDiagnosticsResponse
repeated double Dancer1Angle = 1;
repeated double Dancer2Angle = 2;
repeated double Dancer3Angle = 3;
+
+ //Dispensers Motors Frequency Multi
repeated DoubleArray DispensersMotorsFrequency = 4;
+
+ //Dispensers Motors Frequency Singles
+ repeated double Dispenser1MotorFrequency = 5;
+ repeated double Dispenser2MotorFrequency = 6;
+ repeated double Dispenser3MotorFrequency = 7;
+ repeated double Dispenser4MotorFrequency = 8;
+ repeated double Dispenser5MotorFrequency = 9;
+ repeated double Dispenser6MotorFrequency = 10;
+ repeated double Dispenser7MotorFrequency = 11;
+ repeated double Dispenser8MotorFrequency = 12;
} \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/MonitorsToSingleChannleMonitorsConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/MonitorsToSingleChannleMonitorsConverter.cs
new file mode 100644
index 000000000..b5f9cffef
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Converters/MonitorsToSingleChannleMonitorsConverter.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using Tango.Integration.Observables;
+
+namespace Tango.MachineStudio.Technician.Converters
+{
+ public class MonitorsToSingleChannleMonitorsConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ ObservableCollection<TechMonitor> monitors = value as ObservableCollection<TechMonitor>;
+
+ if (monitors != null)
+ {
+ return monitors.Where(x => !x.MultiChannel).ToObservableCollection();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml
index d3ce4fc10..84eae5f75 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml
@@ -33,7 +33,7 @@
<ImageBrush ImageSource="../Images/black-screen.jpg" />
</Border.Background>
- <TextBlock FontFamily="../Fonts/#digital-7" TextAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="90" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Value,FallbackValue='0000'}"></TextBlock>
+ <TextBlock FontFamily="../Fonts/#digital-7" TextAlignment="Center" VerticalAlignment="Center" Foreground="Gainsboro" FontSize="90" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=MonitorItem.Value,FallbackValue='0000'}"></TextBlock>
</Border>
</Grid>
</StackPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml.cs
index f50fc9039..c11ca4417 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MonitorElementEditor.xaml.cs
@@ -17,35 +17,10 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using Tango.Editors;
using Tango.Integration.Observables;
-using Tango.MachineStudio.Technician.Items;
+using Tango.MachineStudio.Technician.TechItems;
namespace Tango.MachineStudio.Technician.Editors
{
- /// <summary>
- /// <para><img class="classImage" src="../Media/MonitorElementEditor.png" /></para>
- /// Represents a <see cref="FrameworkElement"/> editor with position, size and angle control.
- /// </summary>
- /// <example>
- /// <para class="example-title">
- /// <img class="exampleIcon" src="../Icons/CodeExample.png" />
- /// <i>
- /// The following example demonstrates a basic scenario of using <see cref="N:WpfVideoTools.Tiles"/> and <see cref="N:Tango.Editors"/> by creating a simple video projection application with the following features:
- /// </i>
- /// <list type="bullet">
- /// <item>Use the mouse to draw any type of tile of the editor surface.</item>
- /// <item>Apply any input shape on any tile.</item>
- /// <item>Load any video and display it on any of the selected tile.</item>
- /// <item>Built in support for undo, redo, cut, copy and paste, delete and select operations.</item>
- /// <item>Built in support for saving/loading the editor state to memory or file.</item>
- /// <item>Built in support for tile and editor properties adjustment using the <see cref="ParameterizedEditor"/>.</item>
- /// </list>
- /// </para>
- /// <para><markup><video class="exampleVideo" autoplay="autoplay" loop="loop" controls="controls" src="../Media/EditorsExample.mp4"></video></markup></para>
- /// <code lang="XAML" source="../FullAPIExamples/Examples/Editors/EditorsExample.xaml" title="Elements editor example." />
- /// <i>Code-Behind.</i>
- /// <code lang="C#" source="../FullAPIExamples/Examples/Editors/EditorsExample.xaml.cs" title="Elements editor example." />
- /// </example>
- /// <seealso cref="Tango.Editors.ElementEditor" />
[ContentProperty("InnerContent")]
public partial class MonitorElementEditor : ElementEditor
{
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
new file mode 100644
index 000000000..eafc7b5d3
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml
@@ -0,0 +1,79 @@
+<local:ElementEditor x:Class="Tango.MachineStudio.Technician.Editors.SingleGraphElementEditor"
+ 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:controls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
+ xmlns:converters="clr-namespace:Tango.Editors.Converters;assembly=Tango.Editors"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:local="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ mc:Ignorable="d"
+ d:DesignHeight="150" d:DesignWidth="400" Background="Transparent" ClipToBounds="False" BorderThickness="0" MinWidth="1" MinHeight="1" RenderTransformOrigin="0.5,0.5" d:DataContext="{d:DesignInstance Type=items:MonitorItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"></converters:BoolToVisibilityConverter>
+
+ <!--Theme-->
+ <SolidColorBrush x:Key="BorderBrush" Color="Transparent"></SolidColorBrush>
+ <SolidColorBrush x:Key="CornersBrush" Color="Red"></SolidColorBrush>
+ </UserControl.Resources>
+
+ <UserControl.RenderTransform>
+ <RotateTransform Angle="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=Angle}"></RotateTransform>
+ </UserControl.RenderTransform>
+
+ <Grid>
+
+
+ <!--Content-->
+ <Grid>
+ <!--<Viewbox Stretch="Fill">-->
+ <controls:RealTimeGraphControl x:Name="InnerGraph" x:FieldModifier="public" IsHitTestVisible="False" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" SensorUnits="{Binding TechMonitor.Units}" Minimum="{Binding TechMonitor.Min}" Maximum="{Binding TechMonitor.Max}" />
+ <!--</Viewbox>-->
+
+ <Border Margin="0 0 0 -23" VerticalAlignment="Bottom">
+ <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=MonitorItem.TechMonitor.Description}" FontSize="14" Foreground="DimGray" HorizontalAlignment="Center"></TextBlock>
+ </Border>
+ </Grid>
+ <!--Content-->
+
+
+ <Border BorderThickness="1" BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=BorderBrush,TargetNullValue={StaticResource BorderBrush},FallbackValue={StaticResource BorderBrush}}" Visibility="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=(local:ElementsEditor.IsSelected),Converter={StaticResource BoolToVisibilityConverter}}">
+ <Grid>
+ <ContentPresenter Content="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=InnerContent}"></ContentPresenter>
+
+ <Thumb Opacity="0" DragDelta="MoveDrag" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Left" Cursor="SizeWE" Opacity="0" DragDelta="DragLeft" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb HorizontalAlignment="Right" Cursor="SizeWE" Opacity="0" DragDelta="DragRight" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Top" Cursor="SizeNS" Opacity="0" DragDelta="DragTop" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+ <Thumb VerticalAlignment="Bottom" Cursor="SizeNS" Opacity="0" DragDelta="DragBottom" DragStarted="DragStarted" DragCompleted="OnDragEnded"></Thumb>
+
+ <Grid ClipToBounds="False" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0 -20 0 0" Width="10" Height="10">
+ <Ellipse Stroke="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" StrokeThickness="2"></Ellipse>
+ <Rectangle HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0 10 0 -8" StrokeThickness="1" Stroke="Red"></Rectangle>
+ <Thumb Opacity="0" DragDelta="DragAngle" DragStarted="DragStarted" Cursor="Arrow" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-8 -8 0 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 2 0 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopLeft" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 -8 -8 0">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 2 2 0"></Border>
+ <Thumb Opacity="0" DragDelta="DragTopRight" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 -8 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="0 0 2 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomRight" DragStarted="DragStarted" Cursor="SizeNWSE" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+
+ <Grid Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="-8 0 0 -8">
+ <Border BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=local:ElementEditor},Path=CornersBrush,TargetNullValue={StaticResource CornersBrush},FallbackValue={StaticResource CornersBrush}}" BorderThickness="2 0 0 2"></Border>
+ <Thumb Opacity="0" DragDelta="DragBottomLeft" DragStarted="DragStarted" Cursor="SizeNESW" DragCompleted="OnDragEnded"></Thumb>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
+</local:ElementEditor>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml.cs
new file mode 100644
index 000000000..8e8ac556e
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.Editors;
+using Tango.Integration.Observables;
+using Tango.MachineStudio.Technician.TechItems;
+
+namespace Tango.MachineStudio.Technician.Editors
+{
+ [ContentProperty("InnerContent")]
+ public partial class SingleGraphElementEditor : ElementEditor
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GraphElementEditor"/> class.
+ /// </summary>
+ public SingleGraphElementEditor()
+ : base()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GraphElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ public SingleGraphElementEditor(SingleGraphItem graphItem)
+ : this()
+ {
+ GraphItem = graphItem;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GraphElementEditor"/> class.
+ /// </summary>
+ /// <param name="frameworkElement">The framework element.</param>
+ /// <param name="bounds">The bounds.</param>
+ public SingleGraphElementEditor(SingleGraphItem graphItem, Rect bounds)
+ : this(graphItem)
+ {
+ Left = bounds.Left;
+ Top = bounds.Top;
+ Width = bounds.Width;
+ Height = bounds.Height;
+ }
+
+ private SingleGraphItem _monitorItem;
+
+ public SingleGraphItem GraphItem
+ {
+ get { return _monitorItem; }
+ set { _monitorItem = value; RaisePropertyChanged(nameof(GraphItem)); }
+ }
+
+
+ /// <summary>
+ /// Clones this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override IElementEditor Clone()
+ {
+ try
+ {
+ SingleGraphElementEditor cloned = new SingleGraphElementEditor();
+
+ cloned.GraphItem = GraphItem.Clone() as SingleGraphItem;
+ cloned.Top = Top;
+ cloned.Left = Left;
+ cloned.Width = Width;
+ cloned.Height = Height;
+ cloned.Angle = Angle;
+ return cloned;
+ }
+ catch (Exception ex)
+ {
+ throw new InvalidOperationException("Could not clone this editor. You may have to create a custom editor and implement a custom Clone method.", ex);
+ }
+ }
+
+ /// <summary>
+ /// Gets the hosted element.
+ /// </summary>
+ [ParameterIgnore]
+ public override Object HostedElement
+ {
+ get { return GraphItem; }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/analog.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/analog.png
new file mode 100644
index 000000000..2651a64b0
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/analog.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/graph.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/graph.png
new file mode 100644
index 000000000..0aca05e00
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/graph.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/single-graph.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/single-graph.png
new file mode 100644
index 000000000..f72f56a87
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Images/single-graph.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml
new file mode 100644
index 000000000..66e0e5cba
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml
@@ -0,0 +1,22 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.MonitorTemplate"
+ 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:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:MonitorItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <TextBlock FontSize="10">Selected Input</TextBlock>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechMonitors,Converter={StaticResource MonitorsToSingleChannleMonitorsConverter}}" SelectedItem="{Binding TechMonitor,Mode=TwoWay}" DisplayMemberPath="Description" />
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.xaml.cs
new file mode 100644
index 000000000..8b5396ffc
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MonitorTemplate.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.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for MonitorTemplate.xaml
+ /// </summary>
+ public partial class MonitorTemplate : UserControl
+ {
+ public MonitorTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
new file mode 100644
index 000000000..098e7a3dd
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml
@@ -0,0 +1,22 @@
+<UserControl x:Class="Tango.MachineStudio.Technician.PropertiesTemplates.SingleGraphTemplate"
+ 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:converters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="200" d:DataContext="{d:DesignInstance Type=items:SingleGraphItem, IsDesignTimeCreatable=False}">
+
+ <UserControl.Resources>
+ <converters:MonitorsToSingleChannleMonitorsConverter x:Key="MonitorsToSingleChannleMonitorsConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <StackPanel>
+ <TextBlock FontSize="10">Selected Input</TextBlock>
+ <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Adapter.TechMonitors,Converter={StaticResource MonitorsToSingleChannleMonitorsConverter}}" SelectedItem="{Binding TechMonitor,Mode=TwoWay}" DisplayMemberPath="Description" />
+ </StackPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml.cs
new file mode 100644
index 000000000..4ccb703b4
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml.cs
@@ -0,0 +1,29 @@
+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;
+using Tango.MachineStudio.Technician.TechItems;
+
+namespace Tango.MachineStudio.Technician.PropertiesTemplates
+{
+ /// <summary>
+ /// Interaction logic for SingleGraphTemplate.xaml
+ /// </summary>
+ public partial class SingleGraphTemplate : UserControl
+ {
+ public SingleGraphTemplate()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
index 6d3ae9c1a..05ab7cc38 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj
@@ -77,14 +77,25 @@
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="Converters\MonitorsToSingleChannleMonitorsConverter.cs" />
<Compile Include="Converters\SecondsToGraphPointsConverter.cs" />
<Compile Include="Converters\TransitionLinkConverter.cs" />
+ <Compile Include="Editors\SingleGraphElementEditor.xaml.cs">
+ <DependentUpon>SingleGraphElementEditor.xaml</DependentUpon>
+ </Compile>
<Compile Include="Editors\MonitorElementEditor.xaml.cs">
<DependentUpon>MonitorElementEditor.xaml</DependentUpon>
</Compile>
<Compile Include="Helpers\GraphsHelper.cs" />
- <Compile Include="Items\MonitorItem.cs" />
- <Compile Include="Items\TechItem.cs" />
+ <Compile Include="PropertiesTemplates\MonitorTemplate.xaml.cs">
+ <DependentUpon>MonitorTemplate.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="PropertiesTemplates\SingleGraphTemplate.xaml.cs">
+ <DependentUpon>SingleGraphTemplate.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="TechItems\SingleGraphItem.cs" />
+ <Compile Include="TechItems\MonitorItem.cs" />
+ <Compile Include="TechItems\TechItem.cs" />
<Compile Include="Navigation\TechNavigationView.cs" />
<Compile Include="Navigation\TechNavigationManager.cs" />
<Compile Include="TechnicianModule.cs" />
@@ -110,10 +121,22 @@
<Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Page Include="Editors\SingleGraphElementEditor.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Editors\MonitorElementEditor.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="PropertiesTemplates\MonitorTemplate.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="PropertiesTemplates\SingleGraphTemplate.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Resources\GraphEx.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -213,5 +236,14 @@
<ItemGroup>
<Resource Include="Images\black-screen.jpg" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\analog.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\graph.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\single-graph.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Items/MonitorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
index 4150e3784..cc1ca4083 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Items/MonitorItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
@@ -3,29 +3,37 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Xml.Serialization;
using Tango.Integration.Observables;
+using Tango.SharedUI.Helpers;
-namespace Tango.MachineStudio.Technician.Items
+namespace Tango.MachineStudio.Technician.TechItems
{
public class MonitorItem : TechItem
{
private TechMonitor _techMonitor;
+ [XmlIgnore]
public TechMonitor TechMonitor
{
get { return _techMonitor; }
- set { _techMonitor = value; RaisePropertyChangedAuto(); }
+ set { _techMonitor = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(Data)); }
}
private double _value;
+ [XmlIgnore]
public double Value
{
get { return _value; }
set { _value = value; RaisePropertyChanged(nameof(Value)); }
}
+ public override object Data => TechMonitor;
+
public MonitorItem() : base()
{
-
+ Name = "Monitor";
+ Description = "Simple analogue like monitor";
+ Image = ResourceHelper.GetImageFromResources("Images/analog.png");
}
public MonitorItem(TechMonitor techMonitor) : this()
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
new file mode 100644
index 000000000..9ce559047
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
+using Tango.Integration.Observables;
+using Tango.MachineStudio.Technician.Editors;
+using Tango.SharedUI.Helpers;
+
+namespace Tango.MachineStudio.Technician.TechItems
+{
+ public class SingleGraphItem : TechItem
+ {
+ private TechMonitor _techMonitor;
+ [XmlIgnore]
+ public TechMonitor TechMonitor
+ {
+ get { return _techMonitor; }
+ set
+ {
+ TechMonitor old = _techMonitor;
+
+ _techMonitor = value;
+ RaisePropertyChangedAuto();
+ RaisePropertyChanged(nameof(Data));
+
+ if (_techMonitor != old && Editor != null)
+ {
+ Editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(TechMonitor.PointsPerFrame);
+ Editor.InnerGraph.InvalidateGraph();
+ }
+ }
+ }
+
+ [XmlIgnore]
+ public SingleGraphElementEditor Editor { get; set; }
+
+ public override object Data => TechMonitor;
+
+ public SingleGraphItem() : base()
+ {
+ Name = "Single Channel Graph";
+ Description = "Single channel real-time graph";
+ Image = ResourceHelper.GetImageFromResources("Images/single-graph.png");
+ }
+
+ public SingleGraphItem(TechMonitor techMonitor) : this()
+ {
+ TechMonitor = techMonitor;
+ }
+
+ public override TechItem Clone()
+ {
+ MonitorItem cloned = base.Clone() as MonitorItem;
+ cloned.TechMonitor = TechMonitor;
+ return cloned;
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Items/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
index bfeeef011..820c765cc 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Items/TechItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
@@ -3,9 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Media.Imaging;
+using System.Xml.Serialization;
using Tango.Core;
+using Tango.Integration.Observables;
-namespace Tango.MachineStudio.Technician.Items
+namespace Tango.MachineStudio.Technician.TechItems
{
public abstract class TechItem : ExtendedObject
{
@@ -13,8 +16,28 @@ namespace Tango.MachineStudio.Technician.Items
{
ID = Guid.NewGuid().ToString();
Name = "Untitled";
+ Adapter = ObservablesEntitiesAdapter.Instance;
}
+ private String _description;
+ [XmlIgnore]
+ public String Description
+ {
+ get { return _description; }
+ set { _description = value; RaisePropertyChangedAuto(); }
+ }
+
+ private BitmapSource _image;
+ [XmlIgnore]
+ public BitmapSource Image
+ {
+ get { return _image; }
+ set { _image = value; RaisePropertyChangedAuto(); }
+ }
+
+ [XmlIgnore]
+ public ObservablesEntitiesAdapter Adapter { get; set; }
+
private String _id;
/// <summary>
/// Unique Item ID.
@@ -29,6 +52,7 @@ namespace Tango.MachineStudio.Technician.Items
/// <summary>
/// item Name.
/// </summary>
+ [XmlIgnore]
public String Name
{
get { return _name; }
@@ -85,6 +109,9 @@ namespace Tango.MachineStudio.Technician.Items
set { _angle = value; RaisePropertyChanged(nameof(Angle)); }
}
+ [XmlIgnore]
+ public abstract object Data { get; }
+
public virtual TechItem Clone()
{
TechItem cloned = Activator.CreateInstance(this.GetType()) as TechItem;
@@ -95,5 +122,17 @@ namespace Tango.MachineStudio.Technician.Items
cloned.Angle = Angle;
return cloned;
}
+
+ public static List<TechItem> GetAvailableTechItems()
+ {
+ List<TechItem> items = new List<TechItem>();
+
+ foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract))
+ {
+ items.Add(Activator.CreateInstance(type) as TechItem);
+ }
+
+ return items;
+ }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModule.cs
index 6bdc4c7df..c75bcdf29 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModule.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechnicianModule.cs
@@ -43,7 +43,7 @@ namespace Tango.MachineStudio.Technician
/// <summary>
/// Gets the module entry point view.
/// </summary>
- public FrameworkElement MainView => new MainView();
+ public FrameworkElement MainView => new MachineTechView();
/// <summary>
/// Gets the permission required to see and load this module.
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 51c2b840d..4420aa4c9 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
@@ -1,42 +1,179 @@
-using System;
+using Google.Protobuf.Collections;
+using RealTimeGraphEx.Controllers;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Tango.Editors;
using Tango.Integration.Observables;
+using Tango.Integration.Operators;
+using Tango.MachineStudio.Common.StudioApplication;
using Tango.MachineStudio.Technician.Editors;
-using Tango.MachineStudio.Technician.Items;
+using Tango.MachineStudio.Technician.TechItems;
+using Tango.PMR.Diagnostics;
using Tango.SharedUI;
namespace Tango.MachineStudio.Technician.ViewModels
{
public class MachineTechViewVM : ViewModel
{
- private ObservableCollection<IElementEditor> _elements;
+ private List<PropertyInfo> _diagnoticsDataProperties;
+ private Dictionary<SingleGraphItem, GraphController> _singleControllers;
+ private static object _elementsLock = new object();
+ private ObservableCollection<IElementEditor> _elements;
public ObservableCollection<IElementEditor> Elements
{
get { return _elements; }
set { _elements = value; RaisePropertyChangedAuto(); }
}
+ private ObservableCollection<TechItem> _availableTechItems;
+ public ObservableCollection<TechItem> AvailableTechItems
+ {
+ get { return _availableTechItems; }
+ set { _availableTechItems = value; RaisePropertyChangedAuto(); }
+ }
+
+ private TechItem _selectedTechItem;
+
+ public TechItem SelectedTechItem
+ {
+ get { return _selectedTechItem; }
+ set { _selectedTechItem = value; RaisePropertyChangedAuto(); }
+ }
+
public ObservablesEntitiesAdapter Adapter { get; set; }
- public MachineTechViewVM()
+ public IStudioApplicationManager ApplicationManager { get; set; }
+
+ private IMachineOperator _machineOperator;
+
+ public IMachineOperator MachineOperator
{
+ get { return _machineOperator; }
+ set { _machineOperator = value; RaisePropertyChangedAuto(); }
+ }
+
+ public MachineTechViewVM(IStudioApplicationManager applicationManager)
+ {
+ _singleControllers = new Dictionary<SingleGraphItem, GraphController>();
+ AvailableTechItems = TechItem.GetAvailableTechItems().ToObservableCollection();
+ SelectedTechItem = AvailableTechItems.FirstOrDefault();
+ _diagnoticsDataProperties = typeof(PushDiagnosticsResponse).GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList();
+ ApplicationManager = applicationManager;
+ ApplicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged;
+
Adapter = ObservablesEntitiesAdapter.Instance;
- Adapter.Initialize(); //TODO: Remove on Machine Studio.
+ //Adapter.Initialize(); //TODO: Remove on Machine Studio.
Elements = new ObservableCollection<IElementEditor>();
}
+ private void ApplicationManager_ConnectedMachineChanged(object sender, Integration.Services.IExternalBridgeClient machine)
+ {
+ MachineOperator = machine;
+
+ if (MachineOperator != null)
+ {
+ MachineOperator.DiagnosticsDataAvailable -= MachineOperator_DiagnosticsDataAvailable;
+ MachineOperator.DiagnosticsDataAvailable += MachineOperator_DiagnosticsDataAvailable;
+ }
+ }
+
+ private void MachineOperator_DiagnosticsDataAvailable(object sender, PushDiagnosticsResponse response)
+ {
+ PopulateDiagnosticsData(response);
+ }
+
+ private void PopulateDiagnosticsData(PushDiagnosticsResponse data)
+ {
+ lock (_elementsLock)
+ {
+ var elements = Elements.ToList();
+
+ foreach (var item in elements.Select(x => x.HostedElement as TechItem))
+ {
+ if (item.GetType() == typeof(MonitorItem))
+ {
+ MonitorItem monitorItem = item as MonitorItem;
+
+ var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == monitorItem.TechMonitor.Name);
+
+ if (prop != null)
+ {
+ monitorItem.Value = GetLastMonitorValue(monitorItem.TechMonitor, prop.GetValue(data));
+ }
+ }
+ else if (item.GetType() == typeof(SingleGraphItem))
+ {
+ SingleGraphItem graphItem = item as SingleGraphItem;
+
+ var prop = _diagnoticsDataProperties.SingleOrDefault(x => x.Name == graphItem.TechMonitor.Name);
+
+ if (prop != null)
+ {
+ GraphController controller = null;
+
+ if (_singleControllers.TryGetValue(graphItem, out controller))
+ {
+ controller.PushData(GetSingleGraphValues(graphItem.TechMonitor, prop.GetValue(data)));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private double GetLastMonitorValue(TechMonitor monitor, object value)
+ {
+ if (!monitor.MultiChannel)
+ {
+ RepeatedField<double> arr = value as RepeatedField<double>;
+ return arr.LastOrDefault();
+ }
+ else
+ {
+ RepeatedField<DoubleArray> arr = value as RepeatedField<DoubleArray>;
+ return arr.Last().Data.Last();
+ }
+ }
+
+ private List<double> GetSingleGraphValues(TechMonitor monitor, object value)
+ {
+ return (value as RepeatedField<double>).ToList();
+ }
+
public void AddElement(Rect bounds)
{
- MonitorItem item = new MonitorItem(Adapter.TechMonitors.FirstOrDefault());
- MonitorElementEditor editor = new MonitorElementEditor(item, bounds);
- Elements.Add(editor);
+ lock (_elementsLock)
+ {
+ if (SelectedTechItem is MonitorItem)
+ {
+ var monitorItem = new MonitorItem(Adapter.TechMonitors.FirstOrDefault());
+ MonitorElementEditor editor = new MonitorElementEditor(monitorItem, bounds);
+ Elements.Add(editor);
+ }
+ else if (SelectedTechItem is SingleGraphItem)
+ {
+ var graphItem = new SingleGraphItem(Adapter.TechMonitors.FirstOrDefault());
+ SingleGraphElementEditor editor = new SingleGraphElementEditor(graphItem, bounds);
+ editor.InnerGraph.InnerGraph.MaxPoints = Common.Helpers.GraphsHelper.GetMaxPoints(graphItem.TechMonitor.PointsPerFrame);
+ editor.DataContext = graphItem;
+ graphItem.Editor = editor;
+
+
+ GraphController controller = new GraphController();
+ editor.InnerGraph.Controller = controller;
+
+ _singleControllers.Add(graphItem, controller);
+
+ Elements.Add(editor);
+ }
+ }
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 256a4a385..371caf5d7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -5,8 +5,11 @@
xmlns:vm="clr-namespace:Tango.MachineStudio.Technician.ViewModels"
xmlns:global="clr-namespace:Tango.MachineStudio.Technician"
xmlns:editors="clr-namespace:Tango.Editors;assembly=Tango.Editors"
+ xmlns:techItems="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:templates="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates"
+ xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views"
@@ -37,7 +40,34 @@
</Menu>
<Grid Grid.Row="1">
-
+ <StackPanel Orientation="Horizontal" Margin="20 0 0 0">
+ <ListBox ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding AvailableTechItems}" SelectedItem="{Binding SelectedTechItem,Mode=TwoWay}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
+ <ListBox.ItemsPanel>
+ <ItemsPanelTemplate>
+ <StackPanel Orientation="Horizontal"></StackPanel>
+ </ItemsPanelTemplate>
+ </ListBox.ItemsPanel>
+ <ListBox.ItemTemplate>
+ <DataTemplate DataType="{x:Type techItems:TechItem}">
+ <Border Cursor="Hand" ToolTip="{Binding Description}" Width="70" Padding="10" Margin="5" Height="70" BorderThickness="1" CornerRadius="100">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True">
+ <Setter Property="Background" Value="#F9F9F9"></Setter>
+ <Setter Property="BorderBrush" Value="#FF7575"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ <Image Source="{Binding Image}" RenderOptions.BitmapScalingMode="Fant"></Image>
+ </Border>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ </StackPanel>
</Grid>
</Grid>
@@ -49,12 +79,15 @@
<Grid>
<editors:ElementsEditor
+ x:Name="editor"
Elements="{Binding Elements}"
ElementCreation="ElementsEditor_ElementCreation"
Margin="0 0 5 0"
RulerHeight="32"
+ EditorWidth="1920"
+ EditorHeight="1080"
FontSize="10"
- Background="White"
+ Background="#F1F1F1"
EditorBackground="White"
RulerBackground="White"
Foreground="{StaticResource AccentColorBrush}"
@@ -65,9 +98,60 @@
</Grid>
<Grid Grid.Column="1">
- <GroupBox Header="PROPERTIES">
-
- </GroupBox>
+ <StackPanel>
+ <TextBlock Margin="0 -30 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement.Data}" Text="{Binding Description}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock>
+ <GroupBox Header="BOUNDS" Padding="5">
+ <StackPanel>
+ <!--Position-->
+ <UniformGrid Columns="2" Margin="0 5 0 0">
+ <StackPanel Margin="0 0 5 0">
+ <TextBlock>Left</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Left}"></mahapps:NumericUpDown>
+ </StackPanel>
+ <StackPanel Margin="5 0 0 0">
+ <TextBlock>Top</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Top}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </UniformGrid>
+
+ <!--Size-->
+ <UniformGrid Columns="2" Margin="0 20 0 0">
+ <StackPanel Margin="0 0 5 0">
+ <TextBlock>Width</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Width}"></mahapps:NumericUpDown>
+ </StackPanel>
+ <StackPanel Margin="5 0 0 0">
+ <TextBlock>Height</TextBlock>
+ <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Height}"></mahapps:NumericUpDown>
+ </StackPanel>
+ </UniformGrid>
+
+ <!--<Angle-->
+ <Grid Margin="0 20 0 0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="22*"></ColumnDefinition>
+ <ColumnDefinition Width="20*"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+ <TextBlock VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Left">Angle</TextBlock>
+ <mahapps:NumericUpDown Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Maximum="360" Minimum="-360" HasDecimals="False" Margin="0 5 0 0" Value="{Binding ElementName=editor,Path=SelectedElement.Angle}"></mahapps:NumericUpDown>
+ </Grid>
+ </StackPanel>
+ </GroupBox>
+
+
+ <GroupBox Header="PROPERTIES" Margin="0 10 0 0">
+ <ContentControl DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Content="{Binding ElementName=editor,Path=SelectedElement.HostedElement}">
+ <ContentControl.Resources>
+ <DataTemplate DataType="{x:Type items:MonitorItem}">
+ <templates:MonitorTemplate/>
+ </DataTemplate>
+ <DataTemplate DataType="{x:Type items:SingleGraphItem}">
+ <templates:SingleGraphTemplate/>
+ </DataTemplate>
+ </ContentControl.Resources>
+ </ContentControl>
+ </GroupBox>
+ </StackPanel>
</Grid>
</Grid>
</Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
index 449cea493..0f9edee55 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml
@@ -62,12 +62,12 @@
<Border BorderBrush="{StaticResource AccentColorBrush}" BorderThickness="1 1 0 1">
<StackPanel Orientation="Horizontal">
- <components:YAxisScroll Interval="6" Graph="{Binding ElementName=Graph}" Width="35" Foreground="{StaticResource MaterialDesignLightForeground}" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
- <components:YAxisTicks SmallTickTemplate="{StaticResource graphTicksTemplate}" Width="5" SmallTicks="6" Foreground="{StaticResource MaterialDesignLightForeground}" BigTicks="10" Graph="{Binding ElementName=Graph}"></components:YAxisTicks>
+ <components:YAxisScroll x:Name="yAxis" Interval="6" Graph="{Binding ElementName=Graph}" Width="35" Foreground="{StaticResource MaterialDesignLightForeground}" VerticalOffset="-5" FontSize="8" StringFormat="#0.0"></components:YAxisScroll>
+ <components:YAxisTicks x:Name="yAxisTicks" SmallTickTemplate="{StaticResource graphTicksTemplate}" Width="5" SmallTicks="6" Foreground="{StaticResource MaterialDesignLightForeground}" BigTicks="10" Graph="{Binding ElementName=Graph}"></components:YAxisTicks>
</StackPanel>
</Border>
<Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="5 0 0 0">
- <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="DodgerBlue">
+ <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="DodgerBlue" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}">
<graphEx:RealTimeGraphExLineErase.Components>
<components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" />
<components:GridLines Rows="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
index c1728a975..57d5ab88a 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs
@@ -50,6 +50,35 @@ namespace Tango.MachineStudio.Common.Controls
public static readonly DependencyProperty SensorUnitsProperty =
DependencyProperty.Register("SensorUnits", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null));
+
+
+ public double Minimum
+ {
+ get { return (double)GetValue(MinimumProperty); }
+ set { SetValue(MinimumProperty, value); }
+ }
+ public static readonly DependencyProperty MinimumProperty =
+ DependencyProperty.Register("Minimum", typeof(double), typeof(RealTimeGraphControl), new PropertyMetadata(0.0));
+
+
+
+ public double Maximum
+ {
+ get { return (double)GetValue(MaximumProperty); }
+ set { SetValue(MaximumProperty, value); }
+ }
+ public static readonly DependencyProperty MaximumProperty =
+ DependencyProperty.Register("Maximum", typeof(double), typeof(RealTimeGraphControl), new PropertyMetadata(100.0));
+
+
+
+ public void InvalidateGraph()
+ {
+ InnerGraph.Clear();
+ yAxis.Render(InnerGraph);
+ yAxisTicks.Render(InnerGraph);
+ }
+
/// <summary>
/// Gets or sets the inner real-time graph control.
/// </summary>
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
index 16264aa4b..f0c612608 100644
--- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
@@ -901,7 +901,6 @@ namespace RealTimeGraphEx
{
}
-
#endregion
#region Protected Methods
@@ -1051,6 +1050,16 @@ namespace RealTimeGraphEx
return b;
}
+ public void Clear()
+ {
+ ClearGraph();
+ }
+
+ public void RenderComponents()
+ {
+ OnRenderComponents();
+ }
+
#endregion
#region Static Methods
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 197e4f369..87fddc183 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -143,6 +143,15 @@ namespace Tango.Emulations.Emulators
}
res.DispensersMotorsFrequency.AddRange(dispenserFrequencies);
+
+ res.Dispenser1MotorFrequency.AddRange(dispenserFrequencies[0].Data);
+ res.Dispenser2MotorFrequency.AddRange(dispenserFrequencies[1].Data);
+ res.Dispenser3MotorFrequency.AddRange(dispenserFrequencies[2].Data);
+ res.Dispenser4MotorFrequency.AddRange(dispenserFrequencies[3].Data);
+ res.Dispenser5MotorFrequency.AddRange(dispenserFrequencies[4].Data);
+ res.Dispenser6MotorFrequency.AddRange(dispenserFrequencies[5].Data);
+ res.Dispenser7MotorFrequency.AddRange(dispenserFrequencies[6].Data);
+ res.Dispenser8MotorFrequency.AddRange(dispenserFrequencies[7].Data);
}
Transporter.SendResponse<PushDiagnosticsResponse>(res, container.Token);
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs
index 85fba5d22..d654f77a1 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/PushDiagnosticsResponse.cs
@@ -23,16 +23,22 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch1QdXNoRGlhZ25vc3RpY3NSZXNwb25zZS5wcm90bxIVVGFuZ28uUE1SLkRp",
- "YWdub3N0aWNzGhFEb3VibGVBcnJheS5wcm90byKiAQoXUHVzaERpYWdub3N0",
+ "YWdub3N0aWNzGhFEb3VibGVBcnJheS5wcm90byKyAwoXUHVzaERpYWdub3N0",
"aWNzUmVzcG9uc2USFAoMRGFuY2VyMUFuZ2xlGAEgAygBEhQKDERhbmNlcjJB",
"bmdsZRgCIAMoARIUCgxEYW5jZXIzQW5nbGUYAyADKAESRQoZRGlzcGVuc2Vy",
"c01vdG9yc0ZyZXF1ZW5jeRgEIAMoCzIiLlRhbmdvLlBNUi5EaWFnbm9zdGlj",
- "cy5Eb3VibGVBcnJheUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRpYWdub3N0",
- "aWNzYgZwcm90bzM="));
+ "cy5Eb3VibGVBcnJheRIgChhEaXNwZW5zZXIxTW90b3JGcmVxdWVuY3kYBSAD",
+ "KAESIAoYRGlzcGVuc2VyMk1vdG9yRnJlcXVlbmN5GAYgAygBEiAKGERpc3Bl",
+ "bnNlcjNNb3RvckZyZXF1ZW5jeRgHIAMoARIgChhEaXNwZW5zZXI0TW90b3JG",
+ "cmVxdWVuY3kYCCADKAESIAoYRGlzcGVuc2VyNU1vdG9yRnJlcXVlbmN5GAkg",
+ "AygBEiAKGERpc3BlbnNlcjZNb3RvckZyZXF1ZW5jeRgKIAMoARIgChhEaXNw",
+ "ZW5zZXI3TW90b3JGcmVxdWVuY3kYCyADKAESIAoYRGlzcGVuc2VyOE1vdG9y",
+ "RnJlcXVlbmN5GAwgAygBQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlhZ25v",
+ "c3RpY3NiBnByb3RvMw=="));
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.PushDiagnosticsResponse), global::Tango.PMR.Diagnostics.PushDiagnosticsResponse.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle", "DispensersMotorsFrequency" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.PushDiagnosticsResponse), global::Tango.PMR.Diagnostics.PushDiagnosticsResponse.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle", "DispensersMotorsFrequency", "Dispenser1MotorFrequency", "Dispenser2MotorFrequency", "Dispenser3MotorFrequency", "Dispenser4MotorFrequency", "Dispenser5MotorFrequency", "Dispenser6MotorFrequency", "Dispenser7MotorFrequency", "Dispenser8MotorFrequency" }, null, null, null)
}));
}
#endregion
@@ -67,6 +73,14 @@ namespace Tango.PMR.Diagnostics {
dancer2Angle_ = other.dancer2Angle_.Clone();
dancer3Angle_ = other.dancer3Angle_.Clone();
dispensersMotorsFrequency_ = other.dispensersMotorsFrequency_.Clone();
+ dispenser1MotorFrequency_ = other.dispenser1MotorFrequency_.Clone();
+ dispenser2MotorFrequency_ = other.dispenser2MotorFrequency_.Clone();
+ dispenser3MotorFrequency_ = other.dispenser3MotorFrequency_.Clone();
+ dispenser4MotorFrequency_ = other.dispenser4MotorFrequency_.Clone();
+ dispenser5MotorFrequency_ = other.dispenser5MotorFrequency_.Clone();
+ dispenser6MotorFrequency_ = other.dispenser6MotorFrequency_.Clone();
+ dispenser7MotorFrequency_ = other.dispenser7MotorFrequency_.Clone();
+ dispenser8MotorFrequency_ = other.dispenser8MotorFrequency_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -109,11 +123,97 @@ namespace Tango.PMR.Diagnostics {
private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.DoubleArray> _repeated_dispensersMotorsFrequency_codec
= pb::FieldCodec.ForMessage(34, global::Tango.PMR.Diagnostics.DoubleArray.Parser);
private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> dispensersMotorsFrequency_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray>();
+ /// <summary>
+ ///Dispensers Motors Frequency Multi
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Tango.PMR.Diagnostics.DoubleArray> DispensersMotorsFrequency {
get { return dispensersMotorsFrequency_; }
}
+ /// <summary>Field number for the "Dispenser1MotorFrequency" field.</summary>
+ public const int Dispenser1MotorFrequencyFieldNumber = 5;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser1MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(42);
+ private readonly pbc::RepeatedField<double> dispenser1MotorFrequency_ = new pbc::RepeatedField<double>();
+ /// <summary>
+ ///Dispensers Motors Frequency Singles
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser1MotorFrequency {
+ get { return dispenser1MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser2MotorFrequency" field.</summary>
+ public const int Dispenser2MotorFrequencyFieldNumber = 6;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser2MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(50);
+ private readonly pbc::RepeatedField<double> dispenser2MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser2MotorFrequency {
+ get { return dispenser2MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser3MotorFrequency" field.</summary>
+ public const int Dispenser3MotorFrequencyFieldNumber = 7;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser3MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(58);
+ private readonly pbc::RepeatedField<double> dispenser3MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser3MotorFrequency {
+ get { return dispenser3MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser4MotorFrequency" field.</summary>
+ public const int Dispenser4MotorFrequencyFieldNumber = 8;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser4MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(66);
+ private readonly pbc::RepeatedField<double> dispenser4MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser4MotorFrequency {
+ get { return dispenser4MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser5MotorFrequency" field.</summary>
+ public const int Dispenser5MotorFrequencyFieldNumber = 9;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser5MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(74);
+ private readonly pbc::RepeatedField<double> dispenser5MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser5MotorFrequency {
+ get { return dispenser5MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser6MotorFrequency" field.</summary>
+ public const int Dispenser6MotorFrequencyFieldNumber = 10;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser6MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(82);
+ private readonly pbc::RepeatedField<double> dispenser6MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser6MotorFrequency {
+ get { return dispenser6MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser7MotorFrequency" field.</summary>
+ public const int Dispenser7MotorFrequencyFieldNumber = 11;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser7MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(90);
+ private readonly pbc::RepeatedField<double> dispenser7MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser7MotorFrequency {
+ get { return dispenser7MotorFrequency_; }
+ }
+
+ /// <summary>Field number for the "Dispenser8MotorFrequency" field.</summary>
+ public const int Dispenser8MotorFrequencyFieldNumber = 12;
+ private static readonly pb::FieldCodec<double> _repeated_dispenser8MotorFrequency_codec
+ = pb::FieldCodec.ForDouble(98);
+ private readonly pbc::RepeatedField<double> dispenser8MotorFrequency_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dispenser8MotorFrequency {
+ get { return dispenser8MotorFrequency_; }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as PushDiagnosticsResponse);
@@ -131,6 +231,14 @@ namespace Tango.PMR.Diagnostics {
if(!dancer2Angle_.Equals(other.dancer2Angle_)) return false;
if(!dancer3Angle_.Equals(other.dancer3Angle_)) return false;
if(!dispensersMotorsFrequency_.Equals(other.dispensersMotorsFrequency_)) return false;
+ if(!dispenser1MotorFrequency_.Equals(other.dispenser1MotorFrequency_)) return false;
+ if(!dispenser2MotorFrequency_.Equals(other.dispenser2MotorFrequency_)) return false;
+ if(!dispenser3MotorFrequency_.Equals(other.dispenser3MotorFrequency_)) return false;
+ if(!dispenser4MotorFrequency_.Equals(other.dispenser4MotorFrequency_)) return false;
+ if(!dispenser5MotorFrequency_.Equals(other.dispenser5MotorFrequency_)) return false;
+ if(!dispenser6MotorFrequency_.Equals(other.dispenser6MotorFrequency_)) return false;
+ if(!dispenser7MotorFrequency_.Equals(other.dispenser7MotorFrequency_)) return false;
+ if(!dispenser8MotorFrequency_.Equals(other.dispenser8MotorFrequency_)) return false;
return true;
}
@@ -141,6 +249,14 @@ namespace Tango.PMR.Diagnostics {
hash ^= dancer2Angle_.GetHashCode();
hash ^= dancer3Angle_.GetHashCode();
hash ^= dispensersMotorsFrequency_.GetHashCode();
+ hash ^= dispenser1MotorFrequency_.GetHashCode();
+ hash ^= dispenser2MotorFrequency_.GetHashCode();
+ hash ^= dispenser3MotorFrequency_.GetHashCode();
+ hash ^= dispenser4MotorFrequency_.GetHashCode();
+ hash ^= dispenser5MotorFrequency_.GetHashCode();
+ hash ^= dispenser6MotorFrequency_.GetHashCode();
+ hash ^= dispenser7MotorFrequency_.GetHashCode();
+ hash ^= dispenser8MotorFrequency_.GetHashCode();
return hash;
}
@@ -155,6 +271,14 @@ namespace Tango.PMR.Diagnostics {
dancer2Angle_.WriteTo(output, _repeated_dancer2Angle_codec);
dancer3Angle_.WriteTo(output, _repeated_dancer3Angle_codec);
dispensersMotorsFrequency_.WriteTo(output, _repeated_dispensersMotorsFrequency_codec);
+ dispenser1MotorFrequency_.WriteTo(output, _repeated_dispenser1MotorFrequency_codec);
+ dispenser2MotorFrequency_.WriteTo(output, _repeated_dispenser2MotorFrequency_codec);
+ dispenser3MotorFrequency_.WriteTo(output, _repeated_dispenser3MotorFrequency_codec);
+ dispenser4MotorFrequency_.WriteTo(output, _repeated_dispenser4MotorFrequency_codec);
+ dispenser5MotorFrequency_.WriteTo(output, _repeated_dispenser5MotorFrequency_codec);
+ dispenser6MotorFrequency_.WriteTo(output, _repeated_dispenser6MotorFrequency_codec);
+ dispenser7MotorFrequency_.WriteTo(output, _repeated_dispenser7MotorFrequency_codec);
+ dispenser8MotorFrequency_.WriteTo(output, _repeated_dispenser8MotorFrequency_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -164,6 +288,14 @@ namespace Tango.PMR.Diagnostics {
size += dancer2Angle_.CalculateSize(_repeated_dancer2Angle_codec);
size += dancer3Angle_.CalculateSize(_repeated_dancer3Angle_codec);
size += dispensersMotorsFrequency_.CalculateSize(_repeated_dispensersMotorsFrequency_codec);
+ size += dispenser1MotorFrequency_.CalculateSize(_repeated_dispenser1MotorFrequency_codec);
+ size += dispenser2MotorFrequency_.CalculateSize(_repeated_dispenser2MotorFrequency_codec);
+ size += dispenser3MotorFrequency_.CalculateSize(_repeated_dispenser3MotorFrequency_codec);
+ size += dispenser4MotorFrequency_.CalculateSize(_repeated_dispenser4MotorFrequency_codec);
+ size += dispenser5MotorFrequency_.CalculateSize(_repeated_dispenser5MotorFrequency_codec);
+ size += dispenser6MotorFrequency_.CalculateSize(_repeated_dispenser6MotorFrequency_codec);
+ size += dispenser7MotorFrequency_.CalculateSize(_repeated_dispenser7MotorFrequency_codec);
+ size += dispenser8MotorFrequency_.CalculateSize(_repeated_dispenser8MotorFrequency_codec);
return size;
}
@@ -176,6 +308,14 @@ namespace Tango.PMR.Diagnostics {
dancer2Angle_.Add(other.dancer2Angle_);
dancer3Angle_.Add(other.dancer3Angle_);
dispensersMotorsFrequency_.Add(other.dispensersMotorsFrequency_);
+ dispenser1MotorFrequency_.Add(other.dispenser1MotorFrequency_);
+ dispenser2MotorFrequency_.Add(other.dispenser2MotorFrequency_);
+ dispenser3MotorFrequency_.Add(other.dispenser3MotorFrequency_);
+ dispenser4MotorFrequency_.Add(other.dispenser4MotorFrequency_);
+ dispenser5MotorFrequency_.Add(other.dispenser5MotorFrequency_);
+ dispenser6MotorFrequency_.Add(other.dispenser6MotorFrequency_);
+ dispenser7MotorFrequency_.Add(other.dispenser7MotorFrequency_);
+ dispenser8MotorFrequency_.Add(other.dispenser8MotorFrequency_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -205,6 +345,46 @@ namespace Tango.PMR.Diagnostics {
dispensersMotorsFrequency_.AddEntriesFrom(input, _repeated_dispensersMotorsFrequency_codec);
break;
}
+ case 42:
+ case 41: {
+ dispenser1MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser1MotorFrequency_codec);
+ break;
+ }
+ case 50:
+ case 49: {
+ dispenser2MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser2MotorFrequency_codec);
+ break;
+ }
+ case 58:
+ case 57: {
+ dispenser3MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser3MotorFrequency_codec);
+ break;
+ }
+ case 66:
+ case 65: {
+ dispenser4MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser4MotorFrequency_codec);
+ break;
+ }
+ case 74:
+ case 73: {
+ dispenser5MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser5MotorFrequency_codec);
+ break;
+ }
+ case 82:
+ case 81: {
+ dispenser6MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser6MotorFrequency_codec);
+ break;
+ }
+ case 90:
+ case 89: {
+ dispenser7MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser7MotorFrequency_codec);
+ break;
+ }
+ case 98:
+ case 97: {
+ dispenser8MotorFrequency_.AddEntriesFrom(input, _repeated_dispenser8MotorFrequency_codec);
+ break;
+ }
}
}
}