diff options
12 files changed, 508 insertions, 51 deletions
diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index c77b9cf52..a4031b5e8 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -271,6 +271,8 @@ enum MessageType ValidateVersionResponse = 7021; ActivateVersionRequest = 7022; ActivateVersionResponse = 7023; + GetVersionDescriptorsRequest = 7024; + GetVersionDescriptorsResponse = 7025; //EmbeddedParameters DispenserDataRequest = 8000; diff --git a/Software/PMR/Messages/FirmwareUpgrade/GetVersionDescriptorsRequest.proto b/Software/PMR/Messages/FirmwareUpgrade/GetVersionDescriptorsRequest.proto new file mode 100644 index 000000000..7ac54a927 --- /dev/null +++ b/Software/PMR/Messages/FirmwareUpgrade/GetVersionDescriptorsRequest.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.FirmwareUpgrade; +option java_package = "com.twine.tango.pmr.firmwareupgrade"; + +message GetVersionDescriptorsRequest +{ + +}
\ No newline at end of file diff --git a/Software/PMR/Messages/FirmwareUpgrade/GetVersionDescriptorsResponse.proto b/Software/PMR/Messages/FirmwareUpgrade/GetVersionDescriptorsResponse.proto new file mode 100644 index 000000000..6102a99e7 --- /dev/null +++ b/Software/PMR/Messages/FirmwareUpgrade/GetVersionDescriptorsResponse.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +import "VersionFileDescriptor.proto"; + +package Tango.PMR.FirmwareUpgrade; +option java_package = "com.twine.tango.pmr.firmwareupgrade"; + +message GetVersionDescriptorsResponse +{ + repeated VersionFileDescriptor Descriptors = 1; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/Printing/JobRequest.proto b/Software/PMR/Messages/Printing/JobRequest.proto index 2ba3609f6..a688385d5 100644 --- a/Software/PMR/Messages/Printing/JobRequest.proto +++ b/Software/PMR/Messages/Printing/JobRequest.proto @@ -8,4 +8,5 @@ option java_package = "com.twine.tango.pmr.printing"; message JobRequest { JobTicket JobTicket = 1; + double FirstUnitStartPosition = 2; }
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs index a897c806c..0d64da83e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs @@ -261,8 +261,6 @@ namespace Tango.PPC.Common.MachineSetup if (_buildProvider.IsEureka) { setup_response.SetupActivation = false; - setup_response.SetupFirmware = false; - setup_response.SetupFPGA = false; setup_response.SetupUWF = false; setup_response.SetupRemoteAssistance = false; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs index 64ca496f7..47ffe6f19 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs @@ -661,12 +661,6 @@ namespace Tango.PPC.Common.MachineUpdate /// <exception cref="System.InvalidProgramException">Database tango does not exists.</exception> public async Task<MachineUpdateResult> Update(bool setupFirmware, bool setupFPGA) { - if (_buildProvider.IsEureka) - { - setupFirmware = false; - setupFPGA = false; - } - _updateStartDate = DateTime.UtcNow; _logs.Clear(); diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 49e7c76e2..430533768 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -59,6 +59,7 @@ namespace Tango.Integration.Operation public const String FIRMWARE_UPGRADE_FOLDER_NAME = "UpgradePackage"; public const String FIRMWARE_UPGRADE_CONFIG_FILE_NAME = "package.cfg"; public const String JOB_DESCRIPTION_FILE_NAME = "job_segments.jdf"; + public const String EUREKA_FIRMWARE_UPGRADE_DRIVE_LABEL = "NOD_H743ZI2"; public const int MAX_DISPENSER_NANOLITER = 130000000; public const double MAX_MIDTANK_LITERS = 1.8; @@ -3940,6 +3941,7 @@ namespace Tango.Integration.Operation Action validate = null; Action activate = null; Action postActivation = null; + Action upgradeEureka = null; UpdateStatus(MachineStatuses.Upgrading); @@ -4064,6 +4066,119 @@ namespace Tango.Integration.Operation } }); + upgradeEureka = new Action(() => + { + try + { + if (FirmwareUpgradeMode.HasFlag(FirmwareUpgradeModes.DFU)) + { + if (package_info.ContainsMcu()) + { + LogManager.Log("Firmware upgrade enabled. Starting upgrade via file system..."); + + var upgradeDrive = DriveInfo.GetDrives().SingleOrDefault(x => x.VolumeLabel == EUREKA_FIRMWARE_UPGRADE_DRIVE_LABEL); + if (upgradeDrive == null) + { + throw LogManager.Log(new IOException($"Could not locate firmware upgrade volume labeled '{EUREKA_FIRMWARE_UPGRADE_DRIVE_LABEL}'")); + } + + String upgradeFolder = upgradeDrive.RootDirectory.FullName; + + LogManager.Log("Extracting MCU file..."); + ZipEntry mcuEntry = null; + try + { + mcuEntry = entries.Single(x => x.FileName == package_info.FileDescriptors.Single(y => y.Destination == VersionFileDestination.Mcu).FileName); + entries.Remove(mcuEntry); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error extracting MCU file from package."); + upgradeHandler.RaiseFailed(new IOException("Error retrieving MCU file from package.", ex)); + return; + } + + LogManager.Log("Disconnecting adapter..."); + Adapter.Disconnect().Wait(); + + ResetEvents(); + ResetInkFllingStatus(); + + try + { + if (!isEmulated) + { + LogManager.Log("Upgrading..."); + mcuEntry.Extract(upgradeFolder, ExtractExistingFileAction.OverwriteSilently); + } + else + { + LogManager.Log("Upgrading (emulated)..."); + Thread.Sleep(3000); + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Firmware upgrade failed while extracting the MCU file to the upgrade location."); + UpdateStatus(MachineStatuses.Disconnected); + upgradeHandler.RaiseFailed(ex); + OnFailed(ex); + return; + } + + LogManager.Log("Waiting for the device..."); + upgradeHandler.RaiseProgress(FirmwareUpgradeStatus.Upgrading, "Waiting for the device..."); + Thread.Sleep(5000); + + LogManager.Log("Reconnecting adapter..."); + upgradeHandler.RaiseProgress(FirmwareUpgradeStatus.Upgrading, "Connecting..."); + Adapter.Connect().Wait(); + + Connect().Wait(); + + LogManager.Log("Connected..."); + upgradeHandler.RaiseProgress(FirmwareUpgradeStatus.Upgrading, "Connected."); + Thread.Sleep(2000); + + LogManager.Log("Waiting..."); + upgradeHandler.RaiseProgress(FirmwareUpgradeStatus.Upgrading, "Waiting..."); + Thread.Sleep(2000); + + UpdateStatus(MachineStatuses.Upgrading); + } + else + { + LogManager.Log("DFU is enabled but no MCU file was found on the package. Skipping..."); + } + } + + //Upload tfp package only if specified in flag && package info contains more files other than the mcu bin file. + if (FirmwareUpgradeMode.HasFlag(FirmwareUpgradeModes.TFP_PACKAGE)) + { + if (package_info.ContainsNoneMcu()) + { + LogManager.Log("TFP package is enabled. Starting upload..."); + uploadNext(); + } + else + { + LogManager.Log("TFP package is enabled but no other files other than the MCU file were found on the package. Skipping..."); + postActivation(); + } + } + else + { + postActivation(); + } + } + catch (Exception ex) + { + UpdateStatus(MachineStatuses.ReadyToDye); + upgradeHandler.RaiseFailed(ex); + return; + } + }); + uploadNext = new Action(() => { if (entries.Count > 0) @@ -4183,7 +4298,14 @@ namespace Tango.Integration.Operation ThreadFactory.StartNew(() => { - upgradeDFU(); + if (MachineType == MachineTypes.TS1800) + { + upgradeDFU(); + } + else + { + + } }); return upgradeHandler; diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index 8dba8cee4..dae38027e 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( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirxQQoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiq4QgoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj", "dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n", "cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh", @@ -176,42 +176,43 @@ namespace Tango.PMR.Common { "d25sb2FkUmVxdWVzdBDqNhIeChlGaWxlQ2h1bmtEb3dubG9hZFJlc3BvbnNl", "EOs2EhsKFlZhbGlkYXRlVmVyc2lvblJlcXVlc3QQ7DYSHAoXVmFsaWRhdGVW", "ZXJzaW9uUmVzcG9uc2UQ7TYSGwoWQWN0aXZhdGVWZXJzaW9uUmVxdWVzdBDu", - "NhIcChdBY3RpdmF0ZVZlcnNpb25SZXNwb25zZRDvNhIZChREaXNwZW5zZXJE", - "YXRhUmVxdWVzdBDAPhIaChVEaXNwZW5zZXJEYXRhUmVzcG9uc2UQwT4SHAoX", - "TWlkVGFua0RhdGFTZXR1cFJlcXVlc3QQwj4SHQoYTWlkVGFua0RhdGFTZXR1", - "cFJlc3BvbnNlEMM+EiIKHU1hY2hpbmVDYWxpYnJhdGlvbkRhdGFSZXF1ZXN0", - "EMQ+EiMKHk1hY2hpbmVDYWxpYnJhdGlvbkRhdGFSZXNwb25zZRDFPhIeChlN", - "YWluQ2FyZFN0b3JlZERhdGFSZXF1ZXN0EMY+Eh8KGk1haW5DYXJkU3RvcmVk", - "RGF0YVJlc3BvbnNlEMc+EiQKH1N0YXJ0TWFjaGluZVN0YXR1c1VwZ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zcG9uc2UQ+VUSIQocQ29udGludWVUaHJlYWRMb2Fk", + "aW5nUmVxdWVzdBD6VRIiCh1Db250aW51ZVRocmVhZExvYWRpbmdSZXNwb25z", + "ZRD7VRIdChhTdG9wVGhyZWFkTG9hZGluZ1JlcXVlc3QQ/FUSHgoZU3RvcFRo", + "cmVhZExvYWRpbmdSZXNwb25zZRD9VRIcChdUcnlUaHJlYWRMb2FkaW5nUmVx", + "dWVzdBD+VRIdChhUcnlUaHJlYWRMb2FkaW5nUmVzcG9uc2UQ/1USIAobQXR0", + "ZW1wdFRocmVhZEpvZ2dpbmdSZXF1ZXN0EIBWEiEKHEF0dGVtcHRUaHJlYWRK", + "b2dnaW5nUmVzcG9uc2UQgVYSIQocU3RhcnRJbmtGaWxsaW5nU3RhdHVzUmVx", + "dWVzdBDgXRIiCh1TdGFydElua0ZpbGxpbmdTdGF0dXNSZXNwb25zZRDhXRIe", + "ChlJbml0aWF0ZUlua0ZpbGxpbmdSZXF1ZXN0EOJdEh8KGkluaXRpYXRlSW5r", + "RmlsbGluZ1Jlc3BvbnNlEONdEhgKE1dhc3RlUmVwbGFjZVJlcXVlc3QQ5F0S", + "GQoUV2FzdGVSZXBsYWNlUmVzcG9uc2UQ5V0SHAoXUHV0RGF0YVN0b3JlSXRl", + "bVJlcXVlc3QQyGUSHQoYUHV0RGF0YVN0b3JlSXRlbVJlc3BvbnNlEMllEhwK", + "F0dldERhdGFTdG9yZUl0ZW1SZXF1ZXN0EMplEh0KGEdldERhdGFTdG9yZUl0", + "ZW1SZXNwb25zZRDLZRIhChxEYXRhU3RvcmVJdGVtTW9kaWZpZWRSZXF1ZXN0", + "EMxlEiIKHURhdGFTdG9yZUl0ZW1Nb2RpZmllZFJlc3BvbnNlEM1lQhwKGmNv", + "bS50d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -493,6 +494,8 @@ namespace Tango.PMR.Common { [pbr::OriginalName("ValidateVersionResponse")] ValidateVersionResponse = 7021, [pbr::OriginalName("ActivateVersionRequest")] ActivateVersionRequest = 7022, [pbr::OriginalName("ActivateVersionResponse")] ActivateVersionResponse = 7023, + [pbr::OriginalName("GetVersionDescriptorsRequest")] GetVersionDescriptorsRequest = 7024, + [pbr::OriginalName("GetVersionDescriptorsResponse")] GetVersionDescriptorsResponse = 7025, /// <summary> ///EmbeddedParameters /// </summary> diff --git a/Software/Visual_Studio/Tango.PMR/FirmwareUpgrade/GetVersionDescriptorsRequest.cs b/Software/Visual_Studio/Tango.PMR/FirmwareUpgrade/GetVersionDescriptorsRequest.cs new file mode 100644 index 000000000..fbd200dc3 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/FirmwareUpgrade/GetVersionDescriptorsRequest.cs @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GetVersionDescriptorsRequest.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.FirmwareUpgrade { + + /// <summary>Holder for reflection information generated from GetVersionDescriptorsRequest.proto</summary> + public static partial class GetVersionDescriptorsRequestReflection { + + #region Descriptor + /// <summary>File descriptor for GetVersionDescriptorsRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GetVersionDescriptorsRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJHZXRWZXJzaW9uRGVzY3JpcHRvcnNSZXF1ZXN0LnByb3RvEhlUYW5nby5Q", + "TVIuRmlybXdhcmVVcGdyYWRlIh4KHEdldFZlcnNpb25EZXNjcmlwdG9yc1Jl", + "cXVlc3RCJQojY29tLnR3aW5lLnRhbmdvLnBtci5maXJtd2FyZXVwZ3JhZGVi", + "BnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.FirmwareUpgrade.GetVersionDescriptorsRequest), global::Tango.PMR.FirmwareUpgrade.GetVersionDescriptorsRequest.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class GetVersionDescriptorsRequest : pb::IMessage<GetVersionDescriptorsRequest> { + private static readonly pb::MessageParser<GetVersionDescriptorsRequest> _parser = new pb::MessageParser<GetVersionDescriptorsRequest>(() => new GetVersionDescriptorsRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<GetVersionDescriptorsRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.FirmwareUpgrade.GetVersionDescriptorsRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetVersionDescriptorsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetVersionDescriptorsRequest(GetVersionDescriptorsRequest other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetVersionDescriptorsRequest Clone() { + return new GetVersionDescriptorsRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GetVersionDescriptorsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GetVersionDescriptorsRequest 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(GetVersionDescriptorsRequest 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/FirmwareUpgrade/GetVersionDescriptorsResponse.cs b/Software/Visual_Studio/Tango.PMR/FirmwareUpgrade/GetVersionDescriptorsResponse.cs new file mode 100644 index 000000000..afbd23340 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/FirmwareUpgrade/GetVersionDescriptorsResponse.cs @@ -0,0 +1,154 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GetVersionDescriptorsResponse.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.FirmwareUpgrade { + + /// <summary>Holder for reflection information generated from GetVersionDescriptorsResponse.proto</summary> + public static partial class GetVersionDescriptorsResponseReflection { + + #region Descriptor + /// <summary>File descriptor for GetVersionDescriptorsResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GetVersionDescriptorsResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNHZXRWZXJzaW9uRGVzY3JpcHRvcnNSZXNwb25zZS5wcm90bxIZVGFuZ28u", + "UE1SLkZpcm13YXJlVXBncmFkZRobVmVyc2lvbkZpbGVEZXNjcmlwdG9yLnBy", + "b3RvImYKHUdldFZlcnNpb25EZXNjcmlwdG9yc1Jlc3BvbnNlEkUKC0Rlc2Ny", + "aXB0b3JzGAEgAygLMjAuVGFuZ28uUE1SLkZpcm13YXJlVXBncmFkZS5WZXJz", + "aW9uRmlsZURlc2NyaXB0b3JCJQojY29tLnR3aW5lLnRhbmdvLnBtci5maXJt", + "d2FyZXVwZ3JhZGViBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.FirmwareUpgrade.VersionFileDescriptorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.FirmwareUpgrade.GetVersionDescriptorsResponse), global::Tango.PMR.FirmwareUpgrade.GetVersionDescriptorsResponse.Parser, new[]{ "Descriptors" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class GetVersionDescriptorsResponse : pb::IMessage<GetVersionDescriptorsResponse> { + private static readonly pb::MessageParser<GetVersionDescriptorsResponse> _parser = new pb::MessageParser<GetVersionDescriptorsResponse>(() => new GetVersionDescriptorsResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<GetVersionDescriptorsResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.FirmwareUpgrade.GetVersionDescriptorsResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetVersionDescriptorsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetVersionDescriptorsResponse(GetVersionDescriptorsResponse other) : this() { + descriptors_ = other.descriptors_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GetVersionDescriptorsResponse Clone() { + return new GetVersionDescriptorsResponse(this); + } + + /// <summary>Field number for the "Descriptors" field.</summary> + public const int DescriptorsFieldNumber = 1; + private static readonly pb::FieldCodec<global::Tango.PMR.FirmwareUpgrade.VersionFileDescriptor> _repeated_descriptors_codec + = pb::FieldCodec.ForMessage(10, global::Tango.PMR.FirmwareUpgrade.VersionFileDescriptor.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.FirmwareUpgrade.VersionFileDescriptor> descriptors_ = new pbc::RepeatedField<global::Tango.PMR.FirmwareUpgrade.VersionFileDescriptor>(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.FirmwareUpgrade.VersionFileDescriptor> Descriptors { + get { return descriptors_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GetVersionDescriptorsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GetVersionDescriptorsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!descriptors_.Equals(other.descriptors_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= descriptors_.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) { + descriptors_.WriteTo(output, _repeated_descriptors_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += descriptors_.CalculateSize(_repeated_descriptors_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GetVersionDescriptorsResponse other) { + if (other == null) { + return; + } + descriptors_.Add(other.descriptors_); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + descriptors_.AddEntriesFrom(input, _repeated_descriptors_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobRequest.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobRequest.cs index 4f29c71c6..7395544ad 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobRequest.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobRequest.cs @@ -23,13 +23,14 @@ namespace Tango.PMR.Printing { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChBKb2JSZXF1ZXN0LnByb3RvEhJUYW5nby5QTVIuUHJpbnRpbmcaD0pvYlRp", - "Y2tldC5wcm90byI+CgpKb2JSZXF1ZXN0EjAKCUpvYlRpY2tldBgBIAEoCzId", - "LlRhbmdvLlBNUi5QcmludGluZy5Kb2JUaWNrZXRCHgocY29tLnR3aW5lLnRh", - "bmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); + "Y2tldC5wcm90byJeCgpKb2JSZXF1ZXN0EjAKCUpvYlRpY2tldBgBIAEoCzId", + "LlRhbmdvLlBNUi5QcmludGluZy5Kb2JUaWNrZXQSHgoWRmlyc3RVbml0U3Rh", + "cnRQb3NpdGlvbhgCIAEoAUIeChxjb20udHdpbmUudGFuZ28ucG1yLnByaW50", + "aW5nYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobTicketReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobRequest), global::Tango.PMR.Printing.JobRequest.Parser, new[]{ "JobTicket" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobRequest), global::Tango.PMR.Printing.JobRequest.Parser, new[]{ "JobTicket", "FirstUnitStartPosition" }, null, null, null) })); } #endregion @@ -61,6 +62,7 @@ namespace Tango.PMR.Printing { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public JobRequest(JobRequest other) : this() { JobTicket = other.jobTicket_ != null ? other.JobTicket.Clone() : null; + firstUnitStartPosition_ = other.firstUnitStartPosition_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -79,6 +81,17 @@ namespace Tango.PMR.Printing { } } + /// <summary>Field number for the "FirstUnitStartPosition" field.</summary> + public const int FirstUnitStartPositionFieldNumber = 2; + private double firstUnitStartPosition_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double FirstUnitStartPosition { + get { return firstUnitStartPosition_; } + set { + firstUnitStartPosition_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as JobRequest); @@ -93,6 +106,7 @@ namespace Tango.PMR.Printing { return true; } if (!object.Equals(JobTicket, other.JobTicket)) return false; + if (FirstUnitStartPosition != other.FirstUnitStartPosition) return false; return true; } @@ -100,6 +114,7 @@ namespace Tango.PMR.Printing { public override int GetHashCode() { int hash = 1; if (jobTicket_ != null) hash ^= JobTicket.GetHashCode(); + if (FirstUnitStartPosition != 0D) hash ^= FirstUnitStartPosition.GetHashCode(); return hash; } @@ -114,6 +129,10 @@ namespace Tango.PMR.Printing { output.WriteRawTag(10); output.WriteMessage(JobTicket); } + if (FirstUnitStartPosition != 0D) { + output.WriteRawTag(17); + output.WriteDouble(FirstUnitStartPosition); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -122,6 +141,9 @@ namespace Tango.PMR.Printing { if (jobTicket_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(JobTicket); } + if (FirstUnitStartPosition != 0D) { + size += 1 + 8; + } return size; } @@ -136,6 +158,9 @@ namespace Tango.PMR.Printing { } JobTicket.MergeFrom(other.JobTicket); } + if (other.FirstUnitStartPosition != 0D) { + FirstUnitStartPosition = other.FirstUnitStartPosition; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -153,6 +178,10 @@ namespace Tango.PMR.Printing { input.ReadMessage(jobTicket_); break; } + case 17: { + FirstUnitStartPosition = input.ReadDouble(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index 9490c118b..c92828fad 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -212,6 +212,8 @@ <Compile Include="ExtensionMethods\VersionPackageDescriptorExtensions.cs" /> <Compile Include="FirmwareUpgrade\ActivateVersionRequest.cs" /> <Compile Include="FirmwareUpgrade\ActivateVersionResponse.cs" /> + <Compile Include="FirmwareUpgrade\GetVersionDescriptorsRequest.cs" /> + <Compile Include="FirmwareUpgrade\GetVersionDescriptorsResponse.cs" /> <Compile Include="FirmwareUpgrade\ValidateVersionRequest.cs" /> <Compile Include="FirmwareUpgrade\ValidateVersionResponse.cs" /> <Compile Include="FirmwareUpgrade\VersionFileDescriptor.cs" /> @@ -517,7 +519,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 |
