aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/Hardware
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-28 16:29:45 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-28 16:29:45 +0200
commit9823b433c62ed173671923c32ccccadc1d06c0bd (patch)
tree3b64f95e9362c0e25a235f63ca5bbb0232a44b57 /Software/Visual_Studio/Tango.PMR/Hardware
parent3e725887814383f6f18b1e6e951e1322104ebd1c (diff)
downloadTango-9823b433c62ed173671923c32ccccadc1d06c0bd.tar.gz
Tango-9823b433c62ed173671923c32ccccadc1d06c0bd.zip
Lots of work !!!
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/Hardware')
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs56
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenserType.cs45
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinder.cs189
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs44
4 files changed, 307 insertions, 27 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
index 72e7889bd..ce7036ca2 100644
--- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenser.cs
@@ -23,19 +23,21 @@ namespace Tango.PMR.Hardware {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChdIYXJkd2FyZURpc3BlbnNlci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJl",
- "IsECChFIYXJkd2FyZURpc3BlbnNlchIMCgRDb2RlGAEgASgFEhIKCk5sUGVy",
- "UHVsc2UYAiABKAESEAoIQ2FwYWNpdHkYAyABKAESFAoMTWluRnJlcXVlbmN5",
- "GAQgASgFEhQKDE1heEZyZXF1ZW5jeRgFIAEoBRIUCgxNaW5NaWNyb1N0ZXAY",
- "BiABKAUSFAoMTWF4TWljcm9TdGVwGAcgASgFEhYKDkNvcnJlY3Rpb25HYWlu",
- "GAggASgBEhkKEVJhdGlvVG9EcnllclNwZWVkGAkgASgBEgoKAktwGAogASgB",
- "EgoKAktpGAsgASgBEgoKAktkGAwgASgBEhMKC0NoYW5nZVNsb3BlGA0gASgB",
- "Eh0KFUhpZ2hMZW5ndGhNaWNyb1NlY29uZBgOIAEoARIVCg1Db250cm9sVGlt",
- "aW5nGA8gASgFQh4KHGNvbS50d2luZS50YW5nby5wbXIuaGFyZHdhcmViBnBy",
- "b3RvMw=="));
+ "GhtIYXJkd2FyZURpc3BlbnNlclR5cGUucHJvdG8i/QIKEUhhcmR3YXJlRGlz",
+ "cGVuc2VyEkgKFUhhcmR3YXJlRGlzcGVuc2VyVHlwZRgBIAEoDjIpLlRhbmdv",
+ "LlBNUi5IYXJkd2FyZS5IYXJkd2FyZURpc3BlbnNlclR5cGUSEgoKTmxQZXJQ",
+ "dWxzZRgCIAEoARIQCghDYXBhY2l0eRgDIAEoARIUCgxNaW5GcmVxdWVuY3kY",
+ "BCABKAUSFAoMTWF4RnJlcXVlbmN5GAUgASgFEhQKDE1pbk1pY3JvU3RlcBgG",
+ "IAEoBRIUCgxNYXhNaWNyb1N0ZXAYByABKAUSFgoOQ29ycmVjdGlvbkdhaW4Y",
+ "CCABKAESGQoRUmF0aW9Ub0RyeWVyU3BlZWQYCSABKAESCgoCS3AYCiABKAES",
+ "CgoCS2kYCyABKAESCgoCS2QYDCABKAESEwoLQ2hhbmdlU2xvcGUYDSABKAES",
+ "HQoVSGlnaExlbmd0aE1pY3JvU2Vjb25kGA4gASgBEhUKDUNvbnRyb2xUaW1p",
+ "bmcYDyABKAVCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJv",
+ "dG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareDispenserTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDispenser), global::Tango.PMR.Hardware.HardwareDispenser.Parser, new[]{ "Code", "NlPerPulse", "Capacity", "MinFrequency", "MaxFrequency", "MinMicroStep", "MaxMicroStep", "CorrectionGain", "RatioToDryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthMicroSecond", "ControlTiming" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareDispenser), global::Tango.PMR.Hardware.HardwareDispenser.Parser, new[]{ "HardwareDispenserType", "NlPerPulse", "Capacity", "MinFrequency", "MaxFrequency", "MinMicroStep", "MaxMicroStep", "CorrectionGain", "RatioToDryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthMicroSecond", "ControlTiming" }, null, null, null)
}));
}
#endregion
@@ -66,7 +68,7 @@ namespace Tango.PMR.Hardware {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public HardwareDispenser(HardwareDispenser other) : this() {
- code_ = other.code_;
+ hardwareDispenserType_ = other.hardwareDispenserType_;
nlPerPulse_ = other.nlPerPulse_;
capacity_ = other.capacity_;
minFrequency_ = other.minFrequency_;
@@ -88,14 +90,14 @@ namespace Tango.PMR.Hardware {
return new HardwareDispenser(this);
}
- /// <summary>Field number for the "Code" field.</summary>
- public const int CodeFieldNumber = 1;
- private int code_;
+ /// <summary>Field number for the "HardwareDispenserType" field.</summary>
+ public const int HardwareDispenserTypeFieldNumber = 1;
+ private global::Tango.PMR.Hardware.HardwareDispenserType hardwareDispenserType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Code {
- get { return code_; }
+ public global::Tango.PMR.Hardware.HardwareDispenserType HardwareDispenserType {
+ get { return hardwareDispenserType_; }
set {
- code_ = value;
+ hardwareDispenserType_ = value;
}
}
@@ -266,7 +268,7 @@ namespace Tango.PMR.Hardware {
if (ReferenceEquals(other, this)) {
return true;
}
- if (Code != other.Code) return false;
+ if (HardwareDispenserType != other.HardwareDispenserType) return false;
if (NlPerPulse != other.NlPerPulse) return false;
if (Capacity != other.Capacity) return false;
if (MinFrequency != other.MinFrequency) return false;
@@ -287,7 +289,7 @@ namespace Tango.PMR.Hardware {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
- if (Code != 0) hash ^= Code.GetHashCode();
+ if (HardwareDispenserType != 0) hash ^= HardwareDispenserType.GetHashCode();
if (NlPerPulse != 0D) hash ^= NlPerPulse.GetHashCode();
if (Capacity != 0D) hash ^= Capacity.GetHashCode();
if (MinFrequency != 0) hash ^= MinFrequency.GetHashCode();
@@ -312,9 +314,9 @@ namespace Tango.PMR.Hardware {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
- if (Code != 0) {
+ if (HardwareDispenserType != 0) {
output.WriteRawTag(8);
- output.WriteInt32(Code);
+ output.WriteEnum((int) HardwareDispenserType);
}
if (NlPerPulse != 0D) {
output.WriteRawTag(17);
@@ -377,8 +379,8 @@ namespace Tango.PMR.Hardware {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
- if (Code != 0) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code);
+ if (HardwareDispenserType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HardwareDispenserType);
}
if (NlPerPulse != 0D) {
size += 1 + 8;
@@ -430,8 +432,8 @@ namespace Tango.PMR.Hardware {
if (other == null) {
return;
}
- if (other.Code != 0) {
- Code = other.Code;
+ if (other.HardwareDispenserType != 0) {
+ HardwareDispenserType = other.HardwareDispenserType;
}
if (other.NlPerPulse != 0D) {
NlPerPulse = other.NlPerPulse;
@@ -486,7 +488,7 @@ namespace Tango.PMR.Hardware {
input.SkipLastField();
break;
case 8: {
- Code = input.ReadInt32();
+ hardwareDispenserType_ = (global::Tango.PMR.Hardware.HardwareDispenserType) input.ReadEnum();
break;
}
case 17: {
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenserType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenserType.cs
new file mode 100644
index 000000000..68f1b2b22
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareDispenserType.cs
@@ -0,0 +1,45 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: HardwareDispenserType.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 HardwareDispenserType.proto</summary>
+ public static partial class HardwareDispenserTypeReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for HardwareDispenserType.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static HardwareDispenserTypeReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChtIYXJkd2FyZURpc3BlbnNlclR5cGUucHJvdG8SElRhbmdvLlBNUi5IYXJk",
+ "d2FyZSouChVIYXJkd2FyZURpc3BlbnNlclR5cGUSFQoRU3RhbmRhcmREaXNw",
+ "ZW5zZXIQAEIeChxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90",
+ "bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.HardwareDispenserType), }, null));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum HardwareDispenserType {
+ [pbr::OriginalName("StandardDispenser")] StandardDispenser = 0,
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinder.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinder.cs
new file mode 100644
index 000000000..9d05a5068
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinder.cs
@@ -0,0 +1,189 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: HardwareWinder.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 HardwareWinder.proto</summary>
+ public static partial class HardwareWinderReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for HardwareWinder.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static HardwareWinderReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChRIYXJkd2FyZVdpbmRlci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJlGhhI",
+ "YXJkd2FyZVdpbmRlclR5cGUucHJvdG8icwoOSGFyZHdhcmVXaW5kZXISQgoS",
+ "SGFyZHdhcmVXaW5kZXJUeXBlGAEgASgOMiYuVGFuZ28uUE1SLkhhcmR3YXJl",
+ "LkhhcmR3YXJlV2luZGVyVHlwZRIdChVNaWxsaW1ldGVyUGVyUm90YXRpb24Y",
+ "AiABKAVCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareWinderTypeReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareWinder), global::Tango.PMR.Hardware.HardwareWinder.Parser, new[]{ "HardwareWinderType", "MillimeterPerRotation" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class HardwareWinder : pb::IMessage<HardwareWinder> {
+ private static readonly pb::MessageParser<HardwareWinder> _parser = new pb::MessageParser<HardwareWinder>(() => new HardwareWinder());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<HardwareWinder> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.Hardware.HardwareWinderReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public HardwareWinder() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public HardwareWinder(HardwareWinder other) : this() {
+ hardwareWinderType_ = other.hardwareWinderType_;
+ millimeterPerRotation_ = other.millimeterPerRotation_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public HardwareWinder Clone() {
+ return new HardwareWinder(this);
+ }
+
+ /// <summary>Field number for the "HardwareWinderType" field.</summary>
+ public const int HardwareWinderTypeFieldNumber = 1;
+ private global::Tango.PMR.Hardware.HardwareWinderType hardwareWinderType_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Hardware.HardwareWinderType HardwareWinderType {
+ get { return hardwareWinderType_; }
+ set {
+ hardwareWinderType_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "MillimeterPerRotation" field.</summary>
+ public const int MillimeterPerRotationFieldNumber = 2;
+ private int millimeterPerRotation_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int MillimeterPerRotation {
+ get { return millimeterPerRotation_; }
+ set {
+ millimeterPerRotation_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as HardwareWinder);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(HardwareWinder other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (HardwareWinderType != other.HardwareWinderType) return false;
+ if (MillimeterPerRotation != other.MillimeterPerRotation) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HardwareWinderType != 0) hash ^= HardwareWinderType.GetHashCode();
+ if (MillimeterPerRotation != 0) hash ^= MillimeterPerRotation.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 (HardwareWinderType != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) HardwareWinderType);
+ }
+ if (MillimeterPerRotation != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(MillimeterPerRotation);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (HardwareWinderType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HardwareWinderType);
+ }
+ if (MillimeterPerRotation != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MillimeterPerRotation);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(HardwareWinder other) {
+ if (other == null) {
+ return;
+ }
+ if (other.HardwareWinderType != 0) {
+ HardwareWinderType = other.HardwareWinderType;
+ }
+ if (other.MillimeterPerRotation != 0) {
+ MillimeterPerRotation = other.MillimeterPerRotation;
+ }
+ }
+
+ [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: {
+ hardwareWinderType_ = (global::Tango.PMR.Hardware.HardwareWinderType) input.ReadEnum();
+ break;
+ }
+ case 16: {
+ MillimeterPerRotation = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs
new file mode 100644
index 000000000..af7e964bd
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareWinderType.cs
@@ -0,0 +1,44 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: HardwareWinderType.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 HardwareWinderType.proto</summary>
+ public static partial class HardwareWinderTypeReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for HardwareWinderType.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static HardwareWinderTypeReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChhIYXJkd2FyZVdpbmRlclR5cGUucHJvdG8SElRhbmdvLlBNUi5IYXJkd2Fy",
+ "ZSooChJIYXJkd2FyZVdpbmRlclR5cGUSEgoOSW50ZXJuYWxXaW5kZXIQAEIe",
+ "Chxjb20udHdpbmUudGFuZ28ucG1yLmhhcmR3YXJlYgZwcm90bzM="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.HardwareWinderType), }, null));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum HardwareWinderType {
+ [pbr::OriginalName("InternalWinder")] InternalWinder = 0,
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code