Beispiel #1
0
 public void MergeFrom(PhysicalMeasurement other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.value_ != null)
     {
         if (value_ == null)
         {
             value_ = new global::PhysicalQuantity();
         }
         Value.MergeFrom(other.Value);
     }
     if (other.Quality != 0)
     {
         Quality = other.Quality;
     }
     if (other.timestamp_ != null)
     {
         if (timestamp_ == null)
         {
             timestamp_ = new global::Timestamp();
         }
         Timestamp.MergeFrom(other.Timestamp);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Beispiel #2
0
    public void MergeFrom(pb::CodedInputStream input)
    {
        uint tag;

        while ((tag = input.ReadTag()) != 0)
        {
            switch (tag)
            {
            default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                break;

            case 10: {
                Name = input.ReadString();
                break;
            }

            case 18: {
                if (value_ == null)
                {
                    value_ = new global::PhysicalQuantity();
                }
                input.ReadMessage(value_);
                break;
            }

            case 24: {
                quality_ = (global::DataQuality)input.ReadEnum();
                break;
            }

            case 34: {
                if (timestamp_ == null)
                {
                    timestamp_ = new global::Timestamp();
                }
                input.ReadMessage(timestamp_);
                break;
            }
            }
        }
    }