diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-05-21 20:31:36 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2024-05-21 20:31:36 +0300 |
| commit | 4c3be889e920102408b0927c5f595ada5a6a544f (patch) | |
| tree | 71213b906a9762faff2ff49029c5ecdda9d7dc94 /Software | |
| parent | c33507b4aa109a1f2f2d7bd3483c468cc50b19b6 (diff) | |
| download | Tango-4c3be889e920102408b0927c5f595ada5a6a544f.tar.gz Tango-4c3be889e920102408b0927c5f595ada5a6a544f.zip | |
Fixed spool count on job from CSV.
Added auto power off selection settings.
Fixed issue with power off on firmware reset.
Diffstat (limited to 'Software')
16 files changed, 488 insertions, 36 deletions
diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index 0c70eca00..6140e7506 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -295,6 +295,8 @@ enum MessageType SetInkAutoFillingModeResponse = 9005; SpoolTypeChangedRequest = 9006; SpoolTypeChangedResponse = 9007; + SetPowerDownTimeRequest = 9008; + SetPowerDownTimeResponse = 9009; //Power StartPowerDownRequest = 10000; diff --git a/Software/PMR/Messages/MachineStatus/SetPowerDownTimeRequest.proto b/Software/PMR/Messages/MachineStatus/SetPowerDownTimeRequest.proto new file mode 100644 index 000000000..e5c683999 --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/SetPowerDownTimeRequest.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message SetPowerDownTimeRequest +{ + int32 TimeoutMinutes = 1; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/MachineStatus/SetPowerDownTimeResponse.proto b/Software/PMR/Messages/MachineStatus/SetPowerDownTimeResponse.proto new file mode 100644 index 000000000..42d0c74b2 --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/SetPowerDownTimeResponse.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message SetPowerDownTimeResponse +{ + +}
\ No newline at end of file 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 c3d6136af..8f886e073 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 @@ -1049,6 +1049,15 @@ namespace Tango.PPC.Jobs.ViewModels job.WindingMethodGuid = Adapter.WindingMethods.FirstOrDefault().Guid; job.SpoolTypeGuid = Settings.SpoolTypeGuid != null ? Settings.SpoolTypeGuid : Adapter.SpoolTypes.FirstOrDefault().Guid; + if (BuildProvider.IsEureka) + { + job.EnableInterSegment = false; + job.InterSegmentLength = 0; + job.NumberOfSpools = 4; + job.NumberOfUnits = 1; + } + + foreach (var segment in segments) { segment.Job = job; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj index 30e2bf8c2..d6bacb50c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Tango.PPC.MachineSettings.csproj @@ -170,7 +170,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <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/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs index 6787136be..594d3f5c9 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs @@ -44,6 +44,16 @@ namespace Tango.PPC.MachineSettings.ViewModels #region Classes + public class PowerDownTime + { + public PowerDownMinutes Minutes { get; set; } + + public String Name + { + get { return Minutes.ToDescription(); } + } + } + public class RmlLubricationLevelSettings : RmlLubricationLevel { public String Name { get; set; } @@ -282,6 +292,15 @@ namespace Tango.PPC.MachineSettings.ViewModels set { _manualFineTuningLength = value; RaisePropertyChangedAuto(); } } + public List<PowerDownTime> PowerDownTimes { get; set; } + + private PowerDownTime _selectedPowerDownTime; + public PowerDownTime SelectedPowerDownTime + { + get { return _selectedPowerDownTime; } + set { _selectedPowerDownTime = value; RaisePropertyChangedAuto(); } + } + #endregion @@ -310,6 +329,14 @@ namespace Tango.PPC.MachineSettings.ViewModels SaveCommand = new RelayCommand(Save); DiscardCommand = new RelayCommand(Discard); SynchronizeCommand = new RelayCommand(Synchronize, () => !MachineDataSynchronizer.IsSynchronizing && IsFree); + + PowerDownTimes = new List<PowerDownTime>() + { + new PowerDownTime() { Minutes = PowerDownMinutes.Minimum }, + new PowerDownTime() { Minutes = PowerDownMinutes.Default }, + new PowerDownTime() { Minutes = PowerDownMinutes.Maximum }, + new PowerDownTime() { Minutes = PowerDownMinutes.Never }, + }; } private void Discard() @@ -342,6 +369,7 @@ namespace Tango.PPC.MachineSettings.ViewModels Settings.LubricationLevels = LubricationLevels.Where(x => x.LubricationLevel != LubricationLevel.Standard).Select(x => x.ToRmlLubricationLevel()).ToList(); Settings.DefaultTabColorSpace = DefaultTabColorSpace; Settings.FineTuningTrialLengthMeters = FineTuningLength; + Settings.PowerSavingMode = SelectedPowerDownTime.Minutes; MachineDataSynchronizer.IsEnabled = SynchronizeJobs || SynchronizeDiagnostics; @@ -359,6 +387,15 @@ namespace Tango.PPC.MachineSettings.ViewModels await MachineProvider.MachineOperator.SetSpoolType((PMR.Printing.JobSpoolType)SelectedSpoolType.Code); } + if (MachineProvider.IsConnected) + { + try + { + await MachineProvider.MachineOperator.SetPowerDownTime((int)Settings.PowerSavingMode); + } + catch { } + } + if (_previousTimeZone.ToStringSafe() != SelectedTimeZone.ToStringSafe()) { if (await NotificationProvider.ShowQuestion("Changing the time zone requires the application to restart. Do you wish to restart the application?")) @@ -524,6 +561,8 @@ namespace Tango.PPC.MachineSettings.ViewModels ExternalBridgePassword = Settings.ExternalBridgePassword; + SelectedPowerDownTime = PowerDownTimes.FirstOrDefault(x => x.Minutes == Settings.PowerSavingMode); + _enableRemoteAssistance = RemoteAssistanceProvider.IsEnabled; RaisePropertyChanged(nameof(EnableRemoteAssistance)); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index 7de2818f8..a1414f60c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -14,6 +14,7 @@ xmlns:global="clr-namespace:Tango.PPC.MachineSettings" xmlns:integrationPMR="clr-namespace:Tango.PMR.Integration;assembly=Tango.PMR" xmlns:lubrication="clr-namespace:Tango.PPC.Common.Lubrication;assembly=Tango.PPC.Common" + xmlns:common="clr-namespace:Tango.PPC.Common;assembly=Tango.PPC.Common" xmlns:local="clr-namespace:Tango.PPC.MachineSettings.Views" mc:Ignorable="d" d:DesignHeight="4500" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> @@ -25,6 +26,13 @@ <x:Type TypeName="lubrication:LubricationLevel"/> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> + + <ObjectDataProvider x:Key="PowerDownTimes" MethodName="GetValues" + ObjectType="{x:Type sys:Enum}"> + <ObjectDataProvider.MethodParameters> + <x:Type TypeName="common:PowerDownMinutes"/> + </ObjectDataProvider.MethodParameters> + </ObjectDataProvider> </UserControl.Resources> @@ -355,6 +363,31 @@ </StackPanel> </touch:TouchExpander> + <!--POWER SAVER--> + <touch:TouchExpander Margin="0 20 0 0" Header="Power Saving" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}" Visibility="{Binding BuildProvider.IsEureka,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel> + <controls:TableGrid Margin="10" RowHeight="60" MakeFirstColumnVerticalAlignmentBottom="False" TextElement.FontSize="{StaticResource TangoDefaultFontSize}"> + <TextBlock VerticalAlignment="Center"> + <Run> + Automatically turn off the machine on idle time after + </Run> + </TextBlock> + + <touch:TouchComboBox VerticalAlignment="Top" HorizontalAlignment="Right" Width="250" ItemsSource="{Binding PowerDownTimes}" SelectedItem="{Binding SelectedPowerDownTime}" ValuePath="Minutes" DisplayMemberPath="Name"> + + </touch:TouchComboBox> + + </controls:TableGrid> + + <!--<DockPanel Margin="10 -50 0 0"> + <touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}"> + You can activate the screen anytime by pressing + </TextBlock> + </DockPanel>--> + </StackPanel> + </touch:TouchExpander> + <!--TECHNICIAN--> <touch:TouchExpander Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 20 0 0" Header="Advanced" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 7f67a4444..7a5a14ede 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -442,10 +442,18 @@ namespace Tango.PPC.Common.Connection /// <summary> /// Called when the machine has connected. /// </summary> - protected virtual void OnMachineConnected() + protected async virtual void OnMachineConnected() { IsConnected = true; + MachineConnected?.Invoke(this, new EventArgs()); + + try + { + var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + await MachineOperator.SetPowerDownTime((int)settings.PowerSavingMode); + } + catch { } } /// <summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs index 03215553b..711443da5 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.ServiceModel; using System.Text; @@ -22,6 +23,18 @@ namespace Tango.PPC.Common ExternalTCP, } + public enum PowerDownMinutes + { + [Description("30 Minutes")] + Minimum = 30, + [Description("1 Hour")] + Default = 60, + [Description("2 Hours")] + Maximum = 240, + [Description("Never")] + Never = 0, + } + /// <summary> /// Represents the main PPC settings. /// </summary> @@ -385,10 +398,16 @@ namespace Tango.PPC.Common } /// <summary> + /// Gets or sets the device power saving mode. + /// </summary> + public PowerDownMinutes PowerSavingMode { get; set; } + + /// <summary> /// Initializes a new instance of the <see cref="PPCSettings"/> class. /// </summary> public PPCSettings() { + PowerSavingMode = PowerDownMinutes.Default; EmulatorMode = EmulatorMode.InMemory; LubricationLevels = new List<RmlLubricationLevel>(); JobUploadStrategy = JobUploadStrategy.JobDescriptionFile; 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 7951bc584..0e2a0e40c 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -612,5 +612,12 @@ namespace Tango.Integration.Operation /// <param name="cardID">The card identifier.</param> /// <returns></returns> Task ResetCard(int cardID); + + /// <summary> + /// Sets the firmware device time to auto power down. + /// </summary> + /// <param name="minutes">Timeout Minutes.</param> + /// <returns></returns> + Task SetPowerDownTime(int minutes); } } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 93cb7bbb8..527c063fb 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -1441,6 +1441,8 @@ namespace Tango.Integration.Operation _eventsSent = false; _machineStatusSent = false; + MachineStatus = null; + if (Status != MachineStatuses.Disconnected) { UpdateStatus(MachineStatuses.Disconnected); @@ -3287,16 +3289,16 @@ namespace Tango.Integration.Operation if (response.Message.Status.Progress > 0) if (oldKeepAlive != UseKeepAlive) - { { - UseKeepAlive = oldKeepAlive; - } + { + UseKeepAlive = oldKeepAlive; + } - if (_jobActualStartDate == null) - { - _jobActualStartDate = DateTime.UtcNow; + if (_jobActualStartDate == null) + { + _jobActualStartDate = DateTime.UtcNow; + } } - } if (!responseLogged) { @@ -4700,6 +4702,25 @@ namespace Tango.Integration.Operation return SendRequest<ResetCardRequest, ResetCardResponse>(new ResetCardRequest() { CardID = cardID }, new TransportRequestConfig() { Timeout = TimeSpan.FromSeconds(3) }); } + /// <summary> + /// Sets the firmware device time to auto power down. + /// </summary> + /// <param name="minutes">Timeout Minutes.</param> + /// <returns></returns> + public async Task SetPowerDownTime(int minutes) + { + try + { + LogManager.Log($"Settings machine auto power down time to {minutes} minutes..."); + var r = await SendRequest<SetPowerDownTimeRequest, SetPowerDownTimeResponse>(new SetPowerDownTimeRequest() { TimeoutMinutes = minutes }); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error setting down power down time to {minutes} minutes."); + throw ex; + } + } + #endregion } } diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index a75ed1705..d289ba7f0 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( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiqoQwoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirlQwoLTWVz", "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410SGAoTV2FzdGVSZXBsYWNlUmVxdWVzdBDkXRIZChRXYXN0", + "ZVJlcGxhY2VSZXNwb25zZRDlXRIcChdQdXREYXRhU3RvcmVJdGVtUmVxdWVz", + "dBDIZRIdChhQdXREYXRhU3RvcmVJdGVtUmVzcG9uc2UQyWUSHAoXR2V0RGF0", + "YVN0b3JlSXRlbVJlcXVlc3QQymUSHQoYR2V0RGF0YVN0b3JlSXRlbVJlc3Bv", + "bnNlEMtlEiEKHERhdGFTdG9yZUl0ZW1Nb2RpZmllZFJlcXVlc3QQzGUSIgod", + "RGF0YVN0b3JlSXRlbU1vZGlmaWVkUmVzcG9uc2UQzWVCHAoaY29tLnR3aW5l", + "LnRhbmdvLnBtci5jb21tb25iBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -523,6 +524,8 @@ namespace Tango.PMR.Common { [pbr::OriginalName("SetInkAutoFillingModeResponse")] SetInkAutoFillingModeResponse = 9005, [pbr::OriginalName("SpoolTypeChangedRequest")] SpoolTypeChangedRequest = 9006, [pbr::OriginalName("SpoolTypeChangedResponse")] SpoolTypeChangedResponse = 9007, + [pbr::OriginalName("SetPowerDownTimeRequest")] SetPowerDownTimeRequest = 9008, + [pbr::OriginalName("SetPowerDownTimeResponse")] SetPowerDownTimeResponse = 9009, /// <summary> ///Power /// </summary> diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/SetPowerDownTimeRequest.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/SetPowerDownTimeRequest.cs new file mode 100644 index 000000000..6f645401f --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/SetPowerDownTimeRequest.cs @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SetPowerDownTimeRequest.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 SetPowerDownTimeRequest.proto</summary> + public static partial class SetPowerDownTimeRequestReflection { + + #region Descriptor + /// <summary>File descriptor for SetPowerDownTimeRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SetPowerDownTimeRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch1TZXRQb3dlckRvd25UaW1lUmVxdWVzdC5wcm90bxIXVGFuZ28uUE1SLk1h", + "Y2hpbmVTdGF0dXMiMQoXU2V0UG93ZXJEb3duVGltZVJlcXVlc3QSFgoOVGlt", + "ZW91dE1pbnV0ZXMYASABKAVCIwohY29tLnR3aW5lLnRhbmdvLnBtci5tYWNo", + "aW5lc3RhdHVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.SetPowerDownTimeRequest), global::Tango.PMR.MachineStatus.SetPowerDownTimeRequest.Parser, new[]{ "TimeoutMinutes" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class SetPowerDownTimeRequest : pb::IMessage<SetPowerDownTimeRequest> { + private static readonly pb::MessageParser<SetPowerDownTimeRequest> _parser = new pb::MessageParser<SetPowerDownTimeRequest>(() => new SetPowerDownTimeRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<SetPowerDownTimeRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.SetPowerDownTimeRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetPowerDownTimeRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetPowerDownTimeRequest(SetPowerDownTimeRequest other) : this() { + timeoutMinutes_ = other.timeoutMinutes_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetPowerDownTimeRequest Clone() { + return new SetPowerDownTimeRequest(this); + } + + /// <summary>Field number for the "TimeoutMinutes" field.</summary> + public const int TimeoutMinutesFieldNumber = 1; + private int timeoutMinutes_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int TimeoutMinutes { + get { return timeoutMinutes_; } + set { + timeoutMinutes_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SetPowerDownTimeRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SetPowerDownTimeRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TimeoutMinutes != other.TimeoutMinutes) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (TimeoutMinutes != 0) hash ^= TimeoutMinutes.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 (TimeoutMinutes != 0) { + output.WriteRawTag(8); + output.WriteInt32(TimeoutMinutes); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (TimeoutMinutes != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TimeoutMinutes); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SetPowerDownTimeRequest other) { + if (other == null) { + return; + } + if (other.TimeoutMinutes != 0) { + TimeoutMinutes = other.TimeoutMinutes; + } + } + + [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: { + TimeoutMinutes = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/SetPowerDownTimeResponse.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/SetPowerDownTimeResponse.cs new file mode 100644 index 000000000..051179bd1 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/SetPowerDownTimeResponse.cs @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SetPowerDownTimeResponse.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 SetPowerDownTimeResponse.proto</summary> + public static partial class SetPowerDownTimeResponseReflection { + + #region Descriptor + /// <summary>File descriptor for SetPowerDownTimeResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SetPowerDownTimeResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch5TZXRQb3dlckRvd25UaW1lUmVzcG9uc2UucHJvdG8SF1RhbmdvLlBNUi5N", + "YWNoaW5lU3RhdHVzIhoKGFNldFBvd2VyRG93blRpbWVSZXNwb25zZUIjCiFj", + "b20udHdpbmUudGFuZ28ucG1yLm1hY2hpbmVzdGF0dXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.SetPowerDownTimeResponse), global::Tango.PMR.MachineStatus.SetPowerDownTimeResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class SetPowerDownTimeResponse : pb::IMessage<SetPowerDownTimeResponse> { + private static readonly pb::MessageParser<SetPowerDownTimeResponse> _parser = new pb::MessageParser<SetPowerDownTimeResponse>(() => new SetPowerDownTimeResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<SetPowerDownTimeResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.SetPowerDownTimeResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetPowerDownTimeResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetPowerDownTimeResponse(SetPowerDownTimeResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SetPowerDownTimeResponse Clone() { + return new SetPowerDownTimeResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SetPowerDownTimeResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SetPowerDownTimeResponse 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(SetPowerDownTimeResponse 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/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index a7fe17a56..ac425cb03 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -305,6 +305,8 @@ <Compile Include="MachineStatus\MachineStatus.cs" /> <Compile Include="MachineStatus\SetInkAutoFillingModeRequest.cs" /> <Compile Include="MachineStatus\SetInkAutoFillingModeResponse.cs" /> + <Compile Include="MachineStatus\SetPowerDownTimeRequest.cs" /> + <Compile Include="MachineStatus\SetPowerDownTimeResponse.cs" /> <Compile Include="MachineStatus\SpoolState.cs" /> <Compile Include="MachineStatus\SpoolTypeChangedRequest.cs" /> <Compile Include="MachineStatus\SpoolTypeChangedResponse.cs" /> |
