diff options
15 files changed, 528 insertions, 12 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs index 38413b24c..6a1c830b5 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs @@ -928,6 +928,8 @@ namespace Tango.PPC.Jobs.ViewModels rmlGuid = Settings.DefaultRmlGuid; } + var machine = await new MachineBuilder(db).SetFirst().WithConfiguration().BuildAsync(); + Job job = new Job(); job.LastUpdated = DateTime.UtcNow; job.JobSource = JobSource.Local; @@ -954,8 +956,11 @@ namespace Tango.PPC.Jobs.ViewModels IColorConverter converter = new DefaultColorConverter(); + int segmentIndex = 0; + foreach (var stop in segments.SelectMany(x => x.BrushStops).Where(x => x.BrushColorSpace != ColorSpaces.RGB)) { + segmentIndex++; var output = converter.Convert(stop, false); var suggestion = output.CreateSingleSuggestion(); stop.Red = suggestion.Color.R; @@ -964,13 +969,20 @@ namespace Tango.PPC.Jobs.ViewModels stop.BestMatchR = suggestion.Color.R; stop.BestMatchG = suggestion.Color.G; stop.BestMatchB = suggestion.Color.B; + + stop.SetLiquidVolumes(machine.Configuration, job.Rml, job.Rml.GetActiveProcessGroup().ProcessParametersTables[suggestion.ProcessParametersTableIndex]); + + if (stop.IsLiquidVolumesOutOfRange) + { + throw new InvalidOperationException($"Volumes out of range for thread '{job.Rml.FinalName}' at segment {segmentIndex}."); + } } db.Jobs.Add(job); await db.SaveChangesAsync(); } - LoadJobs(() => + LoadJobs(() => { NotificationProvider.PushNotification(new MessageNotificationItem($"Csv job '{e.Name}' received successfully.", "", MessageNotificationItem.MessageNotificationItemTypes.Success, () => { }, NotificationItem.NotificationPriority.Low)); e.Confirm(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementView.xaml new file mode 100644 index 000000000..6279ce81c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementView.xaml @@ -0,0 +1,37 @@ +<UserControl x:Class="Tango.PPC.UI.Dialogs.WasteReplacementView" + 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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:local="clr-namespace:Tango.PPC.UI.Dialogs" + mc:Ignorable="d" + Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="555" d:DesignWidth="560" Width="570" Height="700" d:DataContext="{d:DesignInstance Type=local:WasteReplacementViewVM, IsDesignTimeCreatable=False}"> + <Grid Margin="20"> + <DockPanel> + <Grid DockPanel.Dock="Bottom"> + <touch:TouchButton HorizontalAlignment="Left" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">LATER</touch:TouchButton> + <touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">DONE</touch:TouchButton> + </Grid> + <StackPanel DockPanel.Dock="Top"> + <Image Source="/Images/waste_replace.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" Height="120"></Image> + <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Replace Waste Cartridge</TextBlock> + <TextBlock Margin="20 10" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center"> + <Run>The waste cartridge is close to full and needs to be replaced.</Run> + <LineBreak/> + <Run>Please open the cartridge door, insert two empty cartridges then close the door.</Run> + <LineBreak/> + <LineBreak/> + <Run>When finish press "DONE".</Run> + </TextBlock> + </StackPanel> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="219*"/> + <ColumnDefinition Width="311*"/> + </Grid.ColumnDefinitions> + + </Grid> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementView.xaml.cs new file mode 100644 index 000000000..5bddf160b --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementView.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.PPC.UI.Dialogs +{ + /// <summary> + /// Interaction logic for SpoolReplaceView.xaml + /// </summary> + public partial class WasteReplacementView : UserControl + { + public WasteReplacementView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementViewVM.cs new file mode 100644 index 000000000..0e2f4bb56 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/WasteReplacementViewVM.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Core.DI; +using Tango.PMR.Diagnostics; +using Tango.PPC.Common.Connection; +using Tango.SharedUI; + +namespace Tango.PPC.UI.Dialogs +{ + public class WasteReplacementViewVM : DialogViewVM + { + private bool _doorClosed; + private bool _doorOpened; + + [TangoInject] + private IMachineProvider MachineProvider { get; set; } + + public WasteReplacementViewVM() + { + TangoIOC.Default.Inject(this); + MachineProvider.MachineOperator.EventsNotification += MachineOperator_EventsNotification; + } + + private void MachineOperator_EventsNotification(object sender, StartEventsNotificationResponse e) + { + if (!_doorOpened) + { + if (e.Events.Select(x => x.Type).Contains(PMR.Diagnostics.EventType.CartridgesCoverOpen)) + { + _doorOpened = true; + } + } + else + { + if (!e.Events.Select(x => x.Type).Contains(PMR.Diagnostics.EventType.CartridgesCoverOpen)) + { + _doorClosed = true; + InvalidateRelayCommands(); + } + } + } + + protected override void Accept() + { + DisposeEvents(); + base.Accept(); + } + + protected override void Cancel() + { + DisposeEvents(); + base.Cancel(); + } + + protected override bool CanOK() + { + return base.CanOK() && _doorClosed && _doorOpened; + } + + private void DisposeEvents() + { + MachineProvider.MachineOperator.EventsNotification -= MachineOperator_EventsNotification; + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/waste_replace.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/waste_replace.png Binary files differnew file mode 100644 index 000000000..f39a6f94d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/waste_replace.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs index 83f4d4f29..d920b32a4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs @@ -340,7 +340,7 @@ namespace Tango.PPC.UI.Printing } if (job.Segments.SelectMany(x => x.BrushStops).Any(x => x.IsLiquidVolumesOutOfRange)) { - throw new InvalidOperationException("Error starting job. Total ink volume is out of range."); + throw new InvalidOperationException($"The specified ink volumes at segment {job.Segments.SelectMany(x => x.BrushStops).First(x => x.IsLiquidVolumesOutOfRange).Segment.SegmentIndex} exceeds the maximum allowed total volume for the current thread."); } if (job.Segments.SelectMany(x => x.BrushStops).Any(x => x.BrushColorSpace == ColorSpaces.Catalog && x.ColorCatalogsItem == null && !x.IsTransparent && !x.IsWhite)) { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 26ab3293a..464de7da9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -152,6 +152,10 @@ <DependentUpon>SafetyLevelOperationsConfirmationView.xaml</DependentUpon> </Compile> <Compile Include="Dialogs\SafetyLevelOperationsConfirmationViewVM.cs" /> + <Compile Include="Dialogs\WasteReplacementViewVM.cs" /> + <Compile Include="Dialogs\WasteReplacementView.xaml.cs"> + <DependentUpon>WasteReplacementView.xaml</DependentUpon> + </Compile> <Compile Include="Dialogs\SpoolReplaceView.xaml.cs"> <DependentUpon>SpoolReplaceView.xaml</DependentUpon> </Compile> @@ -292,6 +296,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Dialogs\WasteReplacementView.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Dialogs\SpoolReplaceView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -499,6 +507,7 @@ <Link>rc.exe</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <Resource Include="Images\waste_replace.png" /> <Content Include="Manifests\release.xml" /> <Content Include="Manifests\debug.xml" /> <None Include="firmware_package.tfp"> @@ -827,7 +836,7 @@ if $(ConfigurationName) == Debug "rc.exe" "$(TargetPath)" --set-version-string " </PropertyGroup> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs index e35ed3591..50f4ed054 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs @@ -100,10 +100,29 @@ namespace Tango.PPC.UI.ViewModels MachineProvider.MachineConnected += MachineProvider_MachineConnected; + MachineProvider.MachineOperator.WasteReplacementRequired += MachineOperator_WasteReplacementRequired; + _screenSaverTimer.Elapsed += _screenSaverTimer_Elapsed; _screenSaverTimer.Start(); } + #region Waste Replacement + + private void MachineOperator_WasteReplacementRequired(object sender, EventArgs e) + { + InvokeUI(async () => + { + var vm = await NotificationProvider.ShowDialog<WasteReplacementViewVM>(); + + if (MachineProvider.IsConnected) + { + await MachineProvider.MachineOperator.CompleteWasteReplacement(vm.DialogResult); + } + }); + } + + #endregion + #region Power Up private void MachineOperator_PowerUpEnded(object sender, EventArgs e) diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index 873e024fd..ca00f2891 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -262,6 +262,11 @@ namespace Tango.Integration.Operation event EventHandler<InkFillingStatusChangedEventArgs> InkFillingStatusChanged; /// <summary> + /// Occurs when waste replacement is required. + /// </summary> + event EventHandler WasteReplacementRequired; + + /// <summary> /// Gets or sets a value indicating whether direct the embedded device to send diagnostics messages. /// </summary> bool EnableDiagnostics { get; set; } @@ -576,5 +581,11 @@ namespace Tango.Integration.Operation /// </summary> /// <param name="spoolType">Type of the spool.</param> Task SetSpoolType(JobSpoolType spoolType); + + /// <summary> + /// Completes the waste replacement sequence. + /// </summary> + /// <param name="approved">Approve or decline the sequence.</param> + Task CompleteWasteReplacement(bool approved); } } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 6b79fa5bc..005121b88 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -89,6 +89,7 @@ namespace Tango.Integration.Operation private List<Event> _emulatedEvents; private List<BitResultComposition> _bitResults; private JobSpoolType _currentSpoolType; + private String _lastWasteReplaceRequestToken; public static String EmbeddedLogsFolder { get; private set; } public static String EmbeddedLogsTag { get; private set; } @@ -303,6 +304,11 @@ namespace Tango.Integration.Operation /// </summary> public event EventHandler<InkFillingStatusChangedEventArgs> InkFillingStatusChanged; + /// <summary> + /// Occurs when waste replacement is required. + /// </summary> + public event EventHandler WasteReplacementRequired; + #endregion #region Properties @@ -1207,6 +1213,11 @@ namespace Tango.Integration.Operation e.Handled = true; OnUpdateStatusRequestReceived(container.Token, MessageFactory.ExtractMessageFromContainer<UpdateStatusRequest>(container)); } + else if (container.Type == MessageType.WasteReplaceRequest) + { + e.Handled = true; + OnWasteReplacementRequired(container.Token, MessageFactory.ExtractMessageFromContainer<WasteReplaceRequest>(container)); + } } /// <summary> @@ -1388,6 +1399,12 @@ namespace Tango.Integration.Operation }); } + protected virtual void OnWasteReplacementRequired(string token, WasteReplaceRequest wasteReplaceRequest) + { + _lastWasteReplaceRequestToken = token; + WasteReplacementRequired?.Invoke(this, new EventArgs()); + } + #endregion #region Override Methods @@ -2638,6 +2655,11 @@ namespace Tango.Integration.Operation { throw new InvalidOperationException($"Error processing the coordinates of stop '{stop.StopIndex}' of segment '{stop.Segment.SegmentIndex}'.", ex); } + + if (stop.IsLiquidVolumesOutOfRange) + { + throw new InvalidOperationException($"The specified ink volumes at segment {segment.SegmentIndex} exceeds the maximum allowed total volume for the current thread."); + } } } } @@ -4473,6 +4495,18 @@ namespace Tango.Integration.Operation } } + /// <summary> + /// Completes the waste replacement sequence. + /// </summary> + /// <param name="approved">Approve or decline the sequence.</param> + public async Task CompleteWasteReplacement(bool approved) + { + if (_lastWasteReplaceRequestToken != null) + { + await SendResponse<WasteReplaceResponse>(new WasteReplaceResponse() { Approved = approved }, _lastWasteReplaceRequestToken); + } + } + #endregion } } diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index ca81b2050..8dba8cee4 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Common { static MessageTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiq8QQoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirxQQoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj", "dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n", "cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh", @@ -204,12 +204,14 @@ namespace Tango.PMR.Common { "VhIhChxBdHRlbXB0VGhyZWFkSm9nZ2luZ1Jlc3BvbnNlEIFWEiEKHFN0YXJ0", "SW5rRmlsbGluZ1N0YXR1c1JlcXVlc3QQ4F0SIgodU3RhcnRJbmtGaWxsaW5n", "U3RhdHVzUmVzcG9uc2UQ4V0SHgoZSW5pdGlhdGVJbmtGaWxsaW5nUmVxdWVz", - "dBDiXRIfChpJbml0aWF0ZUlua0ZpbGxpbmdSZXNwb25zZRDjXRIcChdQdXRE", - "YXRhU3RvcmVJdGVtUmVxdWVzdBDIZRIdChhQdXREYXRhU3RvcmVJdGVtUmVz", - "cG9uc2UQyWUSHAoXR2V0RGF0YVN0b3JlSXRlbVJlcXVlc3QQymUSHQoYR2V0", - "RGF0YVN0b3JlSXRlbVJlc3BvbnNlEMtlEiEKHERhdGFTdG9yZUl0ZW1Nb2Rp", - "ZmllZFJlcXVlc3QQzGUSIgodRGF0YVN0b3JlSXRlbU1vZGlmaWVkUmVzcG9u", - "c2UQzWVCHAoaY29tLnR3aW5lLnRhbmdvLnBtci5jb21tb25iBnByb3RvMw==")); + "dBDiXRIfChpJbml0aWF0ZUlua0ZpbGxpbmdSZXNwb25zZRDjXRIYChNXYXN0", + "ZVJlcGxhY2VSZXF1ZXN0EORdEhkKFFdhc3RlUmVwbGFjZVJlc3BvbnNlEOVd", + "EhwKF1B1dERhdGFTdG9yZUl0ZW1SZXF1ZXN0EMhlEh0KGFB1dERhdGFTdG9y", + "ZUl0ZW1SZXNwb25zZRDJZRIcChdHZXREYXRhU3RvcmVJdGVtUmVxdWVzdBDK", + "ZRIdChhHZXREYXRhU3RvcmVJdGVtUmVzcG9uc2UQy2USIQocRGF0YVN0b3Jl", + "SXRlbU1vZGlmaWVkUmVxdWVzdBDMZRIiCh1EYXRhU3RvcmVJdGVtTW9kaWZp", + "ZWRSZXNwb25zZRDNZUIcChpjb20udHdpbmUudGFuZ28ucG1yLmNvbW1vbmIG", + "cHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -546,6 +548,8 @@ namespace Tango.PMR.Common { [pbr::OriginalName("StartInkFillingStatusResponse")] StartInkFillingStatusResponse = 12001, [pbr::OriginalName("InitiateInkFillingRequest")] InitiateInkFillingRequest = 12002, [pbr::OriginalName("InitiateInkFillingResponse")] InitiateInkFillingResponse = 12003, + [pbr::OriginalName("WasteReplaceRequest")] WasteReplaceRequest = 12004, + [pbr::OriginalName("WasteReplaceResponse")] WasteReplaceResponse = 12005, /// <summary> ///DataStore /// </summary> diff --git a/Software/Visual_Studio/Tango.PMR/IFS/WasteReplaceRequest.cs b/Software/Visual_Studio/Tango.PMR/IFS/WasteReplaceRequest.cs new file mode 100644 index 000000000..f35898579 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IFS/WasteReplaceRequest.cs @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WasteReplaceRequest.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.MachineStatus { + + /// <summary>Holder for reflection information generated from WasteReplaceRequest.proto</summary> + public static partial class WasteReplaceRequestReflection { + + #region Descriptor + /// <summary>File descriptor for WasteReplaceRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static WasteReplaceRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChlXYXN0ZVJlcGxhY2VSZXF1ZXN0LnByb3RvEhdUYW5nby5QTVIuTWFjaGlu", + "ZVN0YXR1cyIVChNXYXN0ZVJlcGxhY2VSZXF1ZXN0QiMKIWNvbS50d2luZS50", + "YW5nby5wbXIubWFjaGluZXN0YXR1c2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.WasteReplaceRequest), global::Tango.PMR.MachineStatus.WasteReplaceRequest.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class WasteReplaceRequest : pb::IMessage<WasteReplaceRequest> { + private static readonly pb::MessageParser<WasteReplaceRequest> _parser = new pb::MessageParser<WasteReplaceRequest>(() => new WasteReplaceRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<WasteReplaceRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.WasteReplaceRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WasteReplaceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WasteReplaceRequest(WasteReplaceRequest other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WasteReplaceRequest Clone() { + return new WasteReplaceRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WasteReplaceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WasteReplaceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WasteReplaceRequest other) { + if (other == null) { + return; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IFS/WasteReplaceResponse.cs b/Software/Visual_Studio/Tango.PMR/IFS/WasteReplaceResponse.cs new file mode 100644 index 000000000..92b2af8ec --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IFS/WasteReplaceResponse.cs @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WasteReplaceResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.MachineStatus { + + /// <summary>Holder for reflection information generated from WasteReplaceResponse.proto</summary> + public static partial class WasteReplaceResponseReflection { + + #region Descriptor + /// <summary>File descriptor for WasteReplaceResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static WasteReplaceResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChpXYXN0ZVJlcGxhY2VSZXNwb25zZS5wcm90bxIXVGFuZ28uUE1SLk1hY2hp", + "bmVTdGF0dXMiKAoUV2FzdGVSZXBsYWNlUmVzcG9uc2USEAoIQXBwcm92ZWQY", + "ASABKAhCIwohY29tLnR3aW5lLnRhbmdvLnBtci5tYWNoaW5lc3RhdHVzYgZw", + "cm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.WasteReplaceResponse), global::Tango.PMR.MachineStatus.WasteReplaceResponse.Parser, new[]{ "Approved" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class WasteReplaceResponse : pb::IMessage<WasteReplaceResponse> { + private static readonly pb::MessageParser<WasteReplaceResponse> _parser = new pb::MessageParser<WasteReplaceResponse>(() => new WasteReplaceResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<WasteReplaceResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.WasteReplaceResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WasteReplaceResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WasteReplaceResponse(WasteReplaceResponse other) : this() { + approved_ = other.approved_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WasteReplaceResponse Clone() { + return new WasteReplaceResponse(this); + } + + /// <summary>Field number for the "Approved" field.</summary> + public const int ApprovedFieldNumber = 1; + private bool approved_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Approved { + get { return approved_; } + set { + approved_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WasteReplaceResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WasteReplaceResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Approved != other.Approved) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Approved != false) hash ^= Approved.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Approved != false) { + output.WriteRawTag(8); + output.WriteBool(Approved); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Approved != false) { + size += 1 + 1; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WasteReplaceResponse other) { + if (other == null) { + return; + } + if (other.Approved != false) { + Approved = other.Approved; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + Approved = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index a1f1db7a5..50c0966c3 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -244,6 +244,8 @@ <Compile Include="IFS\InkFillingStatus.cs" /> <Compile Include="IFS\StartInkFillingStatusRequest.cs" /> <Compile Include="IFS\StartInkFillingStatusResponse.cs" /> + <Compile Include="IFS\WasteReplaceRequest.cs" /> + <Compile Include="IFS\WasteReplaceResponse.cs" /> <Compile Include="Insights\InsightsMonitors.cs" /> <Compile Include="Integration\ApplicationInformation.cs" /> <Compile Include="Integration\ColorProfileRequest.cs" /> @@ -514,7 +516,7 @@ </PropertyGroup> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file |
