Class OutputPin
java.lang.Object
io.zucchini.circuitsimtester.api.BasePin
io.zucchini.circuitsimtester.api.OutputPin
Wraps a CircuitSim output
Pin
component and provides a
convenience method for setting its value.-
Field Summary
Fields inherited from class io.zucchini.circuitsimtester.api.BasePin
pin, subcircuit
-
Constructor Summary
ConstructorsConstructorDescriptionOutputPin
(com.ra4king.circuitsim.simulator.components.wiring.Pin pin, Subcircuit subcircuit) Creates a new OutputPin which wraps the providedPin
component and which lives in the providedSubcircuit
. -
Method Summary
Methods inherited from class io.zucchini.circuitsimtester.api.BasePin
getPin, getSubcircuit
-
Constructor Details
-
OutputPin
Creates a new OutputPin which wraps the providedPin
component and which lives in the providedSubcircuit
.- Parameters:
pin
-Pin
component to wrapsubcircuit
- where this pin lives- See Also:
-
-
Method Details
-
get
public int get()Returns the current value of this output pin. Does not sign extend (seegetSext()
for that).- Returns:
- value of this pin
- Throws:
IllegalStateException
- If any bit is floating- See Also:
-
getSext
public int getSext()Returns the current value of this output pin sign-extended to 32 bits.- Returns:
- value of this pin sign-extended to 32 bits
- Throws:
IllegalStateException
- If any bit is floating- See Also:
-