Package se.sics.mspsim.cli

Examples of se.sics.mspsim.cli.LineListener


    logArea = new JTextArea(4, 20);
    logArea.setTabSize(8);
    logArea.setEditable(false);
    panel.add(new JScrollPane(logArea), BorderLayout.CENTER);

    LineListener lineListener = new LineListener() {
      public void lineRead(String line) {
        addCLIData(line);
      }
    };
    PrintStream po = new PrintStream(new LineOutputStream(lineListener));
View Full Code Here


    return commandHandler.executeCommand(cmd, context);
  }

  public String executeCLICommand(String cmd) {
    final StringBuilder sb = new StringBuilder();
    LineListener ll = new LineListener() {
      public void lineRead(String line) {
        sb.append(line).append("\n");
      }
    };
    PrintStream po = new PrintStream(new LineOutputStream(ll));
View Full Code Here

    panel.add(commandField, BorderLayout.SOUTH);

    if (mspMote.hasCLIListener()) {
      logArea.setText("*** CLI already occupied by another listener ***");
    } else {
      myListener = new LineListener() {
        @Override
        public void lineRead(String line) {
          addCLIData(line);
        }
      };
View Full Code Here

   * @param fileELF ELF file
   * @param cpu MSP430 cpu
   * @throws IOException Preparing mote failed
   */
  protected void prepareMote(File fileELF, GenericNode node) throws IOException {
    LineOutputStream lout = new LineOutputStream(new LineListener() {
      @Override
      public void lineRead(String line) {
        LineListener listener = commandListener;
        if (listener != null) {
          listener.lineRead(line);
        }
      }});
    PrintStream out = new PrintStream(lout);
    this.commandHandler = new CommandHandler(out, out);
    node.setCommandHandler(commandHandler);
View Full Code Here

    try {
      cpu.step(cycleCounter);
    } catch (EmulationException e) {
      if (e.getMessage().startsWith("Bad operation")) {
        /* Experimental: print program counter history */
        LineListener oldListener = commandListener;
        LineListener tmpListener = new LineListener() {
          public void lineRead(String line) {
            logger.fatal(line);
          }
        };
        setCLIListener(tmpListener);
View Full Code Here

    return commandHandler.executeCommand(cmd, context);
  }

  public String executeCLICommand(String cmd) {
    final StringBuilder sb = new StringBuilder();
    LineListener ll = new LineListener() {
      public void lineRead(String line) {
        sb.append(line).append("\n");
      }
    };
    PrintStream po = new PrintStream(new LineOutputStream(ll));
View Full Code Here

    logArea = new JTextArea(4, 20);
    logArea.setTabSize(8);
    logArea.setEditable(false);
    panel.add(new JScrollPane(logArea), BorderLayout.CENTER);

    LineListener lineListener = new LineListener() {
      public void lineRead(String line) {
        addCLIData(line);
      }
    };
    PrintStream po = new PrintStream(new LineOutputStream(lineListener));
View Full Code Here

    return commandHandler.executeCommand(cmd, context);
  }

  public String executeCLICommand(String cmd) {
    final StringBuilder sb = new StringBuilder();
    LineListener ll = new LineListener() {
      public void lineRead(String line) {
        sb.append(line).append("\n");
      }
    };
    PrintStream po = new PrintStream(new LineOutputStream(ll));
View Full Code Here

TOP

Related Classes of se.sics.mspsim.cli.LineListener

Copyright © 2018 www.massapicom. 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.