Beispiel #1
0
 public void MergeFrom(CanbusConf other)
 {
     if (other == null)
     {
         return;
     }
     if (other.vehicleParameter_ != null)
     {
         if (vehicleParameter_ == null)
         {
             vehicleParameter_ = new global::Apollo.Canbus.VehicleParameter();
         }
         VehicleParameter.MergeFrom(other.VehicleParameter);
     }
     if (other.canCardParameter_ != null)
     {
         if (canCardParameter_ == null)
         {
             canCardParameter_ = new global::Apollo.Drivers.Canbus.CANCardParameter();
         }
         CanCardParameter.MergeFrom(other.CanCardParameter);
     }
     if (other.EnableDebugMode != false)
     {
         EnableDebugMode = other.EnableDebugMode;
     }
     if (other.EnableReceiverLog != false)
     {
         EnableReceiverLog = other.EnableReceiverLog;
     }
     if (other.EnableSenderLog != false)
     {
         EnableSenderLog = other.EnableSenderLog;
     }
 }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (vehicleParameter_ != null)
            {
                hash ^= VehicleParameter.GetHashCode();
            }
            if (canCardParameter_ != null)
            {
                hash ^= CanCardParameter.GetHashCode();
            }
            if (EnableDebugMode != false)
            {
                hash ^= EnableDebugMode.GetHashCode();
            }
            if (EnableReceiverLog != false)
            {
                hash ^= EnableReceiverLog.GetHashCode();
            }
            if (EnableSenderLog != false)
            {
                hash ^= EnableSenderLog.GetHashCode();
            }
            return(hash);
        }