Class InputPin


  • public class InputPin
    extends BasePin
    Wraps a CircuitSim input Pin component and provides a convenience method for setting its value.
    • Constructor Detail

      • InputPin

        public InputPin​(com.ra4king.circuitsim.simulator.components.wiring.Pin pin,
                        Subcircuit subcircuit)
        Creates a new InputPin which wraps the provided Pin component and which lives in the provided Subcircuit.
        Parameters:
        pin - Pin component to wrap
        subcircuit - where this pin lives
        See Also:
        BasePin(Pin, Subcircuit)
    • Method Detail

      • set

        public void set​(int value)
        Sets the value of this input pin and allows the change to propagate through the circuit.
        Parameters:
        value - what to set the pin to. Negative numbers are fine.