diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 12:35:54 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-08 12:35:54 +0200 |
| commit | f7cd23fa57b58bf86b71cae469f37c03913a9a80 (patch) | |
| tree | 814d7b15d82b977bc1f2f2832237228917db7114 | |
| parent | d1799765af79003be5f30053134a12158ce98d82 (diff) | |
| parent | 327bebbd6a8be6abd20883d475cd491011b26123 (diff) | |
| download | Tango-f7cd23fa57b58bf86b71cae469f37c03913a9a80.tar.gz Tango-f7cd23fa57b58bf86b71cae469f37c03913a9a80.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs | 327 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/Jobs/Motor.cs | 540 |
2 files changed, 867 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs new file mode 100644 index 000000000..9a196728b --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Jobs/Dispenser.cs @@ -0,0 +1,327 @@ +// 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/Motor.cs b/Software/Visual_Studio/Tango.PMR/Jobs/Motor.cs new file mode 100644 index 000000000..b0ce0abe2 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Jobs/Motor.cs @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: motor.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 motor.proto</summary> + public static partial class MotorReflection { + + #region Descriptor + /// <summary>File descriptor for motor.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MotorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cgttb3Rvci5wcm90bxIOVGFuZ28uUE1SLkpvYnMisAIKC01vdG9yQ29uZmln", + "EiMKAklkGAEgASgOMhcuVGFuZ28uUE1SLkpvYnMuTW90b3JJZBIPCgdtaW5m", + "cmVxGAIgASgNEg8KB21heGZyZXEYAyABKA0SFAoMbWlubWljcm9zdGVwGAQg", + "ASgNEhQKDG1heG1pY3Jvc3RlcBgFIAEoDRITCgtsaW5lYXJyYXRpbxgGIAEo", + "ARIWCg5tZWRpYW5wb3NpdGlvbhgHIAEoDRIWCg5jb3JyZWN0aW9uZ2FpbhgI", + "IAEoARIXCg9yYXRpb24yZHJ5ZXJzcGQYCSABKAESCgoCS3AYCiABKAESCgoC", + "S2kYCyABKAESCgoCS2QYDCABKAESEwoLY2hhbmdlU2xvcGUYDSABKAESFwoP", + "aGlnaHRpbWVvdXRtU2VjGA4gASgBKjgKB01vdG9ySWQSCgoGRmVlZGVyEAAS", + "CQoFRHJ5ZXIQARIKCgZQb29sZXIQAhIKCgZXaW5kZXIQA0IaChhjb20udHdp", + "bmUudGFuZ28ucG1yLmpvYnNiBnByb3RvMw==")); + 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) + })); + } + #endregion + + } + #region Enums + public enum MotorId { + [pbr::OriginalName("Feeder")] Feeder = 0, + [pbr::OriginalName("Dryer")] Dryer = 1, + [pbr::OriginalName("Pooler")] Pooler = 2, + [pbr::OriginalName("Winder")] Winder = 3, + } + + #endregion + + #region Messages + public sealed partial class MotorConfig : pb::IMessage<MotorConfig> { + private static readonly pb::MessageParser<MotorConfig> _parser = new pb::MessageParser<MotorConfig>(() => new MotorConfig()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<MotorConfig> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Jobs.MotorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MotorConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [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_; + kp_ = other.kp_; + ki_ = other.ki_; + kd_ = other.kd_; + changeSlope_ = other.changeSlope_; + hightimeoutmSec_ = other.hightimeoutmSec_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MotorConfig Clone() { + return new MotorConfig(this); + } + + /// <summary>Field number for the "Id" field.</summary> + public const int IdFieldNumber = 1; + private global::Tango.PMR.Jobs.MotorId id_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Jobs.MotorId Id { + get { return id_; } + set { + id_ = value; + } + } + + /// <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_; } + set { + minfreq_ = value; + } + } + + /// <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_; } + set { + maxfreq_ = value; + } + } + + /// <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_; } + set { + minmicrostep_ = value; + } + } + + /// <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_; } + set { + maxmicrostep_ = value; + } + } + + /// <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_; } + set { + linearratio_ = value; + } + } + + /// <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_; } + set { + medianposition_ = 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 "ration2dryerspd" field.</summary> + public const int Ration2DryerspdFieldNumber = 9; + private double ration2Dryerspd_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double Ration2Dryerspd { + get { return ration2Dryerspd_; } + set { + ration2Dryerspd_ = 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 "hightimeoutmSec" field.</summary> + public const int HightimeoutmSecFieldNumber = 14; + private double hightimeoutmSec_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double HightimeoutmSec { + get { return hightimeoutmSec_; } + set { + hightimeoutmSec_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MotorConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MotorConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + 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 (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; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + 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 (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(); + 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 (Minfreq != 0) { + output.WriteRawTag(16); + output.WriteUInt32(Minfreq); + } + if (Maxfreq != 0) { + output.WriteRawTag(24); + output.WriteUInt32(Maxfreq); + } + if (Minmicrostep != 0) { + output.WriteRawTag(32); + output.WriteUInt32(Minmicrostep); + } + if (Maxmicrostep != 0) { + output.WriteRawTag(40); + output.WriteUInt32(Maxmicrostep); + } + if (Linearratio != 0D) { + output.WriteRawTag(49); + output.WriteDouble(Linearratio); + } + if (Medianposition != 0) { + output.WriteRawTag(56); + output.WriteUInt32(Medianposition); + } + if (Correctiongain != 0D) { + output.WriteRawTag(65); + output.WriteDouble(Correctiongain); + } + if (Ration2Dryerspd != 0D) { + output.WriteRawTag(73); + output.WriteDouble(Ration2Dryerspd); + } + 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 (HightimeoutmSec != 0D) { + output.WriteRawTag(113); + output.WriteDouble(HightimeoutmSec); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Id); + } + 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 (Linearratio != 0D) { + size += 1 + 8; + } + if (Medianposition != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Medianposition); + } + if (Correctiongain != 0D) { + size += 1 + 8; + } + if (Ration2Dryerspd != 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 (HightimeoutmSec != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MotorConfig other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + 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.Linearratio != 0D) { + Linearratio = other.Linearratio; + } + if (other.Medianposition != 0) { + Medianposition = other.Medianposition; + } + if (other.Correctiongain != 0D) { + Correctiongain = other.Correctiongain; + } + if (other.Ration2Dryerspd != 0D) { + Ration2Dryerspd = other.Ration2Dryerspd; + } + 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.HightimeoutmSec != 0D) { + HightimeoutmSec = other.HightimeoutmSec; + } + } + + [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.Jobs.MotorId) input.ReadEnum(); + break; + } + case 16: { + Minfreq = input.ReadUInt32(); + break; + } + case 24: { + Maxfreq = input.ReadUInt32(); + break; + } + case 32: { + Minmicrostep = input.ReadUInt32(); + break; + } + case 40: { + Maxmicrostep = input.ReadUInt32(); + break; + } + case 49: { + Linearratio = input.ReadDouble(); + break; + } + case 56: { + Medianposition = input.ReadUInt32(); + break; + } + case 65: { + Correctiongain = input.ReadDouble(); + break; + } + case 73: { + Ration2Dryerspd = 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: { + HightimeoutmSec = input.ReadDouble(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code |
