/// <summary>Constructor and Copy constructor helper function</summary> public PassiveTimers SetFrom(PassiveTimers rhs) { if (rhs != null) { TP1 = rhs.TP1; TP2 = rhs.TP2; TP3 = rhs.TP3; TP4 = rhs.TP4; TP5 = rhs.TP5; TP6 = rhs.TP6; } else { TP1 = DefaultHandshakeTimerValue; TP2 = DefaultHandshakeTimerValue; TP3 = DefaultMotionTimerValue; TP4 = DefaultMotionTimerValue; TP5 = DefaultHandshakeTimerValue; TP6 = 0.0; } return(this); }
/// <summary>Copy constructor</summary> /// <param name="rhs">Defines the instance that this is constructed as a copy of.</param> public PassiveTimers(PassiveTimers rhs) { TP1 = rhs.TP1; TP2 = rhs.TP2; TP3 = rhs.TP3; TP4 = rhs.TP4; TP5 = rhs.TP5; TP6 = rhs.TP6; }
/// <summary> /// Compares this object against the rhs to determine if they are both of the same type and, if so, if they have the same contents. /// </summary> /// <param name="rhsAsObject">defines the object against which this one will be compared.</param> /// <returns>true if both objects contain the same values, false if rhsAsObject is null, is not of this type or has different contents</returns> public override bool Equals(object rhsAsObject) { PassiveTimers rhs = rhsAsObject as PassiveTimers; return(rhs != null && rhs.TP1 == TP1 && rhs.TP2 == TP2 && rhs.TP3 == TP3 && rhs.TP4 == TP4 && rhs.TP5 == TP5 && rhs.TP6 == TP6); }
/// <summary>Copy constructor</summary> public PassiveTimers(PassiveTimers rhs) { SetFrom(rhs); }