diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.PMR/Diagnostics/StartTelemetryWireResponse.cs | 73 |
1 files changed, 19 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; } } |
