[Tinyos-commits] CVS: tinyos-1.x/tools/java/net/tinyos/tools Deluge.java, 1.12, 1.13

Jonathan Hui jwhui at users.sourceforge.net
Sat Aug 27 15:30:43 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/tools/java/net/tinyos/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3496

Modified Files:
	Deluge.java 
Log Message:
- Ping a specific node.



Index: Deluge.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tools/java/net/tinyos/tools/Deluge.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Deluge.java	23 Aug 2005 01:52:46 -0000	1.12
--- Deluge.java	27 Aug 2005 22:30:39 -0000	1.13
***************
*** 51,54 ****
--- 51,55 ----
    private int mode = S_NONE;
    private int imageNum = -1;
+   private int nodeid = MoteIF.TOS_BCAST_ADDR;
    private boolean verbose = false;
    private String infile = "";
***************
*** 73,76 ****
--- 74,78 ----
      + "   -d,  --dump            : dumps data injected to node\n"
      + "  options are:\n"
+     + "   -id, --nodeid=<num>    : node id\n"
      + "   -ti, --tosimage=<xml>  : tos_image.xml file (program images)\n"
      + "   -in, --imgnum=<num>    : image num\n"
***************
*** 114,117 ****
--- 116,125 ----
  	modeCount++;
        }
+       else if (args[i].length() > 3 && args[i].substring(0,4).equals("-id=")) {
+ 	nodeid = Integer.parseInt( args[i].substring(4,args[i].length()) );
+       }
+       else if (args[i].length() > 8 && args[i].substring(0,9).equals("--nodeid=")) {
+ 	nodeid = Integer.parseInt( args[i].substring(9,args[i].length()) );
+       }      
        else if (args[i].length() > 3 && args[i].substring(0,4).equals("-ti=")) {
  	infile = args[i].substring(4,args[i].length());	
***************
*** 176,180 ****
      Pinger pinger = null;
      
!     pinger = new Pinger(moteif, verbose);
      pinger.ping();
  
--- 184,188 ----
      Pinger pinger = null;
      
!     pinger = new Pinger(moteif, verbose, nodeid);
      pinger.ping();
  
***************
*** 192,195 ****
--- 200,207 ----
  
        for ( int i = 0; i < pinger.getNumImages(); i++ ) {
+ 
+ 	if ( imageNum != -1 && imageNum != i )
+ 	  continue;
+ 
  	if (i == 0)
  	  System.out.println("  Stored Image 0 - (Golden Image)");



More information about the Tinyos-commits mailing list