diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-17 09:21:13 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-17 09:21:13 +0300 |
| commit | a5ec5d754dd516dfadbb34fe1b167eff817ded6e (patch) | |
| tree | 3211ac7b38c7cee056fe71c17c258fed741b342a /Software/Visual_Studio | |
| parent | e66cd269ad02302f2a5a4ec377112cd61789647e (diff) | |
| parent | 26871cba2047dfc7afa6922a34e4f6b7bc9d4932 (diff) | |
| download | Tango-a5ec5d754dd516dfadbb34fe1b167eff817ded6e.tar.gz Tango-a5ec5d754dd516dfadbb34fe1b167eff817ded6e.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio')
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs | 93 |
1 files changed, 57 insertions, 36 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs index afe846303..b67bd0fa8 100644 --- a/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs +++ b/Software/Visual_Studio/Tango.PMR/Printing/JobSpool.cs @@ -23,17 +23,17 @@ namespace Tango.PMR.Printing { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cg5Kb2JTcG9vbC5wcm90bxISVGFuZ28uUE1SLlByaW50aW5nGhJKb2JTcG9v", - "bFR5cGUucHJvdG8i+QEKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo", + "bFR5cGUucHJvdG8ihQIKCEpvYlNwb29sEjYKDEpvYlNwb29sVHlwZRgBIAEo", "DjIgLlRhbmdvLlBNUi5QcmludGluZy5Kb2JTcG9vbFR5cGUSDgoGTGVuZ3Ro", "GAIgASgBEg4KBldlaWdodBgDIAEoARIQCghEaWFtZXRlchgEIAEoARIZChFT", "dGFydE9mZnNldFB1bHNlcxgFIAEoBRITCgtCYWNraW5nUmF0ZRgGIAEoBRIb", - "ChNTZWdtZW50T2Zmc2V0UHVsc2VzGAcgASgFEhkKEUJvdHRvbUJhY2tpbmdS", - "YXRlGAggASgFEhsKE1JvdGF0aW9uc1BlclBhc3NhZ2UYCSABKAFCHgocY29t", - "LnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); + "ChNTZWdtZW50T2Zmc2V0UHVsc2VzGAcgASgFEh4KFlNwb29sQm90dG9tQmFj", + "a2luZ1JhdGUYCCABKAUSIgoaTnVtYmVyT2ZSb3RhdGlvblBlclBhc3NhZ2UY", + "CSABKAFCHgocY29tLnR3aW5lLnRhbmdvLnBtci5wcmludGluZ2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "BottomBackingRate", "RotationsPerPassage" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Printing.JobSpool), global::Tango.PMR.Printing.JobSpool.Parser, new[]{ "JobSpoolType", "Length", "Weight", "Diameter", "StartOffsetPulses", "BackingRate", "SegmentOffsetPulses", "SpoolBottomBackingRate", "NumberOfRotationPerPassage" }, null, null, null) })); } #endregion @@ -71,8 +71,8 @@ namespace Tango.PMR.Printing { startOffsetPulses_ = other.startOffsetPulses_; backingRate_ = other.backingRate_; segmentOffsetPulses_ = other.segmentOffsetPulses_; - bottomBackingRate_ = other.bottomBackingRate_; - rotationsPerPassage_ = other.rotationsPerPassage_; + spoolBottomBackingRate_ = other.spoolBottomBackingRate_; + numberOfRotationPerPassage_ = other.numberOfRotationPerPassage_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -94,6 +94,9 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "Length" field.</summary> public const int LengthFieldNumber = 2; private double length_; + /// <summary> + /// the spool winding initial length in mm + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Length { get { return length_; } @@ -116,6 +119,9 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "Diameter" field.</summary> public const int DiameterFieldNumber = 4; private double diameter_; + /// <summary> + /// in mm initial data required for speed calculation + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public double Diameter { get { return diameter_; } @@ -127,6 +133,9 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "StartOffsetPulses" field.</summary> public const int StartOffsetPulsesFieldNumber = 5; private int startOffsetPulses_; + /// <summary> + /// distance between the limit switch and the initial spool home position + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int StartOffsetPulses { get { return startOffsetPulses_; } @@ -138,6 +147,9 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "BackingRate" field.</summary> public const int BackingRateFieldNumber = 6; private int backingRate_; + /// <summary> + /// the angle of the top of the spool + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int BackingRate { get { return backingRate_; } @@ -149,6 +161,9 @@ namespace Tango.PMR.Printing { /// <summary>Field number for the "SegmentOffsetPulses" field.</summary> public const int SegmentOffsetPulsesFieldNumber = 7; private int segmentOffsetPulses_; + /// <summary> + /// the spool winding initial length in mm + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int SegmentOffsetPulses { get { return segmentOffsetPulses_; } @@ -157,25 +172,31 @@ namespace Tango.PMR.Printing { } } - /// <summary>Field number for the "BottomBackingRate" field.</summary> - public const int BottomBackingRateFieldNumber = 8; - private int bottomBackingRate_; + /// <summary>Field number for the "SpoolBottomBackingRate" field.</summary> + public const int SpoolBottomBackingRateFieldNumber = 8; + private int spoolBottomBackingRate_; + /// <summary> + /// the angle of the bottom of the spool + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int BottomBackingRate { - get { return bottomBackingRate_; } + public int SpoolBottomBackingRate { + get { return spoolBottomBackingRate_; } set { - bottomBackingRate_ = value; + spoolBottomBackingRate_ = value; } } - /// <summary>Field number for the "RotationsPerPassage" field.</summary> - public const int RotationsPerPassageFieldNumber = 9; - private double rotationsPerPassage_; + /// <summary>Field number for the "NumberOfRotationPerPassage" field.</summary> + public const int NumberOfRotationPerPassageFieldNumber = 9; + private double numberOfRotationPerPassage_; + /// <summary> + /// how many rotations per spool passage + /// </summary> [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public double RotationsPerPassage { - get { return rotationsPerPassage_; } + public double NumberOfRotationPerPassage { + get { return numberOfRotationPerPassage_; } set { - rotationsPerPassage_ = value; + numberOfRotationPerPassage_ = value; } } @@ -199,8 +220,8 @@ namespace Tango.PMR.Printing { if (StartOffsetPulses != other.StartOffsetPulses) return false; if (BackingRate != other.BackingRate) return false; if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false; - if (BottomBackingRate != other.BottomBackingRate) return false; - if (RotationsPerPassage != other.RotationsPerPassage) return false; + if (SpoolBottomBackingRate != other.SpoolBottomBackingRate) return false; + if (NumberOfRotationPerPassage != other.NumberOfRotationPerPassage) return false; return true; } @@ -214,8 +235,8 @@ namespace Tango.PMR.Printing { if (StartOffsetPulses != 0) hash ^= StartOffsetPulses.GetHashCode(); if (BackingRate != 0) hash ^= BackingRate.GetHashCode(); if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode(); - if (BottomBackingRate != 0) hash ^= BottomBackingRate.GetHashCode(); - if (RotationsPerPassage != 0D) hash ^= RotationsPerPassage.GetHashCode(); + if (SpoolBottomBackingRate != 0) hash ^= SpoolBottomBackingRate.GetHashCode(); + if (NumberOfRotationPerPassage != 0D) hash ^= NumberOfRotationPerPassage.GetHashCode(); return hash; } @@ -254,13 +275,13 @@ namespace Tango.PMR.Printing { output.WriteRawTag(56); output.WriteInt32(SegmentOffsetPulses); } - if (BottomBackingRate != 0) { + if (SpoolBottomBackingRate != 0) { output.WriteRawTag(64); - output.WriteInt32(BottomBackingRate); + output.WriteInt32(SpoolBottomBackingRate); } - if (RotationsPerPassage != 0D) { + if (NumberOfRotationPerPassage != 0D) { output.WriteRawTag(73); - output.WriteDouble(RotationsPerPassage); + output.WriteDouble(NumberOfRotationPerPassage); } } @@ -288,10 +309,10 @@ namespace Tango.PMR.Printing { if (SegmentOffsetPulses != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(SegmentOffsetPulses); } - if (BottomBackingRate != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(BottomBackingRate); + if (SpoolBottomBackingRate != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SpoolBottomBackingRate); } - if (RotationsPerPassage != 0D) { + if (NumberOfRotationPerPassage != 0D) { size += 1 + 8; } return size; @@ -323,11 +344,11 @@ namespace Tango.PMR.Printing { if (other.SegmentOffsetPulses != 0) { SegmentOffsetPulses = other.SegmentOffsetPulses; } - if (other.BottomBackingRate != 0) { - BottomBackingRate = other.BottomBackingRate; + if (other.SpoolBottomBackingRate != 0) { + SpoolBottomBackingRate = other.SpoolBottomBackingRate; } - if (other.RotationsPerPassage != 0D) { - RotationsPerPassage = other.RotationsPerPassage; + if (other.NumberOfRotationPerPassage != 0D) { + NumberOfRotationPerPassage = other.NumberOfRotationPerPassage; } } @@ -368,11 +389,11 @@ namespace Tango.PMR.Printing { break; } case 64: { - BottomBackingRate = input.ReadInt32(); + SpoolBottomBackingRate = input.ReadInt32(); break; } case 73: { - RotationsPerPassage = input.ReadDouble(); + NumberOfRotationPerPassage = input.ReadDouble(); break; } } |
