Example #1
0
 public void MergeFrom(LocalizationEstimate other)
 {
     if (other == null)
     {
         return;
     }
     if (other.header_ != null)
     {
         if (header_ == null)
         {
             header_ = new global::Apollo.Common.Header();
         }
         Header.MergeFrom(other.Header);
     }
     if (other.pose_ != null)
     {
         if (pose_ == null)
         {
             pose_ = new global::Apollo.Localization.Pose();
         }
         Pose.MergeFrom(other.Pose);
     }
     if (other.uncertainty_ != null)
     {
         if (uncertainty_ == null)
         {
             uncertainty_ = new global::Apollo.Localization.Uncertainty();
         }
         Uncertainty.MergeFrom(other.Uncertainty);
     }
     if (other.MeasurementTime != 0D)
     {
         MeasurementTime = other.MeasurementTime;
     }
     trajectoryPoint_.Add(other.trajectoryPoint_);
     if (other.msfStatus_ != null)
     {
         if (msfStatus_ == null)
         {
             msfStatus_ = new global::Apollo.Localization.MsfStatus();
         }
         MsfStatus.MergeFrom(other.MsfStatus);
     }
     if (other.sensorStatus_ != null)
     {
         if (sensorStatus_ == null)
         {
             sensorStatus_ = new global::Apollo.Localization.MsfSensorMsgStatus();
         }
         SensorStatus.MergeFrom(other.SensorStatus);
     }
 }
Example #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (header_ == null)
                    {
                        header_ = new global::Apollo.Common.Header();
                    }
                    input.ReadMessage(header_);
                    break;
                }

                case 18: {
                    if (pose_ == null)
                    {
                        pose_ = new global::Apollo.Localization.Pose();
                    }
                    input.ReadMessage(pose_);
                    break;
                }

                case 26: {
                    if (uncertainty_ == null)
                    {
                        uncertainty_ = new global::Apollo.Localization.Uncertainty();
                    }
                    input.ReadMessage(uncertainty_);
                    break;
                }

                case 33: {
                    MeasurementTime = input.ReadDouble();
                    break;
                }

                case 42: {
                    trajectoryPoint_.AddEntriesFrom(input, _repeated_trajectoryPoint_codec);
                    break;
                }

                case 50: {
                    if (msfStatus_ == null)
                    {
                        msfStatus_ = new global::Apollo.Localization.MsfStatus();
                    }
                    input.ReadMessage(msfStatus_);
                    break;
                }

                case 58: {
                    if (sensorStatus_ == null)
                    {
                        sensorStatus_ = new global::Apollo.Localization.MsfSensorMsgStatus();
                    }
                    input.ReadMessage(sensorStatus_);
                    break;
                }
                }
            }
        }