Examples of Port


Examples of com.cburch.logisim.instance.Port

  private void configurePorts(Instance instance) {
    BitWidth inWidth = instance.getAttributeValue(StdAttr.WIDTH);
    int outWidth = computeOutputBits(inWidth.getWidth() - 1);

    Port[] ps = new Port[3];
    ps[0] = new Port(-2020, Port.OUTPUT, BitWidth.ONE);
    ps[1] = new Port0,   0, Port.OUTPUT, BitWidth.create(outWidth));
    ps[2] = new Port(-40,   0, Port.INPUT,  inWidth);
   
    Object type = instance.getAttributeValue(TYPE);
    if (type == HIGH_ZERO) {
      ps[0].setToolTip(Strings.getter("bitFinderPresentTip", "0"));
      ps[1].setToolTip(Strings.getter("bitFinderIndexHighTip", "0"));
View Full Code Here

Examples of com.cburch.logisim.instance.Port

      inPt  = Location.create(-30, 0);
      selPt = Location.create(-10, 10);
    }
   
    Port[] ps = new Port[3];
    ps[0] = new Port(0, 0, Port.OUTPUT, group.getWidth());
    ps[1] = new Port(inPt.getX(), inPt.getY(), Port.INPUT, data.getWidth());
    ps[2] = new Port(selPt.getX(), selPt.getY(), Port.INPUT, select.getWidth());
    ps[0].setToolTip(Strings.getter("bitSelectorOutputTip"));
    ps[1].setToolTip(Strings.getter("bitSelectorDataTip"));
    ps[2].setToolTip(Strings.getter("bitSelectorSelectTip"));
    instance.setPorts(ps);
  }
View Full Code Here

Examples of com.cburch.logisim.instance.Port

    case 3: y = -10; break;
    default: y = ((inputs - 1) / 2) * -10;
    }

    Port[] ps = new Port[inputs + 1];
    ps[0] = new Port(0, 0, Port.OUTPUT, BitWidth.create(outWidth));
    ps[0].setToolTip(Strings.getter("bitAdderOutputManyTip"));
    for (int i = 0; i < inputs; i++) {
      ps[i + 1] = new Port(-40, y + i * dy, Port.INPUT, inWidth);
      ps[i + 1].setToolTip(Strings.getter("bitAdderInputTip"));
    }
    instance.setPorts(ps);
  }
View Full Code Here

Examples of com.cburch.logisim.instance.Port

    Object size = instance.getAttributeValue(ATTR_SIZE);
    Direction facing = instance.getAttributeValue(StdAttr.FACING);
    int dx = size == SIZE_NARROW ? -20 : -30;

    Port[] ports = new Port[2];
    ports[0] = new Port(0, 0, Port.OUTPUT, StdAttr.WIDTH);
    Location out = Location.create(0, 0).translate(facing, dx);
    ports[1] = new Port(out.getX(), out.getY(), Port.INPUT, StdAttr.WIDTH);
    instance.setPorts(ports);
  }
View Full Code Here

Examples of com.cburch.logisim.instance.Port

        Color.BLACK, DEFAULT_BACKGROUND
      });
    setIconName("tty.gif");
   
    Port[] ps = new Port[4];
    ps[CLR] = new Port(2010, Port.INPUT, 1);
    ps[CK= new Port( 0,   0, Port.INPUT, 1);
    ps[WE= new Port(1010, Port.INPUT, 1);
    ps[IN= new Port( 0, -10, Port.INPUT, 7);
    ps[CLR].setToolTip(Strings.getter("ttyClearTip"));
    ps[CK].setToolTip(Strings.getter("ttyClockTip"));
    ps[WE].setToolTip(Strings.getter("ttyEnableTip"));
    ps[IN].setToolTip(Strings.getter("ttyInputTip"));
    setPorts(ps);
View Full Code Here

Examples of com.cburch.logisim.instance.Port

     * the component's anchor location, then whether the port is an
     * input/output/both, and finally the expected bit width for the port.
     * The bit width can be a constant (like 1) or an attribute (as here).
     */
    setPorts(new Port[] {
        new Port(-30, 0, Port.INPUT, StdAttr.WIDTH),
        new Port(0, 0, Port.OUTPUT, StdAttr.WIDTH),
      });
  }
View Full Code Here

Examples of com.cburch.logisim.instance.Port

class GrayCounter extends InstanceFactory {
  public GrayCounter() {
    super("Gray Counter");
    setOffsetBounds(Bounds.create(-30, -15, 30, 30));
    setPorts(new Port[] {
        new Port(-30, 0, Port.INPUT, 1),
        new Port0, 0, Port.OUTPUT, StdAttr.WIDTH),
    });
   
    // We'll have width, label, and label font attributes. The latter two
    // attributes allow us to associate a label with the component (though
    // we'll also need configureNewInstance to configure the label's
View Full Code Here

Examples of com.cburch.logisim.instance.Port

 
  public SimpleGrayCounter() {
    super("Gray Counter (Simple)");
    setOffsetBounds(Bounds.create(-30, -15, 30, 30));
    setPorts(new Port[] {
        new Port(-30, 0, Port.INPUT, 1),
        new Port0, 0, Port.OUTPUT, BIT_WIDTH.getWidth()),
    });
  }
View Full Code Here

Examples of com.cloud.network.bigswitch.Port

                }
        }
    }

    private Answer executeRequest(CreateVnsPortCommand cmd, int numRetries) {
        Port port = new Port();
        port.setId(cmd.getPortUuid());
        port.setName(cmd.getPortName());
        port.setTenant_id(cmd.getTenantUuid());

        try {
            _bigswitchVnsApi.createPort(cmd.getNetworkUuid(), port);
            try {
                Attachment attachment = new Attachment();
View Full Code Here

Examples of com.ftdichip.ftd2xx.Port

        device.reset();
        device.purgeReceiveBuffer();
        device.purgeTransmitBuffer();

        Port port = device.getPort();
        port.setBaudRate(baudRate);
        port.setDataCharacteristics(dataBits, stopBits, parity);
        port.setFlowControl(flowControl);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.