Class MockPulser

java.lang.Object
io.zucchini.circuitsimtester.api.MockPulser
Direct Known Subclasses:
Button, Clock

public abstract class MockPulser extends Object
Similar to MockRegister but much simpler: manipulates an InputPin which replaced a clock or button and is used to send "pulses" into the circuit. By "pulse", I mean an input like this:
 1            _
             | |
             | |
             | |
 0 __________| |___________

         Time --->
 
Notice that could be a button press or the rising edge of the clock signal (in CircuitSim we do not have to worry about propagation delay, thank God), hence this is a base class used for Button and Clock. Those classes have their own more specialized methods for sending pulses that ultimately call pulse().
  • Field Details

  • Constructor Details

  • Method Details

    • getMockPin

      public InputPin getMockPin()
    • getSubcircuit

      public Subcircuit getSubcircuit()
    • pulse

      protected void pulse()
      Set the mock pin to 0, then 1, then 0 again to simulate the "pulse" drawn above in the lede.