summaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-01 17:45:53 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-01 17:45:53 +0200
commitc43439d0c4b7f4434eaf277c0f60c5e3c0494ac2 (patch)
tree62988fdea921b80df2ab45e78b18cc24a2e10fdd /Software/Visual_Studio
parenteb2c264422b98458979bc96504ce8830a527d48c (diff)
downloadTango-c43439d0c4b7f4434eaf277c0f60c5e3c0494ac2.tar.gz
Tango-c43439d0c4b7f4434eaf277c0f60c5e3c0494ac2.zip
Removed Shlomo PMR Messages.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs16
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs6
-rw-r--r--Software/Visual_Studio/Tango.PMR/Common/MessageType.cs44
-rw-r--r--Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs82
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/Dancer.cs253
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/Dispenser.cs569
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/InternalWinder.cs245
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs (renamed from Software/Visual_Studio/Tango.PMR/Jobs/Motor.cs)354
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/PIDCluster.cs303
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/PIDControl.cs616
-rw-r--r--Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs327
-rw-r--r--Software/Visual_Studio/Tango.PMR/Jobs/Job.cs159
-rw-r--r--Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs33
-rw-r--r--Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj10
14 files changed, 2309 insertions, 708 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 7086cfb4d..52d67a141 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -30,6 +30,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
private INotificationProvider _notification;
private TimeSpan _runningJobEstimatedDuration;
+ private Dictionary<String, GraphControllerBase> _controllers;
#region Properties
@@ -393,6 +394,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
}
Graphs = new ObservableCollection<IRealTimeGraph>();
+ _controllers = new Dictionary<String, GraphControllerBase>();
}
/// <summary>
@@ -846,19 +848,22 @@ namespace Tango.MachineStudio.Developer.ViewModels
if (Graphs.Count < 8)
{
IRealTimeGraph graphControl = null;
+ GraphControllerBase controller = null;
if (!sensor.MultiChannel)
{
graphControl = new RealTimeGraphControl();
+ controller = new GraphController();
+ graphControl.Controller = controller;
}
else
{
graphControl = new RealTimeGraphMultiControl();
- GraphMultiController controller = new GraphMultiController();
+ controller = new GraphMultiController();
for (int i = 0; i < sensor.ChannelCount; i++)
{
- controller.AddSeries(new DataYSeries()
+ (controller as GraphMultiController).AddSeries(new DataYSeries()
{
Name = sensor.Description.First().ToString() + (i + 1),
UseFillAndStroke = true,
@@ -881,6 +886,8 @@ namespace Tango.MachineStudio.Developer.ViewModels
};
Graphs.Add(graphControl);
AvailableSensors.Remove(sensor);
+
+ _controllers.Add(sensor.Name, controller);
}
else
{
@@ -908,8 +915,11 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// <param name="graph">The graph.</param>
public void RemoveGraph(IRealTimeGraph graph)
{
+ var sensor = graph.Tag as Sensor;
+ _controllers.Remove(sensor.Name);
+ graph.InnerGraph.Dispose();
Graphs.Remove(graph);
- AvailableSensors.Insert(0, graph.Tag as Sensor);
+ AvailableSensors.Insert(0, sensor);
}
#endregion
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
index c1ed37474..70ce3881f 100644
--- a/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphEx/RealTimeGraphExBase.cs
@@ -1348,7 +1348,11 @@ namespace RealTimeGraphEx
{
if (pushThread != null)
{
- pushThread.Abort();
+ try
+ {
+ pushThread.Abort();
+ }
+ catch { }
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
index 9ea3455b1..b813f3e5a 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(
- "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirBCgoLTWVz",
+ "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirxCwoLTWVz",
"c2FnZVR5cGUSBwoDUkdCEAASBwoDSm9iEAESCwoHU2VnbWVudBACEhQKEENh",
"bGN1bGF0ZVJlcXVlc3QQAxIVChFDYWxjdWxhdGVSZXNwb25zZRAEEhMKD1By",
"b2dyZXNzUmVxdWVzdBAFEhQKEFByb2dyZXNzUmVzcG9uc2UQBhIcChhTdHVi",
@@ -45,15 +45,19 @@ namespace Tango.PMR.Common {
"U3R1YlZhbHZlUmVzcG9uc2UQIBIbChdTdHViRXh0Rmxhc2hSZWFkUmVxdWVz",
"dBAhEhwKGFN0dWJFeHRGbGFzaFJlYWRSZXNwb25zZRAiEhwKGFN0dWJFeHRG",
"bGFzaFdyaXRlUmVxdWVzdBAjEh0KGVN0dWJFeHRGbGFzaFdyaXRlUmVzcG9u",
- "c2UQJBIlCiBFeHRlcm5hbEJyaWRnZVVkcERpc2NvdmVyeVBhY2tldBDoBxIf",
- "ChpFeHRlcm5hbENsaWVudExvZ2luUmVxdWVzdBDpBxIgChtFeHRlcm5hbENs",
- "aWVudExvZ2luUmVzcG9uc2UQ6gcSIQocRGlyZWN0U3luY2hyb25pemF0aW9u",
- "UmVxdWVzdBDrBxIiCh1EaXJlY3RTeW5jaHJvbml6YXRpb25SZXNwb25zZRDs",
- "BxIcChdPdmVycmlkZURhdGFCYXNlUmVxdWVzdBDtBxIdChhPdmVycmlkZURh",
- "dGFCYXNlUmVzcG9uc2UQ7gcSFQoQS2VlcEFsaXZlUmVxdWVzdBDvBxIWChFL",
- "ZWVwQWxpdmVSZXNwb25zZRDwBxIcChdTdGFydERpYWdub3N0aWNzUmVxdWVz",
- "dBDQDxIdChhTdGFydERpYWdub3N0aWNzUmVzcG9uc2UQ0Q9CHAoaY29tLnR3",
- "aW5lLnRhbmdvLnBtci5jb21tb25iBnByb3RvMw=="));
+ "c2UQJBIOCglEaXNwZW5zZXIQyAESCgoFTW90b3IQyQESDQoIR3JhZGllbnQQ",
+ "ygESCwoGRGFuY2VyEMsBEhMKDkludGVybmFsV2luZGVyEMwBEg0KCERpc3Bl",
+ "bnNlEM0BEhQKD1NlZ21lbnRHcmFkaWVudBDOARIlCiBFeHRlcm5hbEJyaWRn",
+ "ZVVkcERpc2NvdmVyeVBhY2tldBDoBxIfChpFeHRlcm5hbENsaWVudExvZ2lu",
+ "UmVxdWVzdBDpBxIgChtFeHRlcm5hbENsaWVudExvZ2luUmVzcG9uc2UQ6gcS",
+ "IQocRGlyZWN0U3luY2hyb25pemF0aW9uUmVxdWVzdBDrBxIiCh1EaXJlY3RT",
+ "eW5jaHJvbml6YXRpb25SZXNwb25zZRDsBxIcChdPdmVycmlkZURhdGFCYXNl",
+ "UmVxdWVzdBDtBxIdChhPdmVycmlkZURhdGFCYXNlUmVzcG9uc2UQ7gcSFQoQ",
+ "S2VlcEFsaXZlUmVxdWVzdBDvBxIWChFLZWVwQWxpdmVSZXNwb25zZRDwBxIc",
+ "ChdTdGFydERpYWdub3N0aWNzUmVxdWVzdBDQDxIdChhTdGFydERpYWdub3N0",
+ "aWNzUmVzcG9uc2UQ0Q8SEgoNUmVwb3J0UmVxdWVzdBDSDxITCg5SZXBvcnRS",
+ "ZXNwb25zZRDTDxITCg5TdGF0dXNSZXNwb25zZRDUD0IcChpjb20udHdpbmUu",
+ "dGFuZ28ucG1yLmNvbW1vbmIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null));
@@ -68,6 +72,12 @@ namespace Tango.PMR.Common {
/// </summary>
[pbr::OriginalName("RGB")] Rgb = 0,
[pbr::OriginalName("Job")] Job = 1,
+ /// <summary>
+ ///Hardware
+ ///Dispenser;
+ ///Motor;
+ ///Gradient;
+ /// </summary>
[pbr::OriginalName("Segment")] Segment = 2,
/// <summary>
///Stubs
@@ -107,6 +117,17 @@ namespace Tango.PMR.Common {
[pbr::OriginalName("StubExtFlashWriteRequest")] StubExtFlashWriteRequest = 35,
[pbr::OriginalName("StubExtFlashWriteResponse")] StubExtFlashWriteResponse = 36,
/// <summary>
+ ///work
+ ///Hardware = 200;
+ /// </summary>
+ [pbr::OriginalName("Dispenser")] Dispenser = 200,
+ [pbr::OriginalName("Motor")] Motor = 201,
+ [pbr::OriginalName("Gradient")] Gradient = 202,
+ [pbr::OriginalName("Dancer")] Dancer = 203,
+ [pbr::OriginalName("InternalWinder")] InternalWinder = 204,
+ [pbr::OriginalName("Dispense")] Dispense = 205,
+ [pbr::OriginalName("SegmentGradient")] SegmentGradient = 206,
+ /// <summary>
///Integration
/// </summary>
[pbr::OriginalName("ExternalBridgeUdpDiscoveryPacket")] ExternalBridgeUdpDiscoveryPacket = 1000,
@@ -123,6 +144,9 @@ namespace Tango.PMR.Common {
/// </summary>
[pbr::OriginalName("StartDiagnosticsRequest")] StartDiagnosticsRequest = 2000,
[pbr::OriginalName("StartDiagnosticsResponse")] StartDiagnosticsResponse = 2001,
+ [pbr::OriginalName("ReportRequest")] ReportRequest = 2002,
+ [pbr::OriginalName("ReportResponse")] ReportResponse = 2003,
+ [pbr::OriginalName("StatusResponse")] StatusResponse = 2004,
}
#endregion
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs
index 6449d89b5..c978f8749 100644
--- a/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs
+++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/StartDiagnosticsResponse.cs
@@ -23,13 +23,14 @@ namespace Tango.PMR.Diagnostics {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch5TdGFydERpYWdub3N0aWNzUmVzcG9uc2UucHJvdG8SFVRhbmdvLlBNUi5E",
- "aWFnbm9zdGljcyJBChhTdGFydERpYWdub3N0aWNzUmVzcG9uc2USEwoLVGVt",
- "cGVyYXR1cmUYASADKAESEAoIVmVsb2NpdHkYAiADKAFCIQofY29tLnR3aW5l",
- "LnRhbmdvLnBtci5kaWFnbm9zdGljc2IGcHJvdG8z"));
+ "aWFnbm9zdGljcyJcChhTdGFydERpYWdub3N0aWNzUmVzcG9uc2USFAoMRGFu",
+ "Y2VyMUFuZ2xlGAEgAygBEhQKDERhbmNlcjJBbmdsZRgCIAMoARIUCgxEYW5j",
+ "ZXIzQW5nbGUYAyADKAFCIQofY29tLnR3aW5lLnRhbmdvLnBtci5kaWFnbm9z",
+ "dGljc2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.StartDiagnosticsResponse), global::Tango.PMR.Diagnostics.StartDiagnosticsResponse.Parser, new[]{ "Temperature", "Velocity" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.StartDiagnosticsResponse), global::Tango.PMR.Diagnostics.StartDiagnosticsResponse.Parser, new[]{ "Dancer1Angle", "Dancer2Angle", "Dancer3Angle" }, null, null, null)
}));
}
#endregion
@@ -60,8 +61,9 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public StartDiagnosticsResponse(StartDiagnosticsResponse other) : this() {
- temperature_ = other.temperature_.Clone();
- velocity_ = other.velocity_.Clone();
+ dancer1Angle_ = other.dancer1Angle_.Clone();
+ dancer2Angle_ = other.dancer2Angle_.Clone();
+ dancer3Angle_ = other.dancer3Angle_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -69,24 +71,34 @@ namespace Tango.PMR.Diagnostics {
return new StartDiagnosticsResponse(this);
}
- /// <summary>Field number for the "Temperature" field.</summary>
- public const int TemperatureFieldNumber = 1;
- private static readonly pb::FieldCodec<double> _repeated_temperature_codec
+ /// <summary>Field number for the "Dancer1Angle" field.</summary>
+ public const int Dancer1AngleFieldNumber = 1;
+ private static readonly pb::FieldCodec<double> _repeated_dancer1Angle_codec
= pb::FieldCodec.ForDouble(10);
- private readonly pbc::RepeatedField<double> temperature_ = new pbc::RepeatedField<double>();
+ private readonly pbc::RepeatedField<double> dancer1Angle_ = new pbc::RepeatedField<double>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<double> Temperature {
- get { return temperature_; }
+ public pbc::RepeatedField<double> Dancer1Angle {
+ get { return dancer1Angle_; }
}
- /// <summary>Field number for the "Velocity" field.</summary>
- public const int VelocityFieldNumber = 2;
- private static readonly pb::FieldCodec<double> _repeated_velocity_codec
+ /// <summary>Field number for the "Dancer2Angle" field.</summary>
+ public const int Dancer2AngleFieldNumber = 2;
+ private static readonly pb::FieldCodec<double> _repeated_dancer2Angle_codec
= pb::FieldCodec.ForDouble(18);
- private readonly pbc::RepeatedField<double> velocity_ = new pbc::RepeatedField<double>();
+ private readonly pbc::RepeatedField<double> dancer2Angle_ = new pbc::RepeatedField<double>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<double> Velocity {
- get { return velocity_; }
+ public pbc::RepeatedField<double> Dancer2Angle {
+ get { return dancer2Angle_; }
+ }
+
+ /// <summary>Field number for the "Dancer3Angle" field.</summary>
+ public const int Dancer3AngleFieldNumber = 3;
+ private static readonly pb::FieldCodec<double> _repeated_dancer3Angle_codec
+ = pb::FieldCodec.ForDouble(26);
+ private readonly pbc::RepeatedField<double> dancer3Angle_ = new pbc::RepeatedField<double>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField<double> Dancer3Angle {
+ get { return dancer3Angle_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -102,16 +114,18 @@ namespace Tango.PMR.Diagnostics {
if (ReferenceEquals(other, this)) {
return true;
}
- if(!temperature_.Equals(other.temperature_)) return false;
- if(!velocity_.Equals(other.velocity_)) return false;
+ if(!dancer1Angle_.Equals(other.dancer1Angle_)) return false;
+ if(!dancer2Angle_.Equals(other.dancer2Angle_)) return false;
+ if(!dancer3Angle_.Equals(other.dancer3Angle_)) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- hash ^= temperature_.GetHashCode();
- hash ^= velocity_.GetHashCode();
+ hash ^= dancer1Angle_.GetHashCode();
+ hash ^= dancer2Angle_.GetHashCode();
+ hash ^= dancer3Angle_.GetHashCode();
return hash;
}
@@ -122,15 +136,17 @@ namespace Tango.PMR.Diagnostics {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- temperature_.WriteTo(output, _repeated_temperature_codec);
- velocity_.WriteTo(output, _repeated_velocity_codec);
+ dancer1Angle_.WriteTo(output, _repeated_dancer1Angle_codec);
+ dancer2Angle_.WriteTo(output, _repeated_dancer2Angle_codec);
+ dancer3Angle_.WriteTo(output, _repeated_dancer3Angle_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- size += temperature_.CalculateSize(_repeated_temperature_codec);
- size += velocity_.CalculateSize(_repeated_velocity_codec);
+ size += dancer1Angle_.CalculateSize(_repeated_dancer1Angle_codec);
+ size += dancer2Angle_.CalculateSize(_repeated_dancer2Angle_codec);
+ size += dancer3Angle_.CalculateSize(_repeated_dancer3Angle_codec);
return size;
}
@@ -139,8 +155,9 @@ namespace Tango.PMR.Diagnostics {
if (other == null) {
return;
}
- temperature_.Add(other.temperature_);
- velocity_.Add(other.velocity_);
+ dancer1Angle_.Add(other.dancer1Angle_);
+ dancer2Angle_.Add(other.dancer2Angle_);
+ dancer3Angle_.Add(other.dancer3Angle_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -153,12 +170,17 @@ namespace Tango.PMR.Diagnostics {
break;
case 10:
case 9: {
- temperature_.AddEntriesFrom(input, _repeated_temperature_codec);
+ dancer1Angle_.AddEntriesFrom(input, _repeated_dancer1Angle_codec);
break;
}
case 18:
case 17: {
- velocity_.AddEntriesFrom(input, _repeated_velocity_codec);
+ dancer2Angle_.AddEntriesFrom(input, _repeated_dancer2Angle_codec);
+ break;
+ }
+ case 26:
+ case 25: {
+ dancer3Angle_.AddEntriesFrom(input, _repeated_dancer3Angle_codec);
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/Dancer.cs b/Software/Visual_Studio/Tango.PMR/Hardware/Dancer.cs
new file mode 100644
index 000000000..e7fa596ef
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/Dancer.cs
@@ -0,0 +1,253 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Dancer.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.Hardware {
+
+ /// <summary>Holder for reflection information generated from Dancer.proto</summary>
+ public static partial class DancerReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for Dancer.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static DancerReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgxEYW5jZXIucHJvdG8SElRhbmdvLlBNUi5IYXJkd2FyZSJOCgZEYW5jZXIS",
+ "FAoMRml4T3JHcmFkdWFsGAEgASgIEgkKAUsYAiABKAESCQoBWBgDIAEoARIY",
+ "ChBQdWxzZVBlck1NU3ByaW5nGAQgASgFQh4KHGNvbS50d2luZS50YW5nby5w",
+ "bXIuaGFyZHdhcmViBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.Dancer), global::Tango.PMR.Hardware.Dancer.Parser, new[]{ "FixOrGradual", "K", "X", "PulsePerMMSpring" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class Dancer : pb::IMessage<Dancer> {
+ private static readonly pb::MessageParser<Dancer> _parser = new pb::MessageParser<Dancer>(() => new Dancer());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<Dancer> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Hardware.DancerReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Dancer() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Dancer(Dancer other) : this() {
+ fixOrGradual_ = other.fixOrGradual_;
+ k_ = other.k_;
+ x_ = other.x_;
+ pulsePerMMSpring_ = other.pulsePerMMSpring_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public Dancer Clone() {
+ return new Dancer(this);
+ }
+
+ /// <summary>Field number for the "FixOrGradual" field.</summary>
+ public const int FixOrGradualFieldNumber = 1;
+ private bool fixOrGradual_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool FixOrGradual {
+ get { return fixOrGradual_; }
+ set {
+ fixOrGradual_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "K" field.</summary>
+ public const int KFieldNumber = 2;
+ private double k_;
+ /// <summary>
+ ///for F=KX spring calculation function
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double K {
+ get { return k_; }
+ set {
+ k_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "X" field.</summary>
+ public const int XFieldNumber = 3;
+ private double x_;
+ /// <summary>
+ ///for F=KX spring calculation function
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double X {
+ get { return x_; }
+ set {
+ x_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "PulsePerMMSpring" field.</summary>
+ public const int PulsePerMMSpringFieldNumber = 4;
+ private int pulsePerMMSpring_;
+ /// <summary>
+ ///changing explanation
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int PulsePerMMSpring {
+ get { return pulsePerMMSpring_; }
+ set {
+ pulsePerMMSpring_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as Dancer);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(Dancer other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (FixOrGradual != other.FixOrGradual) return false;
+ if (K != other.K) return false;
+ if (X != other.X) return false;
+ if (PulsePerMMSpring != other.PulsePerMMSpring) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (FixOrGradual != false) hash ^= FixOrGradual.GetHashCode();
+ if (K != 0D) hash ^= K.GetHashCode();
+ if (X != 0D) hash ^= X.GetHashCode();
+ if (PulsePerMMSpring != 0) hash ^= PulsePerMMSpring.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 (FixOrGradual != false) {
+ output.WriteRawTag(8);
+ output.WriteBool(FixOrGradual);
+ }
+ if (K != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(K);
+ }
+ if (X != 0D) {
+ output.WriteRawTag(25);
+ output.WriteDouble(X);
+ }
+ if (PulsePerMMSpring != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(PulsePerMMSpring);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (FixOrGradual != false) {
+ size += 1 + 1;
+ }
+ if (K != 0D) {
+ size += 1 + 8;
+ }
+ if (X != 0D) {
+ size += 1 + 8;
+ }
+ if (PulsePerMMSpring != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(PulsePerMMSpring);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(Dancer other) {
+ if (other == null) {
+ return;
+ }
+ if (other.FixOrGradual != false) {
+ FixOrGradual = other.FixOrGradual;
+ }
+ if (other.K != 0D) {
+ K = other.K;
+ }
+ if (other.X != 0D) {
+ X = other.X;
+ }
+ if (other.PulsePerMMSpring != 0) {
+ PulsePerMMSpring = other.PulsePerMMSpring;
+ }
+ }
+
+ [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: {
+ FixOrGradual = input.ReadBool();
+ break;
+ }
+ case 17: {
+ K = input.ReadDouble();
+ break;
+ }
+ case 25: {
+ X = input.ReadDouble();
+ break;
+ }
+ case 32: {
+ PulsePerMMSpring = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/Dispenser.cs b/Software/Visual_Studio/Tango.PMR/Hardware/Dispenser.cs
new file mode 100644
index 000000000..803944892
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/Dispenser.cs
@@ -0,0 +1,569 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: Dispenser.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.Hardware {
+
+ /// <summary>Holder for reflection information generated from Dispenser.proto</summary>
+ public static partial class DispenserReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for Dispenser.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static DispenserReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cg9EaXNwZW5zZXIucHJvdG8SElRhbmdvLlBNUi5IYXJkd2FyZSLFAgoPRGlz",
+ "cGVuc2VyQ29uZmlnEhkKEURpc3BlbnNlckNhcGFjaXR5GAEgASgFEhcKD01p",
+ "ZFRhbmtDYXBhY2l0eRgCIAEoBRIWCg5GbG93UGVyUHVsc2VObBgDIAEoARIP",
+ "CgdNaW5GcmVxGAQgASgNEg8KB01heEZyZXEYBSABKA0SFAoMTWlubWljcm9T",
+ "dGVwGAYgASgNEhQKDE1heG1pY3JvU3RlcBgHIAEoDRIWCg5Db3JyZWN0aW9u",
+ "R2FpbhgIIAEoARIYChBSYXRpbzJEcnllclNwZWVkGAkgASgBEgoKAktwGAog",
+ "ASgBEgoKAktpGAsgASgBEgoKAktkGAwgASgBEhMKC0NoYW5nZVNsb3BlGA0g",
+ "ASgBEhYKDkhpZ2hMZW5ndGh1U2VjGA4gASgBEhUKDUNvbnRyb2xUaW1pbmcY",
+ "DyABKAVCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.DispenserConfig), global::Tango.PMR.Hardware.DispenserConfig.Parser, new[]{ "DispenserCapacity", "MidTankCapacity", "FlowPerPulseNl", "MinFreq", "MaxFreq", "MinmicroStep", "MaxmicroStep", "CorrectionGain", "Ratio2DryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthuSec", "ControlTiming" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class DispenserConfig : pb::IMessage<DispenserConfig> {
+ private static readonly pb::MessageParser<DispenserConfig> _parser = new pb::MessageParser<DispenserConfig>(() => new DispenserConfig());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<DispenserConfig> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Hardware.DispenserReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public DispenserConfig() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public DispenserConfig(DispenserConfig other) : this() {
+ dispenserCapacity_ = other.dispenserCapacity_;
+ midTankCapacity_ = other.midTankCapacity_;
+ flowPerPulseNl_ = other.flowPerPulseNl_;
+ minFreq_ = other.minFreq_;
+ maxFreq_ = other.maxFreq_;
+ minmicroStep_ = other.minmicroStep_;
+ maxmicroStep_ = other.maxmicroStep_;
+ correctionGain_ = other.correctionGain_;
+ ratio2DryerSpeed_ = other.ratio2DryerSpeed_;
+ kp_ = other.kp_;
+ ki_ = other.ki_;
+ kd_ = other.kd_;
+ changeSlope_ = other.changeSlope_;
+ highLengthuSec_ = other.highLengthuSec_;
+ controlTiming_ = other.controlTiming_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public DispenserConfig Clone() {
+ return new DispenserConfig(this);
+ }
+
+ /// <summary>Field number for the "DispenserCapacity" field.</summary>
+ public const int DispenserCapacityFieldNumber = 1;
+ private int dispenserCapacity_;
+ /// <summary>
+ ///milliliters
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DispenserCapacity {
+ get { return dispenserCapacity_; }
+ set {
+ dispenserCapacity_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MidTankCapacity" field.</summary>
+ public const int MidTankCapacityFieldNumber = 2;
+ private int midTankCapacity_;
+ /// <summary>
+ ///milliliters
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int MidTankCapacity {
+ get { return midTankCapacity_; }
+ set {
+ midTankCapacity_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "FlowPerPulseNl" field.</summary>
+ public const int FlowPerPulseNlFieldNumber = 3;
+ private double flowPerPulseNl_;
+ /// <summary>
+ ///nanoliter per step , uStep = 1
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double FlowPerPulseNl {
+ get { return flowPerPulseNl_; }
+ set {
+ flowPerPulseNl_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MinFreq" field.</summary>
+ public const int MinFreqFieldNumber = 4;
+ private uint minFreq_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MinFreq {
+ get { return minFreq_; }
+ set {
+ minFreq_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MaxFreq" field.</summary>
+ public const int MaxFreqFieldNumber = 5;
+ private uint maxFreq_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MaxFreq {
+ get { return maxFreq_; }
+ set {
+ maxFreq_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MinmicroStep" field.</summary>
+ public const int MinmicroStepFieldNumber = 6;
+ private uint minmicroStep_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MinmicroStep {
+ get { return minmicroStep_; }
+ set {
+ minmicroStep_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MaxmicroStep" field.</summary>
+ public const int MaxmicroStepFieldNumber = 7;
+ private uint maxmicroStep_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MaxmicroStep {
+ get { return maxmicroStep_; }
+ set {
+ maxmicroStep_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "CorrectionGain" field.</summary>
+ public const int CorrectionGainFieldNumber = 8;
+ private double correctionGain_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double CorrectionGain {
+ get { return correctionGain_; }
+ set {
+ correctionGain_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Ratio2DryerSpeed" field.</summary>
+ public const int Ratio2DryerSpeedFieldNumber = 9;
+ private double ratio2DryerSpeed_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Ratio2DryerSpeed {
+ get { return ratio2DryerSpeed_; }
+ set {
+ ratio2DryerSpeed_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Kp" field.</summary>
+ public const int KpFieldNumber = 10;
+ private double kp_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Kp {
+ get { return kp_; }
+ set {
+ kp_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Ki" field.</summary>
+ public const int KiFieldNumber = 11;
+ private double ki_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Ki {
+ get { return ki_; }
+ set {
+ ki_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Kd" field.</summary>
+ public const int KdFieldNumber = 12;
+ private double kd_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double Kd {
+ get { return kd_; }
+ set {
+ kd_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ChangeSlope" field.</summary>
+ public const int ChangeSlopeFieldNumber = 13;
+ private double changeSlope_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double ChangeSlope {
+ get { return changeSlope_; }
+ set {
+ changeSlope_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "HighLengthuSec" field.</summary>
+ public const int HighLengthuSecFieldNumber = 14;
+ private double highLengthuSec_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public double HighLengthuSec {
+ get { return highLengthuSec_; }
+ set {
+ highLengthuSec_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ControlTiming" field.</summary>
+ public const int ControlTimingFieldNumber = 15;
+ private int controlTiming_;
+ /// <summary>
+ ///10-100-1000 milliseconds
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ControlTiming {
+ get { return controlTiming_; }
+ set {
+ controlTiming_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as DispenserConfig);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(DispenserConfig other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (DispenserCapacity != other.DispenserCapacity) return false;
+ if (MidTankCapacity != other.MidTankCapacity) return false;
+ if (FlowPerPulseNl != other.FlowPerPulseNl) return false;
+ if (MinFreq != other.MinFreq) return false;
+ if (MaxFreq != other.MaxFreq) return false;
+ if (MinmicroStep != other.MinmicroStep) return false;
+ if (MaxmicroStep != other.MaxmicroStep) return false;
+ if (CorrectionGain != other.CorrectionGain) return false;
+ if (Ratio2DryerSpeed != other.Ratio2DryerSpeed) return false;
+ if (Kp != other.Kp) return false;
+ if (Ki != other.Ki) return false;
+ if (Kd != other.Kd) return false;
+ if (ChangeSlope != other.ChangeSlope) return false;
+ if (HighLengthuSec != other.HighLengthuSec) return false;
+ if (ControlTiming != other.ControlTiming) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (DispenserCapacity != 0) hash ^= DispenserCapacity.GetHashCode();
+ if (MidTankCapacity != 0) hash ^= MidTankCapacity.GetHashCode();
+ if (FlowPerPulseNl != 0D) hash ^= FlowPerPulseNl.GetHashCode();
+ if (MinFreq != 0) hash ^= MinFreq.GetHashCode();
+ if (MaxFreq != 0) hash ^= MaxFreq.GetHashCode();
+ if (MinmicroStep != 0) hash ^= MinmicroStep.GetHashCode();
+ if (MaxmicroStep != 0) hash ^= MaxmicroStep.GetHashCode();
+ if (CorrectionGain != 0D) hash ^= CorrectionGain.GetHashCode();
+ if (Ratio2DryerSpeed != 0D) hash ^= Ratio2DryerSpeed.GetHashCode();
+ if (Kp != 0D) hash ^= Kp.GetHashCode();
+ if (Ki != 0D) hash ^= Ki.GetHashCode();
+ if (Kd != 0D) hash ^= Kd.GetHashCode();
+ if (ChangeSlope != 0D) hash ^= ChangeSlope.GetHashCode();
+ if (HighLengthuSec != 0D) hash ^= HighLengthuSec.GetHashCode();
+ if (ControlTiming != 0) hash ^= ControlTiming.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 (DispenserCapacity != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(DispenserCapacity);
+ }
+ if (MidTankCapacity != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(MidTankCapacity);
+ }
+ if (FlowPerPulseNl != 0D) {
+ output.WriteRawTag(25);
+ output.WriteDouble(FlowPerPulseNl);
+ }
+ if (MinFreq != 0) {
+ output.WriteRawTag(32);
+ output.WriteUInt32(MinFreq);
+ }
+ if (MaxFreq != 0) {
+ output.WriteRawTag(40);
+ output.WriteUInt32(MaxFreq);
+ }
+ if (MinmicroStep != 0) {
+ output.WriteRawTag(48);
+ output.WriteUInt32(MinmicroStep);
+ }
+ if (MaxmicroStep != 0) {
+ output.WriteRawTag(56);
+ output.WriteUInt32(MaxmicroStep);
+ }
+ if (CorrectionGain != 0D) {
+ output.WriteRawTag(65);
+ output.WriteDouble(CorrectionGain);
+ }
+ if (Ratio2DryerSpeed != 0D) {
+ output.WriteRawTag(73);
+ output.WriteDouble(Ratio2DryerSpeed);
+ }
+ if (Kp != 0D) {
+ output.WriteRawTag(81);
+ output.WriteDouble(Kp);
+ }
+ if (Ki != 0D) {
+ output.WriteRawTag(89);
+ output.WriteDouble(Ki);
+ }
+ if (Kd != 0D) {
+ output.WriteRawTag(97);
+ output.WriteDouble(Kd);
+ }
+ if (ChangeSlope != 0D) {
+ output.WriteRawTag(105);
+ output.WriteDouble(ChangeSlope);
+ }
+ if (HighLengthuSec != 0D) {
+ output.WriteRawTag(113);
+ output.WriteDouble(HighLengthuSec);
+ }
+ if (ControlTiming != 0) {
+ output.WriteRawTag(120);
+ output.WriteInt32(ControlTiming);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (DispenserCapacity != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(DispenserCapacity);
+ }
+ if (MidTankCapacity != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MidTankCapacity);
+ }
+ if (FlowPerPulseNl != 0D) {
+ size += 1 + 8;
+ }
+ if (MinFreq != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinFreq);
+ }
+ if (MaxFreq != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxFreq);
+ }
+ if (MinmicroStep != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinmicroStep);
+ }
+ if (MaxmicroStep != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxmicroStep);
+ }
+ if (CorrectionGain != 0D) {
+ size += 1 + 8;
+ }
+ if (Ratio2DryerSpeed != 0D) {
+ size += 1 + 8;
+ }
+ if (Kp != 0D) {
+ size += 1 + 8;
+ }
+ if (Ki != 0D) {
+ size += 1 + 8;
+ }
+ if (Kd != 0D) {
+ size += 1 + 8;
+ }
+ if (ChangeSlope != 0D) {
+ size += 1 + 8;
+ }
+ if (HighLengthuSec != 0D) {
+ size += 1 + 8;
+ }
+ if (ControlTiming != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(ControlTiming);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(DispenserConfig other) {
+ if (other == null) {
+ return;
+ }
+ if (other.DispenserCapacity != 0) {
+ DispenserCapacity = other.DispenserCapacity;
+ }
+ if (other.MidTankCapacity != 0) {
+ MidTankCapacity = other.MidTankCapacity;
+ }
+ if (other.FlowPerPulseNl != 0D) {
+ FlowPerPulseNl = other.FlowPerPulseNl;
+ }
+ if (other.MinFreq != 0) {
+ MinFreq = other.MinFreq;
+ }
+ if (other.MaxFreq != 0) {
+ MaxFreq = other.MaxFreq;
+ }
+ if (other.MinmicroStep != 0) {
+ MinmicroStep = other.MinmicroStep;
+ }
+ if (other.MaxmicroStep != 0) {
+ MaxmicroStep = other.MaxmicroStep;
+ }
+ if (other.CorrectionGain != 0D) {
+ CorrectionGain = other.CorrectionGain;
+ }
+ if (other.Ratio2DryerSpeed != 0D) {
+ Ratio2DryerSpeed = other.Ratio2DryerSpeed;
+ }
+ if (other.Kp != 0D) {
+ Kp = other.Kp;
+ }
+ if (other.Ki != 0D) {
+ Ki = other.Ki;
+ }
+ if (other.Kd != 0D) {
+ Kd = other.Kd;
+ }
+ if (other.ChangeSlope != 0D) {
+ ChangeSlope = other.ChangeSlope;
+ }
+ if (other.HighLengthuSec != 0D) {
+ HighLengthuSec = other.HighLengthuSec;
+ }
+ if (other.ControlTiming != 0) {
+ ControlTiming = other.ControlTiming;
+ }
+ }
+
+ [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: {
+ DispenserCapacity = input.ReadInt32();
+ break;
+ }
+ case 16: {
+ MidTankCapacity = input.ReadInt32();
+ break;
+ }
+ case 25: {
+ FlowPerPulseNl = input.ReadDouble();
+ break;
+ }
+ case 32: {
+ MinFreq = input.ReadUInt32();
+ break;
+ }
+ case 40: {
+ MaxFreq = input.ReadUInt32();
+ break;
+ }
+ case 48: {
+ MinmicroStep = input.ReadUInt32();
+ break;
+ }
+ case 56: {
+ MaxmicroStep = input.ReadUInt32();
+ break;
+ }
+ case 65: {
+ CorrectionGain = input.ReadDouble();
+ break;
+ }
+ case 73: {
+ Ratio2DryerSpeed = input.ReadDouble();
+ break;
+ }
+ case 81: {
+ Kp = input.ReadDouble();
+ break;
+ }
+ case 89: {
+ Ki = input.ReadDouble();
+ break;
+ }
+ case 97: {
+ Kd = input.ReadDouble();
+ break;
+ }
+ case 105: {
+ ChangeSlope = input.ReadDouble();
+ break;
+ }
+ case 113: {
+ HighLengthuSec = input.ReadDouble();
+ break;
+ }
+ case 120: {
+ ControlTiming = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/InternalWinder.cs b/Software/Visual_Studio/Tango.PMR/Hardware/InternalWinder.cs
new file mode 100644
index 000000000..6050ed4e4
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/InternalWinder.cs
@@ -0,0 +1,245 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: InternalWinder.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.Hardware {
+
+ /// <summary>Holder for reflection information generated from InternalWinder.proto</summary>
+ public static partial class InternalWinderReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for InternalWinder.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static InternalWinderReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChRJbnRlcm5hbFdpbmRlci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJlIogB",
+ "ChRJbnRlcm5hbFdpbmRlckNvbmZpZxIZChFTdGFydE9mZnNldFB1bHNlcxgB",
+ "IAEoDRIYChBTcG9vbEJhY2tpbmdSYXRlGAIgASgNEhsKE1NlZ21lbnRPZmZz",
+ "ZXRQdWxzZXMYAyABKA0SHgoWTWlsbGltZXRlcnNQZXJSb3RhdGlvbhgEIAEo",
+ "DUIeChxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.InternalWinderConfig), global::Tango.PMR.Hardware.InternalWinderConfig.Parser, new[]{ "StartOffsetPulses", "SpoolBackingRate", "SegmentOffsetPulses", "MillimetersPerRotation" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class InternalWinderConfig : pb::IMessage<InternalWinderConfig> {
+ private static readonly pb::MessageParser<InternalWinderConfig> _parser = new pb::MessageParser<InternalWinderConfig>(() => new InternalWinderConfig());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<InternalWinderConfig> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Hardware.InternalWinderReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public InternalWinderConfig() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public InternalWinderConfig(InternalWinderConfig other) : this() {
+ startOffsetPulses_ = other.startOffsetPulses_;
+ spoolBackingRate_ = other.spoolBackingRate_;
+ segmentOffsetPulses_ = other.segmentOffsetPulses_;
+ millimetersPerRotation_ = other.millimetersPerRotation_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public InternalWinderConfig Clone() {
+ return new InternalWinderConfig(this);
+ }
+
+ /// <summary>Field number for the "StartOffsetPulses" field.</summary>
+ public const int StartOffsetPulsesFieldNumber = 1;
+ private uint startOffsetPulses_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint StartOffsetPulses {
+ get { return startOffsetPulses_; }
+ set {
+ startOffsetPulses_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SpoolBackingRate" field.</summary>
+ public const int SpoolBackingRateFieldNumber = 2;
+ private uint spoolBackingRate_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint SpoolBackingRate {
+ get { return spoolBackingRate_; }
+ set {
+ spoolBackingRate_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SegmentOffsetPulses" field.</summary>
+ public const int SegmentOffsetPulsesFieldNumber = 3;
+ private uint segmentOffsetPulses_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint SegmentOffsetPulses {
+ get { return segmentOffsetPulses_; }
+ set {
+ segmentOffsetPulses_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MillimetersPerRotation" field.</summary>
+ public const int MillimetersPerRotationFieldNumber = 4;
+ private uint millimetersPerRotation_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public uint MillimetersPerRotation {
+ get { return millimetersPerRotation_; }
+ set {
+ millimetersPerRotation_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as InternalWinderConfig);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(InternalWinderConfig other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (StartOffsetPulses != other.StartOffsetPulses) return false;
+ if (SpoolBackingRate != other.SpoolBackingRate) return false;
+ if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false;
+ if (MillimetersPerRotation != other.MillimetersPerRotation) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (StartOffsetPulses != 0) hash ^= StartOffsetPulses.GetHashCode();
+ if (SpoolBackingRate != 0) hash ^= SpoolBackingRate.GetHashCode();
+ if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode();
+ if (MillimetersPerRotation != 0) hash ^= MillimetersPerRotation.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 (StartOffsetPulses != 0) {
+ output.WriteRawTag(8);
+ output.WriteUInt32(StartOffsetPulses);
+ }
+ if (SpoolBackingRate != 0) {
+ output.WriteRawTag(16);
+ output.WriteUInt32(SpoolBackingRate);
+ }
+ if (SegmentOffsetPulses != 0) {
+ output.WriteRawTag(24);
+ output.WriteUInt32(SegmentOffsetPulses);
+ }
+ if (MillimetersPerRotation != 0) {
+ output.WriteRawTag(32);
+ output.WriteUInt32(MillimetersPerRotation);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (StartOffsetPulses != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StartOffsetPulses);
+ }
+ if (SpoolBackingRate != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SpoolBackingRate);
+ }
+ if (SegmentOffsetPulses != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SegmentOffsetPulses);
+ }
+ if (MillimetersPerRotation != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MillimetersPerRotation);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(InternalWinderConfig other) {
+ if (other == null) {
+ return;
+ }
+ if (other.StartOffsetPulses != 0) {
+ StartOffsetPulses = other.StartOffsetPulses;
+ }
+ if (other.SpoolBackingRate != 0) {
+ SpoolBackingRate = other.SpoolBackingRate;
+ }
+ if (other.SegmentOffsetPulses != 0) {
+ SegmentOffsetPulses = other.SegmentOffsetPulses;
+ }
+ if (other.MillimetersPerRotation != 0) {
+ MillimetersPerRotation = other.MillimetersPerRotation;
+ }
+ }
+
+ [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: {
+ StartOffsetPulses = input.ReadUInt32();
+ break;
+ }
+ case 16: {
+ SpoolBackingRate = input.ReadUInt32();
+ break;
+ }
+ case 24: {
+ SegmentOffsetPulses = input.ReadUInt32();
+ break;
+ }
+ case 32: {
+ MillimetersPerRotation = input.ReadUInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Motor.cs b/Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs
index b0ce0abe2..28659d7af 100644
--- a/Software/Visual_Studio/Tango.PMR/Jobs/Motor.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs
@@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: motor.proto
+// source: Motor.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@@ -7,13 +7,13 @@ 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.Jobs {
+namespace Tango.PMR.Hardware {
- /// <summary>Holder for reflection information generated from motor.proto</summary>
+ /// <summary>Holder for reflection information generated from Motor.proto</summary>
public static partial class MotorReflection {
#region Descriptor
- /// <summary>File descriptor for motor.proto</summary>
+ /// <summary>File descriptor for Motor.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
@@ -22,20 +22,21 @@ namespace Tango.PMR.Jobs {
static MotorReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "Cgttb3Rvci5wcm90bxIOVGFuZ28uUE1SLkpvYnMisAIKC01vdG9yQ29uZmln",
- "EiMKAklkGAEgASgOMhcuVGFuZ28uUE1SLkpvYnMuTW90b3JJZBIPCgdtaW5m",
- "cmVxGAIgASgNEg8KB21heGZyZXEYAyABKA0SFAoMbWlubWljcm9zdGVwGAQg",
- "ASgNEhQKDG1heG1pY3Jvc3RlcBgFIAEoDRITCgtsaW5lYXJyYXRpbxgGIAEo",
- "ARIWCg5tZWRpYW5wb3NpdGlvbhgHIAEoDRIWCg5jb3JyZWN0aW9uZ2FpbhgI",
- "IAEoARIXCg9yYXRpb24yZHJ5ZXJzcGQYCSABKAESCgoCS3AYCiABKAESCgoC",
- "S2kYCyABKAESCgoCS2QYDCABKAESEwoLY2hhbmdlU2xvcGUYDSABKAESFwoP",
- "aGlnaHRpbWVvdXRtU2VjGA4gASgBKjgKB01vdG9ySWQSCgoGRmVlZGVyEAAS",
- "CQoFRHJ5ZXIQARIKCgZQb29sZXIQAhIKCgZXaW5kZXIQA0IaChhjb20udHdp",
- "bmUudGFuZ28ucG1yLmpvYnNiBnByb3RvMw=="));
+ "CgtNb3Rvci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJlIskCCgtNb3RvckNv",
+ "bmZpZxInCgJJZBgBIAEoDjIbLlRhbmdvLlBNUi5IYXJkd2FyZS5Nb3Rvcklk",
+ "Eg8KB01pbkZyZXEYAiABKA0SDwoHTWF4RnJlcRgDIAEoDRIUCgxNaW5taWNy",
+ "b1N0ZXAYBCABKA0SFAoMTWF4bWljcm9TdGVwGAUgASgNEhMKC0xpbmVhclJh",
+ "dGlvGAYgASgBEhYKDk1lZGlhblBvc2l0aW9uGAcgASgNEhYKDkNvcnJlY3Rp",
+ "b25HYWluGAggASgBEhgKEFJhdGlvMkRyeWVyU3BlZWQYCSABKAESCgoCS3AY",
+ "CiABKAESCgoCS2kYCyABKAESCgoCS2QYDCABKAESEwoLQ2hhbmdlU2xvcGUY",
+ "DSABKAESFgoOSGlnaExlbmd0aHVTZWMYDiABKAESEwoLU3BlZWRLZWVwZXIY",
+ "DyABKAgqOAoHTW90b3JJZBIKCgZGZWVkZXIQABIJCgVEcnllchABEgoKBlBv",
+ "b2xlchACEgoKBldpbmRlchADQh4KHGNvbS50d2luZS50YW5nby5wbXIuaGFy",
+ "ZHdhcmViBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
- new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Jobs.MotorId), }, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.MotorConfig), global::Tango.PMR.Jobs.MotorConfig.Parser, new[]{ "Id", "Minfreq", "Maxfreq", "Minmicrostep", "Maxmicrostep", "Linearratio", "Medianposition", "Correctiongain", "Ration2Dryerspd", "Kp", "Ki", "Kd", "ChangeSlope", "HightimeoutmSec" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.MotorId), }, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.MotorConfig), global::Tango.PMR.Hardware.MotorConfig.Parser, new[]{ "Id", "MinFreq", "MaxFreq", "MinmicroStep", "MaxmicroStep", "LinearRatio", "MedianPosition", "CorrectionGain", "Ratio2DryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthuSec", "SpeedKeeper" }, null, null, null)
}));
}
#endregion
@@ -59,7 +60,7 @@ namespace Tango.PMR.Jobs {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
- get { return global::Tango.PMR.Jobs.MotorReflection.Descriptor.MessageTypes[0]; }
+ get { return global::Tango.PMR.Hardware.MotorReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -77,19 +78,20 @@ namespace Tango.PMR.Jobs {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MotorConfig(MotorConfig other) : this() {
id_ = other.id_;
- minfreq_ = other.minfreq_;
- maxfreq_ = other.maxfreq_;
- minmicrostep_ = other.minmicrostep_;
- maxmicrostep_ = other.maxmicrostep_;
- linearratio_ = other.linearratio_;
- medianposition_ = other.medianposition_;
- correctiongain_ = other.correctiongain_;
- ration2Dryerspd_ = other.ration2Dryerspd_;
+ minFreq_ = other.minFreq_;
+ maxFreq_ = other.maxFreq_;
+ minmicroStep_ = other.minmicroStep_;
+ maxmicroStep_ = other.maxmicroStep_;
+ linearRatio_ = other.linearRatio_;
+ medianPosition_ = other.medianPosition_;
+ correctionGain_ = other.correctionGain_;
+ ratio2DryerSpeed_ = other.ratio2DryerSpeed_;
kp_ = other.kp_;
ki_ = other.ki_;
kd_ = other.kd_;
changeSlope_ = other.changeSlope_;
- hightimeoutmSec_ = other.hightimeoutmSec_;
+ highLengthuSec_ = other.highLengthuSec_;
+ speedKeeper_ = other.speedKeeper_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -99,100 +101,100 @@ namespace Tango.PMR.Jobs {
/// <summary>Field number for the "Id" field.</summary>
public const int IdFieldNumber = 1;
- private global::Tango.PMR.Jobs.MotorId id_ = 0;
+ private global::Tango.PMR.Hardware.MotorId id_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Tango.PMR.Jobs.MotorId Id {
+ public global::Tango.PMR.Hardware.MotorId Id {
get { return id_; }
set {
id_ = value;
}
}
- /// <summary>Field number for the "minfreq" field.</summary>
- public const int MinfreqFieldNumber = 2;
- private uint minfreq_;
+ /// <summary>Field number for the "MinFreq" field.</summary>
+ public const int MinFreqFieldNumber = 2;
+ private uint minFreq_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Minfreq {
- get { return minfreq_; }
+ public uint MinFreq {
+ get { return minFreq_; }
set {
- minfreq_ = value;
+ minFreq_ = value;
}
}
- /// <summary>Field number for the "maxfreq" field.</summary>
- public const int MaxfreqFieldNumber = 3;
- private uint maxfreq_;
+ /// <summary>Field number for the "MaxFreq" field.</summary>
+ public const int MaxFreqFieldNumber = 3;
+ private uint maxFreq_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Maxfreq {
- get { return maxfreq_; }
+ public uint MaxFreq {
+ get { return maxFreq_; }
set {
- maxfreq_ = value;
+ maxFreq_ = value;
}
}
- /// <summary>Field number for the "minmicrostep" field.</summary>
- public const int MinmicrostepFieldNumber = 4;
- private uint minmicrostep_;
+ /// <summary>Field number for the "MinmicroStep" field.</summary>
+ public const int MinmicroStepFieldNumber = 4;
+ private uint minmicroStep_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Minmicrostep {
- get { return minmicrostep_; }
+ public uint MinmicroStep {
+ get { return minmicroStep_; }
set {
- minmicrostep_ = value;
+ minmicroStep_ = value;
}
}
- /// <summary>Field number for the "maxmicrostep" field.</summary>
- public const int MaxmicrostepFieldNumber = 5;
- private uint maxmicrostep_;
+ /// <summary>Field number for the "MaxmicroStep" field.</summary>
+ public const int MaxmicroStepFieldNumber = 5;
+ private uint maxmicroStep_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Maxmicrostep {
- get { return maxmicrostep_; }
+ public uint MaxmicroStep {
+ get { return maxmicroStep_; }
set {
- maxmicrostep_ = value;
+ maxmicroStep_ = value;
}
}
- /// <summary>Field number for the "linearratio" field.</summary>
- public const int LinearratioFieldNumber = 6;
- private double linearratio_;
+ /// <summary>Field number for the "LinearRatio" field.</summary>
+ public const int LinearRatioFieldNumber = 6;
+ private double linearRatio_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Linearratio {
- get { return linearratio_; }
+ public double LinearRatio {
+ get { return linearRatio_; }
set {
- linearratio_ = value;
+ linearRatio_ = value;
}
}
- /// <summary>Field number for the "medianposition" field.</summary>
- public const int MedianpositionFieldNumber = 7;
- private uint medianposition_;
+ /// <summary>Field number for the "MedianPosition" field.</summary>
+ public const int MedianPositionFieldNumber = 7;
+ private uint medianPosition_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint Medianposition {
- get { return medianposition_; }
+ public uint MedianPosition {
+ get { return medianPosition_; }
set {
- medianposition_ = value;
+ medianPosition_ = value;
}
}
- /// <summary>Field number for the "correctiongain" field.</summary>
- public const int CorrectiongainFieldNumber = 8;
- private double correctiongain_;
+ /// <summary>Field number for the "CorrectionGain" field.</summary>
+ public const int CorrectionGainFieldNumber = 8;
+ private double correctionGain_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Correctiongain {
- get { return correctiongain_; }
+ public double CorrectionGain {
+ get { return correctionGain_; }
set {
- correctiongain_ = value;
+ correctionGain_ = value;
}
}
- /// <summary>Field number for the "ration2dryerspd" field.</summary>
- public const int Ration2DryerspdFieldNumber = 9;
- private double ration2Dryerspd_;
+ /// <summary>Field number for the "Ratio2DryerSpeed" field.</summary>
+ public const int Ratio2DryerSpeedFieldNumber = 9;
+ private double ratio2DryerSpeed_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Ration2Dryerspd {
- get { return ration2Dryerspd_; }
+ public double Ratio2DryerSpeed {
+ get { return ratio2DryerSpeed_; }
set {
- ration2Dryerspd_ = value;
+ ratio2DryerSpeed_ = value;
}
}
@@ -229,7 +231,7 @@ namespace Tango.PMR.Jobs {
}
}
- /// <summary>Field number for the "changeSlope" field.</summary>
+ /// <summary>Field number for the "ChangeSlope" field.</summary>
public const int ChangeSlopeFieldNumber = 13;
private double changeSlope_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -240,14 +242,28 @@ namespace Tango.PMR.Jobs {
}
}
- /// <summary>Field number for the "hightimeoutmSec" field.</summary>
- public const int HightimeoutmSecFieldNumber = 14;
- private double hightimeoutmSec_;
+ /// <summary>Field number for the "HighLengthuSec" field.</summary>
+ public const int HighLengthuSecFieldNumber = 14;
+ private double highLengthuSec_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double HightimeoutmSec {
- get { return hightimeoutmSec_; }
+ public double HighLengthuSec {
+ get { return highLengthuSec_; }
set {
- hightimeoutmSec_ = value;
+ highLengthuSec_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SpeedKeeper" field.</summary>
+ public const int SpeedKeeperFieldNumber = 15;
+ private bool speedKeeper_;
+ /// <summary>
+ ///one motor is setting the speed for the whole system.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool SpeedKeeper {
+ get { return speedKeeper_; }
+ set {
+ speedKeeper_ = value;
}
}
@@ -265,19 +281,20 @@ namespace Tango.PMR.Jobs {
return true;
}
if (Id != other.Id) return false;
- if (Minfreq != other.Minfreq) return false;
- if (Maxfreq != other.Maxfreq) return false;
- if (Minmicrostep != other.Minmicrostep) return false;
- if (Maxmicrostep != other.Maxmicrostep) return false;
- if (Linearratio != other.Linearratio) return false;
- if (Medianposition != other.Medianposition) return false;
- if (Correctiongain != other.Correctiongain) return false;
- if (Ration2Dryerspd != other.Ration2Dryerspd) return false;
+ if (MinFreq != other.MinFreq) return false;
+ if (MaxFreq != other.MaxFreq) return false;
+ if (MinmicroStep != other.MinmicroStep) return false;
+ if (MaxmicroStep != other.MaxmicroStep) return false;
+ if (LinearRatio != other.LinearRatio) return false;
+ if (MedianPosition != other.MedianPosition) return false;
+ if (CorrectionGain != other.CorrectionGain) return false;
+ if (Ratio2DryerSpeed != other.Ratio2DryerSpeed) return false;
if (Kp != other.Kp) return false;
if (Ki != other.Ki) return false;
if (Kd != other.Kd) return false;
if (ChangeSlope != other.ChangeSlope) return false;
- if (HightimeoutmSec != other.HightimeoutmSec) return false;
+ if (HighLengthuSec != other.HighLengthuSec) return false;
+ if (SpeedKeeper != other.SpeedKeeper) return false;
return true;
}
@@ -285,19 +302,20 @@ namespace Tango.PMR.Jobs {
public override int GetHashCode() {
int hash = 1;
if (Id != 0) hash ^= Id.GetHashCode();
- if (Minfreq != 0) hash ^= Minfreq.GetHashCode();
- if (Maxfreq != 0) hash ^= Maxfreq.GetHashCode();
- if (Minmicrostep != 0) hash ^= Minmicrostep.GetHashCode();
- if (Maxmicrostep != 0) hash ^= Maxmicrostep.GetHashCode();
- if (Linearratio != 0D) hash ^= Linearratio.GetHashCode();
- if (Medianposition != 0) hash ^= Medianposition.GetHashCode();
- if (Correctiongain != 0D) hash ^= Correctiongain.GetHashCode();
- if (Ration2Dryerspd != 0D) hash ^= Ration2Dryerspd.GetHashCode();
+ if (MinFreq != 0) hash ^= MinFreq.GetHashCode();
+ if (MaxFreq != 0) hash ^= MaxFreq.GetHashCode();
+ if (MinmicroStep != 0) hash ^= MinmicroStep.GetHashCode();
+ if (MaxmicroStep != 0) hash ^= MaxmicroStep.GetHashCode();
+ if (LinearRatio != 0D) hash ^= LinearRatio.GetHashCode();
+ if (MedianPosition != 0) hash ^= MedianPosition.GetHashCode();
+ if (CorrectionGain != 0D) hash ^= CorrectionGain.GetHashCode();
+ if (Ratio2DryerSpeed != 0D) hash ^= Ratio2DryerSpeed.GetHashCode();
if (Kp != 0D) hash ^= Kp.GetHashCode();
if (Ki != 0D) hash ^= Ki.GetHashCode();
if (Kd != 0D) hash ^= Kd.GetHashCode();
if (ChangeSlope != 0D) hash ^= ChangeSlope.GetHashCode();
- if (HightimeoutmSec != 0D) hash ^= HightimeoutmSec.GetHashCode();
+ if (HighLengthuSec != 0D) hash ^= HighLengthuSec.GetHashCode();
+ if (SpeedKeeper != false) hash ^= SpeedKeeper.GetHashCode();
return hash;
}
@@ -312,37 +330,37 @@ namespace Tango.PMR.Jobs {
output.WriteRawTag(8);
output.WriteEnum((int) Id);
}
- if (Minfreq != 0) {
+ if (MinFreq != 0) {
output.WriteRawTag(16);
- output.WriteUInt32(Minfreq);
+ output.WriteUInt32(MinFreq);
}
- if (Maxfreq != 0) {
+ if (MaxFreq != 0) {
output.WriteRawTag(24);
- output.WriteUInt32(Maxfreq);
+ output.WriteUInt32(MaxFreq);
}
- if (Minmicrostep != 0) {
+ if (MinmicroStep != 0) {
output.WriteRawTag(32);
- output.WriteUInt32(Minmicrostep);
+ output.WriteUInt32(MinmicroStep);
}
- if (Maxmicrostep != 0) {
+ if (MaxmicroStep != 0) {
output.WriteRawTag(40);
- output.WriteUInt32(Maxmicrostep);
+ output.WriteUInt32(MaxmicroStep);
}
- if (Linearratio != 0D) {
+ if (LinearRatio != 0D) {
output.WriteRawTag(49);
- output.WriteDouble(Linearratio);
+ output.WriteDouble(LinearRatio);
}
- if (Medianposition != 0) {
+ if (MedianPosition != 0) {
output.WriteRawTag(56);
- output.WriteUInt32(Medianposition);
+ output.WriteUInt32(MedianPosition);
}
- if (Correctiongain != 0D) {
+ if (CorrectionGain != 0D) {
output.WriteRawTag(65);
- output.WriteDouble(Correctiongain);
+ output.WriteDouble(CorrectionGain);
}
- if (Ration2Dryerspd != 0D) {
+ if (Ratio2DryerSpeed != 0D) {
output.WriteRawTag(73);
- output.WriteDouble(Ration2Dryerspd);
+ output.WriteDouble(Ratio2DryerSpeed);
}
if (Kp != 0D) {
output.WriteRawTag(81);
@@ -360,9 +378,13 @@ namespace Tango.PMR.Jobs {
output.WriteRawTag(105);
output.WriteDouble(ChangeSlope);
}
- if (HightimeoutmSec != 0D) {
+ if (HighLengthuSec != 0D) {
output.WriteRawTag(113);
- output.WriteDouble(HightimeoutmSec);
+ output.WriteDouble(HighLengthuSec);
+ }
+ if (SpeedKeeper != false) {
+ output.WriteRawTag(120);
+ output.WriteBool(SpeedKeeper);
}
}
@@ -372,28 +394,28 @@ namespace Tango.PMR.Jobs {
if (Id != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Id);
}
- if (Minfreq != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Minfreq);
+ if (MinFreq != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinFreq);
}
- if (Maxfreq != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Maxfreq);
+ if (MaxFreq != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxFreq);
}
- if (Minmicrostep != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Minmicrostep);
+ if (MinmicroStep != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinmicroStep);
}
- if (Maxmicrostep != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Maxmicrostep);
+ if (MaxmicroStep != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxmicroStep);
}
- if (Linearratio != 0D) {
+ if (LinearRatio != 0D) {
size += 1 + 8;
}
- if (Medianposition != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Medianposition);
+ if (MedianPosition != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MedianPosition);
}
- if (Correctiongain != 0D) {
+ if (CorrectionGain != 0D) {
size += 1 + 8;
}
- if (Ration2Dryerspd != 0D) {
+ if (Ratio2DryerSpeed != 0D) {
size += 1 + 8;
}
if (Kp != 0D) {
@@ -408,9 +430,12 @@ namespace Tango.PMR.Jobs {
if (ChangeSlope != 0D) {
size += 1 + 8;
}
- if (HightimeoutmSec != 0D) {
+ if (HighLengthuSec != 0D) {
size += 1 + 8;
}
+ if (SpeedKeeper != false) {
+ size += 1 + 1;
+ }
return size;
}
@@ -422,29 +447,29 @@ namespace Tango.PMR.Jobs {
if (other.Id != 0) {
Id = other.Id;
}
- if (other.Minfreq != 0) {
- Minfreq = other.Minfreq;
+ if (other.MinFreq != 0) {
+ MinFreq = other.MinFreq;
}
- if (other.Maxfreq != 0) {
- Maxfreq = other.Maxfreq;
+ if (other.MaxFreq != 0) {
+ MaxFreq = other.MaxFreq;
}
- if (other.Minmicrostep != 0) {
- Minmicrostep = other.Minmicrostep;
+ if (other.MinmicroStep != 0) {
+ MinmicroStep = other.MinmicroStep;
}
- if (other.Maxmicrostep != 0) {
- Maxmicrostep = other.Maxmicrostep;
+ if (other.MaxmicroStep != 0) {
+ MaxmicroStep = other.MaxmicroStep;
}
- if (other.Linearratio != 0D) {
- Linearratio = other.Linearratio;
+ if (other.LinearRatio != 0D) {
+ LinearRatio = other.LinearRatio;
}
- if (other.Medianposition != 0) {
- Medianposition = other.Medianposition;
+ if (other.MedianPosition != 0) {
+ MedianPosition = other.MedianPosition;
}
- if (other.Correctiongain != 0D) {
- Correctiongain = other.Correctiongain;
+ if (other.CorrectionGain != 0D) {
+ CorrectionGain = other.CorrectionGain;
}
- if (other.Ration2Dryerspd != 0D) {
- Ration2Dryerspd = other.Ration2Dryerspd;
+ if (other.Ratio2DryerSpeed != 0D) {
+ Ratio2DryerSpeed = other.Ratio2DryerSpeed;
}
if (other.Kp != 0D) {
Kp = other.Kp;
@@ -458,8 +483,11 @@ namespace Tango.PMR.Jobs {
if (other.ChangeSlope != 0D) {
ChangeSlope = other.ChangeSlope;
}
- if (other.HightimeoutmSec != 0D) {
- HightimeoutmSec = other.HightimeoutmSec;
+ if (other.HighLengthuSec != 0D) {
+ HighLengthuSec = other.HighLengthuSec;
+ }
+ if (other.SpeedKeeper != false) {
+ SpeedKeeper = other.SpeedKeeper;
}
}
@@ -472,39 +500,39 @@ namespace Tango.PMR.Jobs {
input.SkipLastField();
break;
case 8: {
- id_ = (global::Tango.PMR.Jobs.MotorId) input.ReadEnum();
+ id_ = (global::Tango.PMR.Hardware.MotorId) input.ReadEnum();
break;
}
case 16: {
- Minfreq = input.ReadUInt32();
+ MinFreq = input.ReadUInt32();
break;
}
case 24: {
- Maxfreq = input.ReadUInt32();
+ MaxFreq = input.ReadUInt32();
break;
}
case 32: {
- Minmicrostep = input.ReadUInt32();
+ MinmicroStep = input.ReadUInt32();
break;
}
case 40: {
- Maxmicrostep = input.ReadUInt32();
+ MaxmicroStep = input.ReadUInt32();
break;
}
case 49: {
- Linearratio = input.ReadDouble();
+ LinearRatio = input.ReadDouble();
break;
}
case 56: {
- Medianposition = input.ReadUInt32();
+ MedianPosition = input.ReadUInt32();
break;
}
case 65: {
- Correctiongain = input.ReadDouble();
+ CorrectionGain = input.ReadDouble();
break;
}
case 73: {
- Ration2Dryerspd = input.ReadDouble();
+ Ratio2DryerSpeed = input.ReadDouble();
break;
}
case 81: {
@@ -524,7 +552,11 @@ namespace Tango.PMR.Jobs {
break;
}
case 113: {
- HightimeoutmSec = input.ReadDouble();
+ HighLengthuSec = input.ReadDouble();
+ break;
+ }
+ case 120: {
+ SpeedKeeper = input.ReadBool();
break;
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/PIDCluster.cs b/Software/Visual_Studio/Tango.PMR/Hardware/PIDCluster.cs
new file mode 100644
index 000000000..3d0c07360
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/PIDCluster.cs
@@ -0,0 +1,303 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: PIDCluster.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.Hardware {
+
+ /// <summary>Holder for reflection information generated from PIDCluster.proto</summary>
+ public static partial class PIDClusterReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for PIDCluster.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static PIDClusterReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChBQSURDbHVzdGVyLnByb3RvEhJUYW5nby5QTVIuSGFyZHdhcmUaEFBJRENv",
+ "bnRyb2wucHJvdG8i0AEKClBJRENsdXN0ZXISDAoETmFtZRgBIAEoCRIuCgdN",
+ "ZW1iZXIxGAIgASgOMh0uVGFuZ28uUE1SLkhhcmR3YXJlLkNvbnRyb2xJZBIu",
+ "CgdNZW1iZXIyGAMgASgOMh0uVGFuZ28uUE1SLkhhcmR3YXJlLkNvbnRyb2xJ",
+ "ZBIYChBDbHVzdGVyQ3ljbGVUaW1lGAQgASgCEiMKG01lbWJlcjFQb3dlckxp",
+ "bWl0UGVyY2VudGFnZRgFIAEoAhIVCg1DbHVzdGVyQWN0aXZlGAYgASgIQh4K",
+ "HGNvbS50d2luZS50YW5nby5wbXIuaGFyZHdhcmViBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.PIDControlReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.PIDCluster), global::Tango.PMR.Hardware.PIDCluster.Parser, new[]{ "Name", "Member1", "Member2", "ClusterCycleTime", "Member1PowerLimitPercentage", "ClusterActive" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class PIDCluster : pb::IMessage<PIDCluster> {
+ private static readonly pb::MessageParser<PIDCluster> _parser = new pb::MessageParser<PIDCluster>(() => new PIDCluster());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<PIDCluster> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Hardware.PIDClusterReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PIDCluster() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PIDCluster(PIDCluster other) : this() {
+ name_ = other.name_;
+ member1_ = other.member1_;
+ member2_ = other.member2_;
+ clusterCycleTime_ = other.clusterCycleTime_;
+ member1PowerLimitPercentage_ = other.member1PowerLimitPercentage_;
+ clusterActive_ = other.clusterActive_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PIDCluster Clone() {
+ return new PIDCluster(this);
+ }
+
+ /// <summary>Field number for the "Name" field.</summary>
+ public const int NameFieldNumber = 1;
+ private string name_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Name {
+ get { return name_; }
+ set {
+ name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "Member1" field.</summary>
+ public const int Member1FieldNumber = 2;
+ private global::Tango.PMR.Hardware.ControlId member1_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Hardware.ControlId Member1 {
+ get { return member1_; }
+ set {
+ member1_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Member2" field.</summary>
+ public const int Member2FieldNumber = 3;
+ private global::Tango.PMR.Hardware.ControlId member2_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Hardware.ControlId Member2 {
+ get { return member2_; }
+ set {
+ member2_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ClusterCycleTime" field.</summary>
+ public const int ClusterCycleTimeFieldNumber = 4;
+ private float clusterCycleTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float ClusterCycleTime {
+ get { return clusterCycleTime_; }
+ set {
+ clusterCycleTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Member1PowerLimitPercentage" field.</summary>
+ public const int Member1PowerLimitPercentageFieldNumber = 5;
+ private float member1PowerLimitPercentage_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public float Member1PowerLimitPercentage {
+ get { return member1PowerLimitPercentage_; }
+ set {
+ member1PowerLimitPercentage_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ClusterActive" field.</summary>
+ public const int ClusterActiveFieldNumber = 6;
+ private bool clusterActive_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool ClusterActive {
+ get { return clusterActive_; }
+ set {
+ clusterActive_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as PIDCluster);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(PIDCluster other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Name != other.Name) return false;
+ if (Member1 != other.Member1) return false;
+ if (Member2 != other.Member2) return false;
+ if (ClusterCycleTime != other.ClusterCycleTime) return false;
+ if (Member1PowerLimitPercentage != other.Member1PowerLimitPercentage) return false;
+ if (ClusterActive != other.ClusterActive) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Name.Length != 0) hash ^= Name.GetHashCode();
+ if (Member1 != 0) hash ^= Member1.GetHashCode();
+ if (Member2 != 0) hash ^= Member2.GetHashCode();
+ if (ClusterCycleTime != 0F) hash ^= ClusterCycleTime.GetHashCode();
+ if (Member1PowerLimitPercentage != 0F) hash ^= Member1PowerLimitPercentage.GetHashCode();
+ if (ClusterActive != false) hash ^= ClusterActive.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 (Name.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (Member1 != 0) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) Member1);
+ }
+ if (Member2 != 0) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) Member2);
+ }
+ if (ClusterCycleTime != 0F) {
+ output.WriteRawTag(37);
+ output.WriteFloat(ClusterCycleTime);
+ }
+ if (Member1PowerLimitPercentage != 0F) {
+ output.WriteRawTag(45);
+ output.WriteFloat(Member1PowerLimitPercentage);
+ }
+ if (ClusterActive != false) {
+ output.WriteRawTag(48);
+ output.WriteBool(ClusterActive);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Name.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
+ }
+ if (Member1 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Member1);
+ }
+ if (Member2 != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Member2);
+ }
+ if (ClusterCycleTime != 0F) {
+ size += 1 + 4;
+ }
+ if (Member1PowerLimitPercentage != 0F) {
+ size += 1 + 4;
+ }
+ if (ClusterActive != false) {
+ size += 1 + 1;
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(PIDCluster other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Name.Length != 0) {
+ Name = other.Name;
+ }
+ if (other.Member1 != 0) {
+ Member1 = other.Member1;
+ }
+ if (other.Member2 != 0) {
+ Member2 = other.Member2;
+ }
+ if (other.ClusterCycleTime != 0F) {
+ ClusterCycleTime = other.ClusterCycleTime;
+ }
+ if (other.Member1PowerLimitPercentage != 0F) {
+ Member1PowerLimitPercentage = other.Member1PowerLimitPercentage;
+ }
+ if (other.ClusterActive != false) {
+ ClusterActive = other.ClusterActive;
+ }
+ }
+
+ [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: {
+ Name = input.ReadString();
+ break;
+ }
+ case 16: {
+ member1_ = (global::Tango.PMR.Hardware.ControlId) input.ReadEnum();
+ break;
+ }
+ case 24: {
+ member2_ = (global::Tango.PMR.Hardware.ControlId) input.ReadEnum();
+ break;
+ }
+ case 37: {
+ ClusterCycleTime = input.ReadFloat();
+ break;
+ }
+ case 45: {
+ Member1PowerLimitPercentage = input.ReadFloat();
+ break;
+ }
+ case 48: {
+ ClusterActive = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/PIDControl.cs b/Software/Visual_Studio/Tango.PMR/Hardware/PIDControl.cs
new file mode 100644
index 000000000..053963484
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/PIDControl.cs
@@ -0,0 +1,616 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: PIDControl.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.Hardware {
+
+ /// <summary>Holder for reflection information generated from PIDControl.proto</summary>
+ public static partial class PIDControlReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for PIDControl.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static PIDControlReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChBQSURDb250cm9sLnByb3RvEhJUYW5nby5QTVIuSGFyZHdhcmUinQQKEFBJ",
+ "RENvbnRyb2xDb25maWcSKQoCSWQYASABKA4yHS5UYW5nby5QTVIuSGFyZHdh",
+ "cmUuQ29udHJvbElkEgwKBE5hbWUYAiABKAkSIwobT3V0cHV0UHJvcG9ydGlv",
+ "bmFsQ3ljbGVUaW1lGAMgASgFEiQKHE91dHB1dFByb3BvcnRpb25hbFBvd2Vy",
+ "TGltaXQYBCABKAUSHgoWT3V0cHV0UHJvcG9ydGlvbmFsQmFuZBgFIAEoBRIU",
+ "CgxJbnRlZ3JhbFRpbWUYBiABKAUSFgoORGVyaXZhdGl2ZVRpbWUYByABKAUS",
+ "IgoaU2Vuc29yQ29ycmVjdGlvbkFkanVzdG1lbnQYCCABKAUSIwobU2Vuc29y",
+ "VHlwZWFuZFNldHBvaW50TGltaXRzGAkgASgFEicKH1NldHBvaW50UmFtcFJh",
+ "dGVvclNvZnRTdGFydFJhbXAYCiABKAUSIQoZU2V0cG9pbnRDb250cm9sT3V0",
+ "cHV0UmF0ZRgLIAEoBRIZChFDb250cm9sT3V0cHV0VHlwZRgMIAEoBRIcChRT",
+ "U1JDb250cm9sT3V0cHV0VHlwZRgNIAEoBRIjChtPdXRwdXRPTk9GRkh5c3Rl",
+ "cmVzaXNWYWx1ZXMYDiABKAUSIwobUHJvY2Vzc1ZhcmlhYmxlU2FtcGxpbmdS",
+ "YXRlGA8gASgFEh8KF1BWSW5wdXRGaWx0ZXJGYWN0b3JNb2RlGBAgASgFKo8C",
+ "CglDb250cm9sSWQSFAoQRHJ5ZXJIZWF0ZXIxMDAwdxAAEhQKEERyeWVySGVh",
+ "dGVyMjAwdzEQARIUChBEcnllckhlYXRlcjIwMHcyEAISEAoMSGVhZEhlYXRl",
+ "cloxEAMSEAoMSGVhZEhlYXRlcloyEAQSEAoMSGVhZEhlYXRlclozEAUSEAoM",
+ "SGVhZEhlYXRlclo0EAYSDwoLTWl4ZXJIZWF0ZXIQBxIQCgxXYXN0ZUNvbnRy",
+ "b2wQCBIOCgpNb3RvckRyeWVyEAkSDwoLTW90b3JGZWVkZXIQChIPCgtNb3Rv",
+ "clBvb2xlchALEg8KC01vdG9yV2luZGVyEAwSEgoORHJ5ZXJIZWF0ZXI0MDAQ",
+ "DUIeChxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.ControlId), }, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.PIDControlConfig), global::Tango.PMR.Hardware.PIDControlConfig.Parser, new[]{ "Id", "Name", "OutputProportionalCycleTime", "OutputProportionalPowerLimit", "OutputProportionalBand", "IntegralTime", "DerivativeTime", "SensorCorrectionAdjustment", "SensorTypeandSetpointLimits", "SetpointRampRateorSoftStartRamp", "SetpointControlOutputRate", "ControlOutputType", "SSRControlOutputType", "OutputONOFFHysteresisValues", "ProcessVariableSamplingRate", "PVInputFilterFactorMode" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum ControlId {
+ [pbr::OriginalName("DryerHeater1000w")] DryerHeater1000W = 0,
+ [pbr::OriginalName("DryerHeater200w1")] DryerHeater200W1 = 1,
+ [pbr::OriginalName("DryerHeater200w2")] DryerHeater200W2 = 2,
+ [pbr::OriginalName("HeadHeaterZ1")] HeadHeaterZ1 = 3,
+ [pbr::OriginalName("HeadHeaterZ2")] HeadHeaterZ2 = 4,
+ [pbr::OriginalName("HeadHeaterZ3")] HeadHeaterZ3 = 5,
+ [pbr::OriginalName("HeadHeaterZ4")] HeadHeaterZ4 = 6,
+ [pbr::OriginalName("MixerHeater")] MixerHeater = 7,
+ [pbr::OriginalName("WasteControl")] WasteControl = 8,
+ [pbr::OriginalName("MotorDryer")] MotorDryer = 9,
+ [pbr::OriginalName("MotorFeeder")] MotorFeeder = 10,
+ [pbr::OriginalName("MotorPooler")] MotorPooler = 11,
+ [pbr::OriginalName("MotorWinder")] MotorWinder = 12,
+ [pbr::OriginalName("DryerHeater400")] DryerHeater400 = 13,
+ }
+
+ #endregion
+
+ #region Messages
+ public sealed partial class PIDControlConfig : pb::IMessage<PIDControlConfig> {
+ private static readonly pb::MessageParser<PIDControlConfig> _parser = new pb::MessageParser<PIDControlConfig>(() => new PIDControlConfig());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<PIDControlConfig> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Hardware.PIDControlReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PIDControlConfig() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PIDControlConfig(PIDControlConfig other) : this() {
+ id_ = other.id_;
+ name_ = other.name_;
+ outputProportionalCycleTime_ = other.outputProportionalCycleTime_;
+ outputProportionalPowerLimit_ = other.outputProportionalPowerLimit_;
+ outputProportionalBand_ = other.outputProportionalBand_;
+ integralTime_ = other.integralTime_;
+ derivativeTime_ = other.derivativeTime_;
+ sensorCorrectionAdjustment_ = other.sensorCorrectionAdjustment_;
+ sensorTypeandSetpointLimits_ = other.sensorTypeandSetpointLimits_;
+ setpointRampRateorSoftStartRamp_ = other.setpointRampRateorSoftStartRamp_;
+ setpointControlOutputRate_ = other.setpointControlOutputRate_;
+ controlOutputType_ = other.controlOutputType_;
+ sSRControlOutputType_ = other.sSRControlOutputType_;
+ outputONOFFHysteresisValues_ = other.outputONOFFHysteresisValues_;
+ processVariableSamplingRate_ = other.processVariableSamplingRate_;
+ pVInputFilterFactorMode_ = other.pVInputFilterFactorMode_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public PIDControlConfig Clone() {
+ return new PIDControlConfig(this);
+ }
+
+ /// <summary>Field number for the "Id" field.</summary>
+ public const int IdFieldNumber = 1;
+ private global::Tango.PMR.Hardware.ControlId id_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Hardware.ControlId Id {
+ get { return id_; }
+ set {
+ id_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "Name" field.</summary>
+ public const int NameFieldNumber = 2;
+ private string name_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Name {
+ get { return name_; }
+ set {
+ name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "OutputProportionalCycleTime" field.</summary>
+ public const int OutputProportionalCycleTimeFieldNumber = 3;
+ private int outputProportionalCycleTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OutputProportionalCycleTime {
+ get { return outputProportionalCycleTime_; }
+ set {
+ outputProportionalCycleTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "OutputProportionalPowerLimit" field.</summary>
+ public const int OutputProportionalPowerLimitFieldNumber = 4;
+ private int outputProportionalPowerLimit_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OutputProportionalPowerLimit {
+ get { return outputProportionalPowerLimit_; }
+ set {
+ outputProportionalPowerLimit_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "OutputProportionalBand" field.</summary>
+ public const int OutputProportionalBandFieldNumber = 5;
+ private int outputProportionalBand_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OutputProportionalBand {
+ get { return outputProportionalBand_; }
+ set {
+ outputProportionalBand_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IntegralTime" field.</summary>
+ public const int IntegralTimeFieldNumber = 6;
+ private int integralTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int IntegralTime {
+ get { return integralTime_; }
+ set {
+ integralTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "DerivativeTime" field.</summary>
+ public const int DerivativeTimeFieldNumber = 7;
+ private int derivativeTime_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int DerivativeTime {
+ get { return derivativeTime_; }
+ set {
+ derivativeTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SensorCorrectionAdjustment" field.</summary>
+ public const int SensorCorrectionAdjustmentFieldNumber = 8;
+ private int sensorCorrectionAdjustment_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int SensorCorrectionAdjustment {
+ get { return sensorCorrectionAdjustment_; }
+ set {
+ sensorCorrectionAdjustment_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SensorTypeandSetpointLimits" field.</summary>
+ public const int SensorTypeandSetpointLimitsFieldNumber = 9;
+ private int sensorTypeandSetpointLimits_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int SensorTypeandSetpointLimits {
+ get { return sensorTypeandSetpointLimits_; }
+ set {
+ sensorTypeandSetpointLimits_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SetpointRampRateorSoftStartRamp" field.</summary>
+ public const int SetpointRampRateorSoftStartRampFieldNumber = 10;
+ private int setpointRampRateorSoftStartRamp_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int SetpointRampRateorSoftStartRamp {
+ get { return setpointRampRateorSoftStartRamp_; }
+ set {
+ setpointRampRateorSoftStartRamp_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SetpointControlOutputRate" field.</summary>
+ public const int SetpointControlOutputRateFieldNumber = 11;
+ private int setpointControlOutputRate_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int SetpointControlOutputRate {
+ get { return setpointControlOutputRate_; }
+ set {
+ setpointControlOutputRate_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ControlOutputType" field.</summary>
+ public const int ControlOutputTypeFieldNumber = 12;
+ private int controlOutputType_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ControlOutputType {
+ get { return controlOutputType_; }
+ set {
+ controlOutputType_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "SSRControlOutputType" field.</summary>
+ public const int SSRControlOutputTypeFieldNumber = 13;
+ private int sSRControlOutputType_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int SSRControlOutputType {
+ get { return sSRControlOutputType_; }
+ set {
+ sSRControlOutputType_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "OutputONOFFHysteresisValues" field.</summary>
+ public const int OutputONOFFHysteresisValuesFieldNumber = 14;
+ private int outputONOFFHysteresisValues_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int OutputONOFFHysteresisValues {
+ get { return outputONOFFHysteresisValues_; }
+ set {
+ outputONOFFHysteresisValues_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "ProcessVariableSamplingRate" field.</summary>
+ public const int ProcessVariableSamplingRateFieldNumber = 15;
+ private int processVariableSamplingRate_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int ProcessVariableSamplingRate {
+ get { return processVariableSamplingRate_; }
+ set {
+ processVariableSamplingRate_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "PVInputFilterFactorMode" field.</summary>
+ public const int PVInputFilterFactorModeFieldNumber = 16;
+ private int pVInputFilterFactorMode_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int PVInputFilterFactorMode {
+ get { return pVInputFilterFactorMode_; }
+ set {
+ pVInputFilterFactorMode_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as PIDControlConfig);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(PIDControlConfig other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Id != other.Id) return false;
+ if (Name != other.Name) return false;
+ if (OutputProportionalCycleTime != other.OutputProportionalCycleTime) return false;
+ if (OutputProportionalPowerLimit != other.OutputProportionalPowerLimit) return false;
+ if (OutputProportionalBand != other.OutputProportionalBand) return false;
+ if (IntegralTime != other.IntegralTime) return false;
+ if (DerivativeTime != other.DerivativeTime) return false;
+ if (SensorCorrectionAdjustment != other.SensorCorrectionAdjustment) return false;
+ if (SensorTypeandSetpointLimits != other.SensorTypeandSetpointLimits) return false;
+ if (SetpointRampRateorSoftStartRamp != other.SetpointRampRateorSoftStartRamp) return false;
+ if (SetpointControlOutputRate != other.SetpointControlOutputRate) return false;
+ if (ControlOutputType != other.ControlOutputType) return false;
+ if (SSRControlOutputType != other.SSRControlOutputType) return false;
+ if (OutputONOFFHysteresisValues != other.OutputONOFFHysteresisValues) return false;
+ if (ProcessVariableSamplingRate != other.ProcessVariableSamplingRate) return false;
+ if (PVInputFilterFactorMode != other.PVInputFilterFactorMode) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Id != 0) hash ^= Id.GetHashCode();
+ if (Name.Length != 0) hash ^= Name.GetHashCode();
+ if (OutputProportionalCycleTime != 0) hash ^= OutputProportionalCycleTime.GetHashCode();
+ if (OutputProportionalPowerLimit != 0) hash ^= OutputProportionalPowerLimit.GetHashCode();
+ if (OutputProportionalBand != 0) hash ^= OutputProportionalBand.GetHashCode();
+ if (IntegralTime != 0) hash ^= IntegralTime.GetHashCode();
+ if (DerivativeTime != 0) hash ^= DerivativeTime.GetHashCode();
+ if (SensorCorrectionAdjustment != 0) hash ^= SensorCorrectionAdjustment.GetHashCode();
+ if (SensorTypeandSetpointLimits != 0) hash ^= SensorTypeandSetpointLimits.GetHashCode();
+ if (SetpointRampRateorSoftStartRamp != 0) hash ^= SetpointRampRateorSoftStartRamp.GetHashCode();
+ if (SetpointControlOutputRate != 0) hash ^= SetpointControlOutputRate.GetHashCode();
+ if (ControlOutputType != 0) hash ^= ControlOutputType.GetHashCode();
+ if (SSRControlOutputType != 0) hash ^= SSRControlOutputType.GetHashCode();
+ if (OutputONOFFHysteresisValues != 0) hash ^= OutputONOFFHysteresisValues.GetHashCode();
+ if (ProcessVariableSamplingRate != 0) hash ^= ProcessVariableSamplingRate.GetHashCode();
+ if (PVInputFilterFactorMode != 0) hash ^= PVInputFilterFactorMode.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 (Id != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) Id);
+ }
+ if (Name.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(Name);
+ }
+ if (OutputProportionalCycleTime != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(OutputProportionalCycleTime);
+ }
+ if (OutputProportionalPowerLimit != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(OutputProportionalPowerLimit);
+ }
+ if (OutputProportionalBand != 0) {
+ output.WriteRawTag(40);
+ output.WriteInt32(OutputProportionalBand);
+ }
+ if (IntegralTime != 0) {
+ output.WriteRawTag(48);
+ output.WriteInt32(IntegralTime);
+ }
+ if (DerivativeTime != 0) {
+ output.WriteRawTag(56);
+ output.WriteInt32(DerivativeTime);
+ }
+ if (SensorCorrectionAdjustment != 0) {
+ output.WriteRawTag(64);
+ output.WriteInt32(SensorCorrectionAdjustment);
+ }
+ if (SensorTypeandSetpointLimits != 0) {
+ output.WriteRawTag(72);
+ output.WriteInt32(SensorTypeandSetpointLimits);
+ }
+ if (SetpointRampRateorSoftStartRamp != 0) {
+ output.WriteRawTag(80);
+ output.WriteInt32(SetpointRampRateorSoftStartRamp);
+ }
+ if (SetpointControlOutputRate != 0) {
+ output.WriteRawTag(88);
+ output.WriteInt32(SetpointControlOutputRate);
+ }
+ if (ControlOutputType != 0) {
+ output.WriteRawTag(96);
+ output.WriteInt32(ControlOutputType);
+ }
+ if (SSRControlOutputType != 0) {
+ output.WriteRawTag(104);
+ output.WriteInt32(SSRControlOutputType);
+ }
+ if (OutputONOFFHysteresisValues != 0) {
+ output.WriteRawTag(112);
+ output.WriteInt32(OutputONOFFHysteresisValues);
+ }
+ if (ProcessVariableSamplingRate != 0) {
+ output.WriteRawTag(120);
+ output.WriteInt32(ProcessVariableSamplingRate);
+ }
+ if (PVInputFilterFactorMode != 0) {
+ output.WriteRawTag(128, 1);
+ output.WriteInt32(PVInputFilterFactorMode);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Id != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Id);
+ }
+ if (Name.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
+ }
+ if (OutputProportionalCycleTime != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputProportionalCycleTime);
+ }
+ if (OutputProportionalPowerLimit != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputProportionalPowerLimit);
+ }
+ if (OutputProportionalBand != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputProportionalBand);
+ }
+ if (IntegralTime != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntegralTime);
+ }
+ if (DerivativeTime != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(DerivativeTime);
+ }
+ if (SensorCorrectionAdjustment != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SensorCorrectionAdjustment);
+ }
+ if (SensorTypeandSetpointLimits != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SensorTypeandSetpointLimits);
+ }
+ if (SetpointRampRateorSoftStartRamp != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SetpointRampRateorSoftStartRamp);
+ }
+ if (SetpointControlOutputRate != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SetpointControlOutputRate);
+ }
+ if (ControlOutputType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(ControlOutputType);
+ }
+ if (SSRControlOutputType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SSRControlOutputType);
+ }
+ if (OutputONOFFHysteresisValues != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(OutputONOFFHysteresisValues);
+ }
+ if (ProcessVariableSamplingRate != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(ProcessVariableSamplingRate);
+ }
+ if (PVInputFilterFactorMode != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(PVInputFilterFactorMode);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(PIDControlConfig other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Id != 0) {
+ Id = other.Id;
+ }
+ if (other.Name.Length != 0) {
+ Name = other.Name;
+ }
+ if (other.OutputProportionalCycleTime != 0) {
+ OutputProportionalCycleTime = other.OutputProportionalCycleTime;
+ }
+ if (other.OutputProportionalPowerLimit != 0) {
+ OutputProportionalPowerLimit = other.OutputProportionalPowerLimit;
+ }
+ if (other.OutputProportionalBand != 0) {
+ OutputProportionalBand = other.OutputProportionalBand;
+ }
+ if (other.IntegralTime != 0) {
+ IntegralTime = other.IntegralTime;
+ }
+ if (other.DerivativeTime != 0) {
+ DerivativeTime = other.DerivativeTime;
+ }
+ if (other.SensorCorrectionAdjustment != 0) {
+ SensorCorrectionAdjustment = other.SensorCorrectionAdjustment;
+ }
+ if (other.SensorTypeandSetpointLimits != 0) {
+ SensorTypeandSetpointLimits = other.SensorTypeandSetpointLimits;
+ }
+ if (other.SetpointRampRateorSoftStartRamp != 0) {
+ SetpointRampRateorSoftStartRamp = other.SetpointRampRateorSoftStartRamp;
+ }
+ if (other.SetpointControlOutputRate != 0) {
+ SetpointControlOutputRate = other.SetpointControlOutputRate;
+ }
+ if (other.ControlOutputType != 0) {
+ ControlOutputType = other.ControlOutputType;
+ }
+ if (other.SSRControlOutputType != 0) {
+ SSRControlOutputType = other.SSRControlOutputType;
+ }
+ if (other.OutputONOFFHysteresisValues != 0) {
+ OutputONOFFHysteresisValues = other.OutputONOFFHysteresisValues;
+ }
+ if (other.ProcessVariableSamplingRate != 0) {
+ ProcessVariableSamplingRate = other.ProcessVariableSamplingRate;
+ }
+ if (other.PVInputFilterFactorMode != 0) {
+ PVInputFilterFactorMode = other.PVInputFilterFactorMode;
+ }
+ }
+
+ [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: {
+ id_ = (global::Tango.PMR.Hardware.ControlId) input.ReadEnum();
+ break;
+ }
+ case 18: {
+ Name = input.ReadString();
+ break;
+ }
+ case 24: {
+ OutputProportionalCycleTime = input.ReadInt32();
+ break;
+ }
+ case 32: {
+ OutputProportionalPowerLimit = input.ReadInt32();
+ break;
+ }
+ case 40: {
+ OutputProportionalBand = input.ReadInt32();
+ break;
+ }
+ case 48: {
+ IntegralTime = input.ReadInt32();
+ break;
+ }
+ case 56: {
+ DerivativeTime = input.ReadInt32();
+ break;
+ }
+ case 64: {
+ SensorCorrectionAdjustment = input.ReadInt32();
+ break;
+ }
+ case 72: {
+ SensorTypeandSetpointLimits = input.ReadInt32();
+ break;
+ }
+ case 80: {
+ SetpointRampRateorSoftStartRamp = input.ReadInt32();
+ break;
+ }
+ case 88: {
+ SetpointControlOutputRate = input.ReadInt32();
+ break;
+ }
+ case 96: {
+ ControlOutputType = input.ReadInt32();
+ break;
+ }
+ case 104: {
+ SSRControlOutputType = input.ReadInt32();
+ break;
+ }
+ case 112: {
+ OutputONOFFHysteresisValues = input.ReadInt32();
+ break;
+ }
+ case 120: {
+ ProcessVariableSamplingRate = input.ReadInt32();
+ break;
+ }
+ case 128: {
+ PVInputFilterFactorMode = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs
deleted file mode 100644
index 9a196728b..000000000
--- a/Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs
+++ /dev/null
@@ -1,327 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: dispenser.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.Jobs {
-
- /// <summary>Holder for reflection information generated from dispenser.proto</summary>
- public static partial class DispenserReflection {
-
- #region Descriptor
- /// <summary>File descriptor for dispenser.proto</summary>
- public static pbr::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbr::FileDescriptor descriptor;
-
- static DispenserReflection() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "Cg9kaXNwZW5zZXIucHJvdG8SDlRhbmdvLlBNUi5Kb2JzIh4KDGdyYWRpZW50",
- "RmxvdxIOCgZOTGZsb3cYASABKAEiWQoIRGlzcGVuc2USCgoCSWQYASABKAUS",
- "EQoJc3RhcnRGbG93GAIgASgBEi4KCGdyYWRpZW50GAMgAygLMhwuVGFuZ28u",
- "UE1SLkpvYnMuZ3JhZGllbnRGbG93QhoKGGNvbS50d2luZS50YW5nby5wbXIu",
- "am9ic2IGcHJvdG8z"));
- descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
- new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.gradientFlow), global::Tango.PMR.Jobs.gradientFlow.Parser, new[]{ "NLflow" }, null, null, null),
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Dispense), global::Tango.PMR.Jobs.Dispense.Parser, new[]{ "Id", "StartFlow", "Gradient" }, null, null, null)
- }));
- }
- #endregion
-
- }
- #region Messages
- public sealed partial class gradientFlow : pb::IMessage<gradientFlow> {
- private static readonly pb::MessageParser<gradientFlow> _parser = new pb::MessageParser<gradientFlow>(() => new gradientFlow());
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<gradientFlow> Parser { get { return _parser; } }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Tango.PMR.Jobs.DispenserReflection.Descriptor.MessageTypes[0]; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public gradientFlow() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public gradientFlow(gradientFlow other) : this() {
- nLflow_ = other.nLflow_;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public gradientFlow Clone() {
- return new gradientFlow(this);
- }
-
- /// <summary>Field number for the "NLflow" field.</summary>
- public const int NLflowFieldNumber = 1;
- private double nLflow_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double NLflow {
- get { return nLflow_; }
- set {
- nLflow_ = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as gradientFlow);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(gradientFlow other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (NLflow != other.NLflow) return false;
- return true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (NLflow != 0D) hash ^= NLflow.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 (NLflow != 0D) {
- output.WriteRawTag(9);
- output.WriteDouble(NLflow);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (NLflow != 0D) {
- size += 1 + 8;
- }
- return size;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(gradientFlow other) {
- if (other == null) {
- return;
- }
- if (other.NLflow != 0D) {
- NLflow = other.NLflow;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 9: {
- NLflow = input.ReadDouble();
- break;
- }
- }
- }
- }
-
- }
-
- public sealed partial class Dispense : pb::IMessage<Dispense> {
- private static readonly pb::MessageParser<Dispense> _parser = new pb::MessageParser<Dispense>(() => new Dispense());
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<Dispense> Parser { get { return _parser; } }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Tango.PMR.Jobs.DispenserReflection.Descriptor.MessageTypes[1]; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public Dispense() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public Dispense(Dispense other) : this() {
- id_ = other.id_;
- startFlow_ = other.startFlow_;
- gradient_ = other.gradient_.Clone();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public Dispense Clone() {
- return new Dispense(this);
- }
-
- /// <summary>Field number for the "Id" field.</summary>
- public const int IdFieldNumber = 1;
- private int id_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Id {
- get { return id_; }
- set {
- id_ = value;
- }
- }
-
- /// <summary>Field number for the "startFlow" field.</summary>
- public const int StartFlowFieldNumber = 2;
- private double startFlow_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double StartFlow {
- get { return startFlow_; }
- set {
- startFlow_ = value;
- }
- }
-
- /// <summary>Field number for the "gradient" field.</summary>
- public const int GradientFieldNumber = 3;
- private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.gradientFlow> _repeated_gradient_codec
- = pb::FieldCodec.ForMessage(26, global::Tango.PMR.Jobs.gradientFlow.Parser);
- private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.gradientFlow> gradient_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.gradientFlow>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Tango.PMR.Jobs.gradientFlow> Gradient {
- get { return gradient_; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as Dispense);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(Dispense other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (Id != other.Id) return false;
- if (StartFlow != other.StartFlow) return false;
- if(!gradient_.Equals(other.gradient_)) return false;
- return true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (Id != 0) hash ^= Id.GetHashCode();
- if (StartFlow != 0D) hash ^= StartFlow.GetHashCode();
- hash ^= gradient_.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 (Id != 0) {
- output.WriteRawTag(8);
- output.WriteInt32(Id);
- }
- if (StartFlow != 0D) {
- output.WriteRawTag(17);
- output.WriteDouble(StartFlow);
- }
- gradient_.WriteTo(output, _repeated_gradient_codec);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (Id != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id);
- }
- if (StartFlow != 0D) {
- size += 1 + 8;
- }
- size += gradient_.CalculateSize(_repeated_gradient_codec);
- return size;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(Dispense other) {
- if (other == null) {
- return;
- }
- if (other.Id != 0) {
- Id = other.Id;
- }
- if (other.StartFlow != 0D) {
- StartFlow = other.StartFlow;
- }
- gradient_.Add(other.gradient_);
- }
-
- [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: {
- Id = input.ReadInt32();
- break;
- }
- case 17: {
- StartFlow = input.ReadDouble();
- break;
- }
- case 26: {
- gradient_.AddEntriesFrom(input, _repeated_gradient_codec);
- break;
- }
- }
- }
- }
-
- }
-
- #endregion
-
-}
-
-#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs
index 82b6160ba..abea1cb98 100644
--- a/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs
+++ b/Software/Visual_Studio/Tango.PMR/Jobs/Job.cs
@@ -22,19 +22,16 @@ namespace Tango.PMR.Jobs {
static JobReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "CglKb2IucHJvdG8SDlRhbmdvLlBNUi5Kb2JzGg1TZWdtZW50LnByb3RvGgtt",
- "b3Rvci5wcm90byKyAgoDSm9iEgwKBE5hbWUYASABKAkSFgoOaW50ZXJTZWdF",
- "bmFibGUYAiABKAgSHQoVZGlzdGFuc2VUb1Nwb29sRW5hYmxlGAMgASgIEh0K",
- "FWRpc3RhbmNlVG9TcG9vbExlbmd0aBgEIAEoDRIZChFzdGFydE9mZnNldFB1",
- "bHNlcxgFIAEoDRIYChBzcG9vbEJhY2tpbmdSYXRlGAYgASgNEhsKE3NlZ21l",
- "bnRPZmZzZXRQdWxzZXMYByABKA0SHQoVbWlsaW1ldGVyc1BlclJvdGF0aW9u",
- "GAggASgNEikKCFNlZ21lbnRzGAkgAygLMhcuVGFuZ28uUE1SLkpvYnMuU2Vn",
- "bWVudBIrCgZNb3RvcnMYCiADKAsyGy5UYW5nby5QTVIuSm9icy5Nb3RvckNv",
- "bmZpZ0IaChhjb20udHdpbmUudGFuZ28ucG1yLmpvYnNiBnByb3RvMw=="));
+ "CglKb2IucHJvdG8SDlRhbmdvLlBNUi5Kb2JzGg1TZWdtZW50LnByb3RvIpQB",
+ "CgNKb2ISDAoETmFtZRgBIAEoCRIWCg5pbnRlclNlZ0VuYWJsZRgCIAEoCBId",
+ "ChVkaXN0YW5zZVRvU3Bvb2xFbmFibGUYAyABKAgSHQoVZGlzdGFuY2VUb1Nw",
+ "b29sTGVuZ3RoGAQgASgNEikKCFNlZ21lbnRzGAkgAygLMhcuVGFuZ28uUE1S",
+ "LkpvYnMuU2VnbWVudEIaChhjb20udHdpbmUudGFuZ28ucG1yLmpvYnNiBnBy",
+ "b3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Jobs.SegmentReflection.Descriptor, global::Tango.PMR.Jobs.MotorReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Jobs.SegmentReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Job), global::Tango.PMR.Jobs.Job.Parser, new[]{ "Name", "InterSegEnable", "DistanseToSpoolEnable", "DistanceToSpoolLength", "StartOffsetPulses", "SpoolBackingRate", "SegmentOffsetPulses", "MilimetersPerRotation", "Segments", "Motors" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Job), global::Tango.PMR.Jobs.Job.Parser, new[]{ "Name", "InterSegEnable", "DistanseToSpoolEnable", "DistanceToSpoolLength", "Segments" }, null, null, null)
}));
}
#endregion
@@ -69,12 +66,7 @@ namespace Tango.PMR.Jobs {
interSegEnable_ = other.interSegEnable_;
distanseToSpoolEnable_ = other.distanseToSpoolEnable_;
distanceToSpoolLength_ = other.distanceToSpoolLength_;
- startOffsetPulses_ = other.startOffsetPulses_;
- spoolBackingRate_ = other.spoolBackingRate_;
- segmentOffsetPulses_ = other.segmentOffsetPulses_;
- milimetersPerRotation_ = other.milimetersPerRotation_;
segments_ = other.segments_.Clone();
- motors_ = other.motors_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -135,74 +127,20 @@ namespace Tango.PMR.Jobs {
}
}
- /// <summary>Field number for the "startOffsetPulses" field.</summary>
- public const int StartOffsetPulsesFieldNumber = 5;
- private uint startOffsetPulses_;
- /// <summary>
- ///repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
- ///SCREW:
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint StartOffsetPulses {
- get { return startOffsetPulses_; }
- set {
- startOffsetPulses_ = value;
- }
- }
-
- /// <summary>Field number for the "spoolBackingRate" field.</summary>
- public const int SpoolBackingRateFieldNumber = 6;
- private uint spoolBackingRate_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint SpoolBackingRate {
- get { return spoolBackingRate_; }
- set {
- spoolBackingRate_ = value;
- }
- }
-
- /// <summary>Field number for the "segmentOffsetPulses" field.</summary>
- public const int SegmentOffsetPulsesFieldNumber = 7;
- private uint segmentOffsetPulses_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint SegmentOffsetPulses {
- get { return segmentOffsetPulses_; }
- set {
- segmentOffsetPulses_ = value;
- }
- }
-
- /// <summary>Field number for the "milimetersPerRotation" field.</summary>
- public const int MilimetersPerRotationFieldNumber = 8;
- private uint milimetersPerRotation_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint MilimetersPerRotation {
- get { return milimetersPerRotation_; }
- set {
- milimetersPerRotation_ = value;
- }
- }
-
/// <summary>Field number for the "Segments" field.</summary>
public const int SegmentsFieldNumber = 9;
private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.Segment> _repeated_segments_codec
= pb::FieldCodec.ForMessage(74, global::Tango.PMR.Jobs.Segment.Parser);
private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.Segment> segments_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.Segment>();
+ /// <summary>
+ ///repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+ ///SCREW:
+ /// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Tango.PMR.Jobs.Segment> Segments {
get { return segments_; }
}
- /// <summary>Field number for the "Motors" field.</summary>
- public const int MotorsFieldNumber = 10;
- private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.MotorConfig> _repeated_motors_codec
- = pb::FieldCodec.ForMessage(82, global::Tango.PMR.Jobs.MotorConfig.Parser);
- private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.MotorConfig> motors_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.MotorConfig>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Tango.PMR.Jobs.MotorConfig> Motors {
- get { return motors_; }
- }
-
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Job);
@@ -220,12 +158,7 @@ namespace Tango.PMR.Jobs {
if (InterSegEnable != other.InterSegEnable) return false;
if (DistanseToSpoolEnable != other.DistanseToSpoolEnable) return false;
if (DistanceToSpoolLength != other.DistanceToSpoolLength) return false;
- if (StartOffsetPulses != other.StartOffsetPulses) return false;
- if (SpoolBackingRate != other.SpoolBackingRate) return false;
- if (SegmentOffsetPulses != other.SegmentOffsetPulses) return false;
- if (MilimetersPerRotation != other.MilimetersPerRotation) return false;
if(!segments_.Equals(other.segments_)) return false;
- if(!motors_.Equals(other.motors_)) return false;
return true;
}
@@ -236,12 +169,7 @@ namespace Tango.PMR.Jobs {
if (InterSegEnable != false) hash ^= InterSegEnable.GetHashCode();
if (DistanseToSpoolEnable != false) hash ^= DistanseToSpoolEnable.GetHashCode();
if (DistanceToSpoolLength != 0) hash ^= DistanceToSpoolLength.GetHashCode();
- if (StartOffsetPulses != 0) hash ^= StartOffsetPulses.GetHashCode();
- if (SpoolBackingRate != 0) hash ^= SpoolBackingRate.GetHashCode();
- if (SegmentOffsetPulses != 0) hash ^= SegmentOffsetPulses.GetHashCode();
- if (MilimetersPerRotation != 0) hash ^= MilimetersPerRotation.GetHashCode();
hash ^= segments_.GetHashCode();
- hash ^= motors_.GetHashCode();
return hash;
}
@@ -268,24 +196,7 @@ namespace Tango.PMR.Jobs {
output.WriteRawTag(32);
output.WriteUInt32(DistanceToSpoolLength);
}
- if (StartOffsetPulses != 0) {
- output.WriteRawTag(40);
- output.WriteUInt32(StartOffsetPulses);
- }
- if (SpoolBackingRate != 0) {
- output.WriteRawTag(48);
- output.WriteUInt32(SpoolBackingRate);
- }
- if (SegmentOffsetPulses != 0) {
- output.WriteRawTag(56);
- output.WriteUInt32(SegmentOffsetPulses);
- }
- if (MilimetersPerRotation != 0) {
- output.WriteRawTag(64);
- output.WriteUInt32(MilimetersPerRotation);
- }
segments_.WriteTo(output, _repeated_segments_codec);
- motors_.WriteTo(output, _repeated_motors_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -303,20 +214,7 @@ namespace Tango.PMR.Jobs {
if (DistanceToSpoolLength != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DistanceToSpoolLength);
}
- if (StartOffsetPulses != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StartOffsetPulses);
- }
- if (SpoolBackingRate != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SpoolBackingRate);
- }
- if (SegmentOffsetPulses != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SegmentOffsetPulses);
- }
- if (MilimetersPerRotation != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MilimetersPerRotation);
- }
size += segments_.CalculateSize(_repeated_segments_codec);
- size += motors_.CalculateSize(_repeated_motors_codec);
return size;
}
@@ -337,20 +235,7 @@ namespace Tango.PMR.Jobs {
if (other.DistanceToSpoolLength != 0) {
DistanceToSpoolLength = other.DistanceToSpoolLength;
}
- if (other.StartOffsetPulses != 0) {
- StartOffsetPulses = other.StartOffsetPulses;
- }
- if (other.SpoolBackingRate != 0) {
- SpoolBackingRate = other.SpoolBackingRate;
- }
- if (other.SegmentOffsetPulses != 0) {
- SegmentOffsetPulses = other.SegmentOffsetPulses;
- }
- if (other.MilimetersPerRotation != 0) {
- MilimetersPerRotation = other.MilimetersPerRotation;
- }
segments_.Add(other.segments_);
- motors_.Add(other.motors_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -377,30 +262,10 @@ namespace Tango.PMR.Jobs {
DistanceToSpoolLength = input.ReadUInt32();
break;
}
- case 40: {
- StartOffsetPulses = input.ReadUInt32();
- break;
- }
- case 48: {
- SpoolBackingRate = input.ReadUInt32();
- break;
- }
- case 56: {
- SegmentOffsetPulses = input.ReadUInt32();
- break;
- }
- case 64: {
- MilimetersPerRotation = input.ReadUInt32();
- break;
- }
case 74: {
segments_.AddEntriesFrom(input, _repeated_segments_codec);
break;
}
- case 82: {
- motors_.AddEntriesFrom(input, _repeated_motors_codec);
- break;
- }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs
index d990ac5d1..440650812 100644
--- a/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs
+++ b/Software/Visual_Studio/Tango.PMR/Jobs/Segment.cs
@@ -22,15 +22,14 @@ namespace Tango.PMR.Jobs {
static SegmentReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "Cg1TZWdtZW50LnByb3RvEg5UYW5nby5QTVIuSm9icxoJUkdCLnByb3RvGg9k",
- "aXNwZW5zZXIucHJvdG8iegoHU2VnbWVudBIMCgROYW1lGAEgASgJEg4KBkxl",
- "bmd0aBgCIAEoBRIkCgVDb2xvchgDIAEoCzIVLlRhbmdvLlBNUi5Db21tb24u",
- "UkdCEisKCWRpc3BlbnNlchgEIAMoCzIYLlRhbmdvLlBNUi5Kb2JzLkRpc3Bl",
- "bnNlQhoKGGNvbS50d2luZS50YW5nby5wbXIuam9ic2IGcHJvdG8z"));
+ "Cg1TZWdtZW50LnByb3RvEg5UYW5nby5QTVIuSm9icxoJUkdCLnByb3RvIk0K",
+ "B1NlZ21lbnQSDAoETmFtZRgBIAEoCRIOCgZMZW5ndGgYAiABKAUSJAoFQ29s",
+ "b3IYAyABKAsyFS5UYW5nby5QTVIuQ29tbW9uLlJHQkIaChhjb20udHdpbmUu",
+ "dGFuZ28ucG1yLmpvYnNiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Tango.PMR.Common.RGBReflection.Descriptor, global::Tango.PMR.Jobs.DispenserReflection.Descriptor, },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Common.RGBReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Segment), global::Tango.PMR.Jobs.Segment.Parser, new[]{ "Name", "Length", "Color", "Dispenser" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Jobs.Segment), global::Tango.PMR.Jobs.Segment.Parser, new[]{ "Name", "Length", "Color" }, null, null, null)
}));
}
#endregion
@@ -64,7 +63,6 @@ namespace Tango.PMR.Jobs {
name_ = other.name_;
length_ = other.length_;
Color = other.color_ != null ? other.Color.Clone() : null;
- dispenser_ = other.dispenser_.Clone();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -105,16 +103,6 @@ namespace Tango.PMR.Jobs {
}
}
- /// <summary>Field number for the "dispenser" field.</summary>
- public const int DispenserFieldNumber = 4;
- private static readonly pb::FieldCodec<global::Tango.PMR.Jobs.Dispense> _repeated_dispenser_codec
- = pb::FieldCodec.ForMessage(34, global::Tango.PMR.Jobs.Dispense.Parser);
- private readonly pbc::RepeatedField<global::Tango.PMR.Jobs.Dispense> dispenser_ = new pbc::RepeatedField<global::Tango.PMR.Jobs.Dispense>();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pbc::RepeatedField<global::Tango.PMR.Jobs.Dispense> Dispenser {
- get { return dispenser_; }
- }
-
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Segment);
@@ -131,7 +119,6 @@ namespace Tango.PMR.Jobs {
if (Name != other.Name) return false;
if (Length != other.Length) return false;
if (!object.Equals(Color, other.Color)) return false;
- if(!dispenser_.Equals(other.dispenser_)) return false;
return true;
}
@@ -141,7 +128,6 @@ namespace Tango.PMR.Jobs {
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (Length != 0) hash ^= Length.GetHashCode();
if (color_ != null) hash ^= Color.GetHashCode();
- hash ^= dispenser_.GetHashCode();
return hash;
}
@@ -164,7 +150,6 @@ namespace Tango.PMR.Jobs {
output.WriteRawTag(26);
output.WriteMessage(Color);
}
- dispenser_.WriteTo(output, _repeated_dispenser_codec);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -179,7 +164,6 @@ namespace Tango.PMR.Jobs {
if (color_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Color);
}
- size += dispenser_.CalculateSize(_repeated_dispenser_codec);
return size;
}
@@ -200,7 +184,6 @@ namespace Tango.PMR.Jobs {
}
Color.MergeFrom(other.Color);
}
- dispenser_.Add(other.dispenser_);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -226,10 +209,6 @@ namespace Tango.PMR.Jobs {
input.ReadMessage(color_);
break;
}
- case 34: {
- dispenser_.AddEntriesFrom(input, _repeated_dispenser_codec);
- break;
- }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
index 2d50a56fc..4cf340cca 100644
--- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
+++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
@@ -62,8 +62,14 @@
<Compile Include="NativePMR.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TangoMessage.cs" />
- <Compile Include="Common\*.cs" />
- <Compile Include="Jobs\*.cs" />
+ <Compile Include="Common\ErrorCode.cs" />
+ <Compile Include="Common\KeepAliveRequest.cs" />
+ <Compile Include="Common\KeepAliveResponse.cs" />
+ <Compile Include="Common\MessageContainer.cs" />
+ <Compile Include="Common\MessageType.cs" />
+ <Compile Include="Common\RGB.cs" />
+ <Compile Include="Jobs\Job.cs" />
+ <Compile Include="Jobs\Segment.cs" />
<Compile Include="Stubs\*.cs" />
<Compile Include="Synchronization\*.cs" />
</ItemGroup>