[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/messages AgillaClusterDebugMsgJ.java, 1.1, 1.2

borndigerati borndigerati at users.sourceforge.net
Wed Apr 5 19:17:26 PDT 2006


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

Modified Files:
	AgillaClusterDebugMsgJ.java 
Log Message:


Index: AgillaClusterDebugMsgJ.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/messages/AgillaClusterDebugMsgJ.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AgillaClusterDebugMsgJ.java	5 Apr 2006 10:28:20 -0000	1.1
--- AgillaClusterDebugMsgJ.java	6 Apr 2006 02:17:22 -0000	1.2
***************
*** 36,47 ****
   */
  package edu.wustl.mobilab.agilla.messages;

import edu.wustl.mobilab.agilla.*;
! import edu.wustl.mobilab.agilla.variables.*;

/**
 * AgillaClusterDebugMsgJ.java
 *
 * @author Sangeeta Bhattacharya
 */
public class AgillaClusterDebugMsgJ implements MessageJ, AgillaConstants {
	int chId;
  	AgillaRectangle boundingBox;
	
  	public AgillaClusterDebugMsgJ() {		
  	}
! 	
	public AgillaClusterDebugMsgJ(int chId, AgillaRectangle boundingBox)
	{
		this.chId = chId;
  		this.boundingBox = boundingBox;
	}
  	
  	public AgillaClusterDebugMsgJ(AgillaClusterDebugMsg msg) {
  		this.chId = msg.get_id();
  		this.boundingBox = new AgillaRectangle(new AgillaLocation(msg.get_bounding_box_llc_x(), msg.get_bounding_box_llc_y()),
--- 36,50 ----
   */
  package edu.wustl.mobilab.agilla.messages;

import edu.wustl.mobilab.agilla.*;
! import edu.wustl.mobilab.agilla.variables.*;

/**
 * AgillaClusterDebugMsgJ.java
 *
 * @author Sangeeta Bhattacharya
 */
public class AgillaClusterDebugMsgJ implements MessageJ, AgillaConstants {
	int src;
! 	int chId;
  	AgillaRectangle boundingBox;
	
  	public AgillaClusterDebugMsgJ() {		
  	}
! 	
	public AgillaClusterDebugMsgJ(int src, int chId, AgillaRectangle boundingBox)
	{
		this.src = src;
! 		this.chId = chId;
  		this.boundingBox = boundingBox;
	}
  	
  	public AgillaClusterDebugMsgJ(AgillaClusterDebugMsg msg) {
+ 		this.src = msg.get_src();
  		this.chId = msg.get_id();
  		this.boundingBox = new AgillaRectangle(new AgillaLocation(msg.get_bounding_box_llc_x(), msg.get_bounding_box_llc_y()),
***************
*** 49,61 ****
  	
  	public int getType() {	
! 		return AgillaClusterMsg.AM_TYPE;
	}
	
  	public int chId(){
  		return chId;
! 	}
	public AgillaRectangle boundingBox() {
  		return boundingBox;
  	}
  
  	
! 	public net.tinyos.message.Message toTOSMsg() {
		AgillaClusterDebugMsg msg = new AgillaClusterDebugMsg();
		msg.set_id(chId);
  		msg.set_bounding_box_llc_x(boundingBox.lowerLeftCorner().getx());
  		msg.set_bounding_box_llc_y(boundingBox.lowerLeftCorner().gety());
--- 52,70 ----
  	
  	public int getType() {	
! 		return AgillaClusterDebugMsg.AM_TYPE;
	}
	
  	public int chId(){
  		return chId;
! 	}
! 	
! 	public int src(){
! 		return src;
! 	}
! 	
	public AgillaRectangle boundingBox() {
  		return boundingBox;
  	}
  
  	
! 	public net.tinyos.message.Message toTOSMsg() {
		AgillaClusterDebugMsg msg = new AgillaClusterDebugMsg();
! 		msg.set_src(src);
		msg.set_id(chId);
  		msg.set_bounding_box_llc_x(boundingBox.lowerLeftCorner().getx());
  		msg.set_bounding_box_llc_y(boundingBox.lowerLeftCorner().gety());
***************
*** 64,68 ****
  	
  	public String toString() {
! 		return "ClusterMsg[ID: " + chId + "\tboundingBox:" + boundingBox + "]";
  	}
  }
--- 73,77 ----
  	
  	public String toString() {
! 		return "ClusterDebugMsg[Src: " + src + " \tclusterheadId: " + chId + "\tboundingBox:" + boundingBox + "]";
  	}
  }



More information about the Tinyos-contrib-commits mailing list