diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/Diagnostics')
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs | 73 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/Diagnostics/TelemetryWire.cs | 187 |
2 files changed, 206 insertions, 54 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs index b9155dcb4..97bcf2931 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs @@ -23,13 +23,14 @@ namespace Tango.PMR.Diagnostics { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CiBTdGFydFRlbGVtZXRyeVdpcmVSZXNwb25zZS5wcm90bxIVVGFuZ28uUE1S", - "LkRpYWdub3N0aWNzIjkKGlN0YXJ0VGVsZW1ldHJ5V2lyZVJlc3BvbnNlEgwK", - "BE5hbWUYASABKAkSDQoFVmFsdWUYAiABKAJCIQofY29tLnR3aW5lLnRhbmdv", + "LkRpYWdub3N0aWNzGhNUZWxlbWV0cnlXaXJlLnByb3RvIlEKGlN0YXJ0VGVs", + "ZW1ldHJ5V2lyZVJlc3BvbnNlEjMKBVdpcmVzGAEgAygLMiQuVGFuZ28uUE1S", + "LkRpYWdub3N0aWNzLlRlbGVtZXRyeVdpcmVCIQofY29tLnR3aW5lLnRhbmdv", "LnBtci5kaWFnbm9zdGljc2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, + new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.TelemetryWireReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.StartTelemetryWireResponse), global::Tango.PMR.Diagnostics.StartTelemetryWireResponse.Parser, new[]{ "Name", "Value" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.StartTelemetryWireResponse), global::Tango.PMR.Diagnostics.StartTelemetryWireResponse.Parser, new[]{ "Wires" }, null, null, null) })); } #endregion @@ -60,8 +61,7 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public StartTelemetryWireResponse(StartTelemetryWireResponse other) : this() { - name_ = other.name_; - value_ = other.value_; + wires_ = other.wires_.Clone(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -69,26 +69,14 @@ namespace Tango.PMR.Diagnostics { return new StartTelemetryWireResponse(this); } - /// <summary>Field number for the "Name" field.</summary> - public const int NameFieldNumber = 1; - private string name_ = ""; + /// <summary>Field number for the "Wires" field.</summary> + public const int WiresFieldNumber = 1; + private static readonly pb::FieldCodec<global::Tango.PMR.Diagnostics.TelemetryWire> _repeated_wires_codec + = pb::FieldCodec.ForMessage(10, global::Tango.PMR.Diagnostics.TelemetryWire.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.Diagnostics.TelemetryWire> wires_ = new pbc::RepeatedField<global::Tango.PMR.Diagnostics.TelemetryWire>(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// <summary>Field number for the "Value" field.</summary> - public const int ValueFieldNumber = 2; - private float value_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public float Value { - get { return value_; } - set { - value_ = value; - } + public pbc::RepeatedField<global::Tango.PMR.Diagnostics.TelemetryWire> Wires { + get { return wires_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -104,16 +92,14 @@ namespace Tango.PMR.Diagnostics { if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; - if (Value != other.Value) return false; + if(!wires_.Equals(other.wires_)) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (Value != 0F) hash ^= Value.GetHashCode(); + hash ^= wires_.GetHashCode(); return hash; } @@ -124,25 +110,13 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); - } - if (Value != 0F) { - output.WriteRawTag(21); - output.WriteFloat(Value); - } + wires_.WriteTo(output, _repeated_wires_codec); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (Value != 0F) { - size += 1 + 4; - } + size += wires_.CalculateSize(_repeated_wires_codec); return size; } @@ -151,12 +125,7 @@ namespace Tango.PMR.Diagnostics { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.Value != 0F) { - Value = other.Value; - } + wires_.Add(other.wires_); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -168,11 +137,7 @@ namespace Tango.PMR.Diagnostics { input.SkipLastField(); break; case 10: { - Name = input.ReadString(); - break; - } - case 21: { - Value = input.ReadFloat(); + wires_.AddEntriesFrom(input, _repeated_wires_codec); break; } } diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/TelemetryWire.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/TelemetryWire.cs new file mode 100644 index 000000000..b30dc3caa --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/TelemetryWire.cs @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TelemetryWire.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.Diagnostics { + + /// <summary>Holder for reflection information generated from TelemetryWire.proto</summary> + public static partial class TelemetryWireReflection { + + #region Descriptor + /// <summary>File descriptor for TelemetryWire.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TelemetryWireReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChNUZWxlbWV0cnlXaXJlLnByb3RvEhVUYW5nby5QTVIuRGlhZ25vc3RpY3Mi", + "LAoNVGVsZW1ldHJ5V2lyZRIMCgROYW1lGAEgASgJEg0KBVZhbHVlGAIgASgC", + "QiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlhZ25vc3RpY3NiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.TelemetryWire), global::Tango.PMR.Diagnostics.TelemetryWire.Parser, new[]{ "Name", "Value" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class TelemetryWire : pb::IMessage<TelemetryWire> { + private static readonly pb::MessageParser<TelemetryWire> _parser = new pb::MessageParser<TelemetryWire>(() => new TelemetryWire()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<TelemetryWire> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Diagnostics.TelemetryWireReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TelemetryWire() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TelemetryWire(TelemetryWire other) : this() { + name_ = other.name_; + value_ = other.value_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TelemetryWire Clone() { + return new TelemetryWire(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 "Value" field.</summary> + public const int ValueFieldNumber = 2; + private float value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Value { + get { return value_; } + set { + value_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TelemetryWire); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TelemetryWire other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Value != other.Value) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Value != 0F) hash ^= Value.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 (Value != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Value); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Value != 0F) { + size += 1 + 4; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TelemetryWire other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Value != 0F) { + Value = other.Value; + } + } + + [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 21: { + Value = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code |
