Package se.sics.mspsim.util

Examples of se.sics.mspsim.util.ConfigManager


   
    this.mspNode = node;
   
    node.setCommandHandler(commandHandler);

    ConfigManager config = new ConfigManager();
    node.setup(config);

    this.myCpu = node.getCPU();
    this.myCpu.setMonitorExec(true);
    this.myCpu.setTrace(0); /* TODO Enable */
 
View Full Code Here


    });

    handler.registerCommand("sysinfo", new BasicCommand("show info about the MSPSim system", "[-registry] [-config]") {
        public int executeCommand(CommandContext context) {
            ConfigManager config = (ConfigManager) registry.getComponent("config");
            context.out.println("--------- System info ----------\n");
            context.out.println("MSPSim version: " + MSP430Constants.VERSION);
            context.out.println("Java version  : " + System.getProperty("java.version") + " " +
                    System.getProperty("java.vendor"));
            context.out.println("Firmware      : " + config.getProperty("firmwareFile", "-"));
            context.out.println("AutoloadScript: " + config.getProperty("autoloadScript", "-"));
            context.out.println();
            if (context.getOption("registry")) {
                context.out.println("--------- Registry info --------\n");
                registry.printRegistry(context.out);
            }
            if (context.getOption("config")) {
                context.out.println("--------- Configuration ---------\n");
                config.print(context.out);
            }
            return 0;
        }
    });

    handler.registerCommand("quit", new BasicCommand("exit MSPSim", "") {
        public int executeCommand(CommandContext context) {
          /* TODO: flush all files, etc.... */
          System.exit(0);
          return 0;
        }
      });

    handler.registerCommand("exit", new BasicCommand("exit MSPSim", "") {
        public int executeCommand(CommandContext context) {
            System.exit(0);
            return 0;
        }
    });

    handler.registerCommand("set", new BasicCommand("set a config parameter", "<parameter> <value>") {
        public int executeCommand(CommandContext context) {
            ConfigManager config = (ConfigManager) registry.getComponent("config");
            config.setProperty(context.getArgument(0), context.getArgument(1));
            context.out.println("set " + context.getArgument(0) + " to " + context.getArgument(1));
            return 0;
        }
    });

View Full Code Here

      }});
    PrintStream out = new PrintStream(lout);
    this.commandHandler = new CommandHandler(out, out);
    node.setCommandHandler(commandHandler);

    ConfigManager config = new ConfigManager();
    node.setup(config);

    this.myCpu = node.getCPU();
    this.myCpu.setMonitorExec(true);
View Full Code Here

   
    this.mspNode = node;
   
    node.setCommandHandler(commandHandler);

    ConfigManager config = new ConfigManager();
    node.setup(config);

    this.myCpu = node.getCPU();
    this.myCpu.setMonitorExec(true);
    this.myCpu.setTrace(0); /* TODO Enable */
 
View Full Code Here

   */
  protected void prepareMote(File fileELF, GenericNode node) throws IOException {
    this.commandHandler = new CommandHandler(System.out, System.err);
    node.setCommandHandler(commandHandler);

    ConfigManager config = new ConfigManager();
    node.setup(config);

    this.myCpu = node.getCPU();
    this.myCpu.setMonitorExec(true);
    this.myCpu.setTrace(0); /* TODO Enable */
 
View Full Code Here

TOP

Related Classes of se.sics.mspsim.util.ConfigManager

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.