Examples of PortListener


Examples of net.wimpi.telnetd.net.PortListener

    //
    ArrayList<PortListener> listeners = new ArrayList<PortListener>();
    String[] listnames = StringUtil.split(props.getProperty("listeners"), ",");
    for (String listname : listnames) {
      PortListener listener = PortListener.createPortListener(listname, props);
      listeners.add(listener);
    }

    //
    this.listeners = listeners;

    // Start listeners
    for (PortListener listener : this.listeners) {
      listener.start();
      map.put(listener.getConnectionManager(), this);
    }
  }
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public TyndallLED(Mote mote) {
    mspMote = (TyndallMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P7");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & TyndallNode.LEDS_CONF_RED) == 0;
          setChanged();
          notifyObservers();
        }
      });
    }
    unit = mspMote.getCPU().getIOUnit("P8");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          greenOn = (data & TyndallNode.LEDS_CONF_GREEN) == 0;
          setChanged();
          notifyObservers();
        }
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public TrxebLEDs(Mote mote) {
    mspMote = (Exp5438Mote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P4");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & (1<<0)) == 0;
          yellowOn = (data & (1<<1)) == 0;
          greenOn = (data & (1<<2)) == 0;
          blueOn = (data & (1<<3)) == 0;
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public Exp5438LED(Mote mote) {
    mspMote = (Exp5438Mote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P1");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & Exp5438Node.LEDS_CONF_RED) != 0;
          yellowOn = (data & Exp5438Node.LEDS_CONF_YELLOW) != 0;
          setChanged();
          notifyObservers();
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public SkyLED(Mote mote) {
    mspMote = (SkyMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("Port 5");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          blueOn = (data & SkyNode.BLUE_LED) == 0;
          greenOn = (data & SkyNode.GREEN_LED) == 0;
          redOn = (data & SkyNode.RED_LED) == 0;
          setChanged();
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public SkyLED(Mote mote) {
    mspMote = (SkyMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("Port 5");
    if (unit instanceof IOPort) {
      ((IOPort) unit).setPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          blueOn = (data & SkyNode.BLUE_LED) == 0;
          greenOn = (data & SkyNode.GREEN_LED) == 0;
          redOn = (data & SkyNode.RED_LED) == 0;
          setChanged();
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public Exp5438LED(Mote mote) {
    mspMote = (Exp5438Mote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P1");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & Exp5438Node.LEDS_CONF_RED) != 0;
          yellowOn = (data & Exp5438Node.LEDS_CONF_YELLOW) != 0;
          setChanged();
          notifyObservers();
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public TyndallLED(Mote mote) {
    mspMote = (TyndallMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("P7");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          redOn = (data & TyndallNode.LEDS_CONF_RED) == 0;
          setChanged();
          notifyObservers();
        }
      });
    }
    unit = mspMote.getCPU().getIOUnit("P8");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          greenOn = (data & TyndallNode.LEDS_CONF_GREEN) == 0;
          setChanged();
          notifyObservers();
        }
View Full Code Here

Examples of se.sics.mspsim.core.PortListener

  public SkyLED(Mote mote) {
    mspMote = (SkyMote) mote;

    IOUnit unit = mspMote.getCPU().getIOUnit("Port 5");
    if (unit instanceof IOPort) {
      ((IOPort) unit).addPortListener(new PortListener() {
        public void portWrite(IOPort source, int data) {
          blueOn = (data & SkyNode.BLUE_LED) == 0;
          greenOn = (data & SkyNode.GREEN_LED) == 0;
          redOn = (data & SkyNode.RED_LED) == 0;
          setChanged();
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.