示例#1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="circuit">the circuit to simulate</param>
 /// <param name="signalList">signals to stimulate the circuit with</param>
 public Simulation(Circuit circuit, SignalList signalList)
 {
     m_Timer = new Timer(50);
     //leave this false to prevent a step to take action when another one is still processing
     m_Timer.AutoReset = false;
     m_Timer.Elapsed  += new ElapsedEventHandler(SimulationTimerElapsed);
     m_Circuit         = circuit;
     m_EditorSignals   = signalList;
     //signalList.OnListChanged
     m_SignalList   = new SignalList();
     m_CurrentStep  = 0;
     m_StepTimeSpan = new AverageValue();
     GenerateSignals();
     SimulationState = SimulationState.Ready;
 }
示例#2
0
        public override bool Equals(object obj)
        {
            if (obj is SignalList == false)
            {
                return(false);
            }
            SignalList other = (SignalList)obj;

            if (other.Count != this.Count)
            {
                return(false);
            }
            for (int i = 0; i < Count; i++)
            {
                if (this[i].Equals(other[i]) == false)
                {
                    return(false);
                }
            }
            return(true);
        }