Example #1
0
 public void MergeFrom(Header other)
 {
     if (other == null)
     {
         return;
     }
     if (other.TimestampSec != 0D)
     {
         TimestampSec = other.TimestampSec;
     }
     if (other.ModuleName.Length != 0)
     {
         ModuleName = other.ModuleName;
     }
     if (other.SequenceNum != 0)
     {
         SequenceNum = other.SequenceNum;
     }
     if (other.LidarTimestamp != 0UL)
     {
         LidarTimestamp = other.LidarTimestamp;
     }
     if (other.CameraTimestamp != 0UL)
     {
         CameraTimestamp = other.CameraTimestamp;
     }
     if (other.RadarTimestamp != 0UL)
     {
         RadarTimestamp = other.RadarTimestamp;
     }
     if (other.Version != 0)
     {
         Version = other.Version;
     }
     if (other.status_ != null)
     {
         if (status_ == null)
         {
             status_ = new global::Apollo.Common.StatusPb();
         }
         Status.MergeFrom(other.Status);
     }
     if (other.FrameId.Length != 0)
     {
         FrameId = other.FrameId;
     }
 }
Example #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 9: {
                    TimestampSec = input.ReadDouble();
                    break;
                }

                case 18: {
                    ModuleName = input.ReadString();
                    break;
                }

                case 24: {
                    SequenceNum = input.ReadUInt32();
                    break;
                }

                case 32: {
                    LidarTimestamp = input.ReadUInt64();
                    break;
                }

                case 40: {
                    CameraTimestamp = input.ReadUInt64();
                    break;
                }

                case 48: {
                    RadarTimestamp = input.ReadUInt64();
                    break;
                }

                case 56: {
                    Version = input.ReadUInt32();
                    break;
                }

                case 66: {
                    if (status_ == null)
                    {
                        status_ = new global::Apollo.Common.StatusPb();
                    }
                    input.ReadMessage(status_);
                    break;
                }

                case 74: {
                    FrameId = input.ReadString();
                    break;
                }
                }
            }
        }