public Value getPortValue(int portIndex) { InstanceComponent c = comp; CircuitState s = context.getCircuitState(); if (c != null && s != null) { return s.getValue(c.getEnd(portIndex).getLocation()); } else { return Value.UNKNOWN; } }
public boolean isPortConnected(int index) { Circuit circ = context.getCircuit(); Location loc = comp.getEnd(index).getLocation(); return circ.isConnected(loc, comp); }