[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/plugins GroupCommChatPlugin.java, 1.3, 1.4

Chien-Liang Fok chien-liang at users.sourceforge.net
Wed Sep 27 01:52:20 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/plugins
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21269/plugins

Modified Files:
	GroupCommChatPlugin.java 
Log Message:
made address of local mote a parameter

Index: GroupCommChatPlugin.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/plugins/GroupCommChatPlugin.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GroupCommChatPlugin.java	27 Sep 2006 08:40:56 -0000	1.3
--- GroupCommChatPlugin.java	27 Sep 2006 08:52:18 -0000	1.4
***************
*** 40,43 ****
--- 40,48 ----
  	
  	/**
+ 	 * The address of the mote that is attached to the base station.
+ 	 */
+ 	private int local_moteaddr = 0;
+ 	
+ 	/**
  	 * Creates GroupCommChatPlugin with the default user name of
  	 * "unk".
***************
*** 72,75 ****
--- 77,83 ----
  					injectMember = true;
  				}
+ 				else if (args[i].equals("-localAddr")){
+ 					local_moteaddr = Integer.valueOf(args[++i]).intValue();
+ 				}
  				else throw new Exception("Unknown parameter: " + args[i]);
  			}
***************
*** 513,518 ****
  					chatMsg.addField(new AgillaString(outMessage));
  					
! 					log("Sending a chat message to 0: " + chatMsg);				
! 					injector.getTS().rout(chatMsg, 0);
  					
  					outText.setText("");
--- 521,526 ----
  					chatMsg.addField(new AgillaString(outMessage));
  					
! 					log("Sending a chat message to : " + local_moteaddr + chatMsg);				
! 					injector.getTS().rout(chatMsg, local_moteaddr);
  					
  					outText.setText("");



More information about the Tinyos-contrib-commits mailing list