[Tinyos-beta-commits] CVS: tinyos-1.x/beta/SystemCore/MementoMori/java PrintFailed.class, 1.1, 1.2 PrintFailed.java, 1.1, 1.2 RosterMsg.class, 1.1, 1.2 RosterMsg.java, 1.1, 1.2

Stan Rost stanrost at users.sourceforge.net
Thu Oct 21 13:35:54 PDT 2004


Update of /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/java
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26313/java

Modified Files:
	PrintFailed.class PrintFailed.java RosterMsg.class 
	RosterMsg.java 
Log Message:
Major:

- CompressedSet
  - added optional superSkip header
  - debugged the bejeebus out of compression/decompression
  
- AggressiveSend now turns on Acking in the radio, signals transmitted bytes correctly

Minor:

- Removed PowerArbiter from ExptM
- Added numLAte to ResultPkt


Index: PrintFailed.class
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/java/PrintFailed.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Binary files /tmp/cvsetBLs3 and /tmp/cvsgBn9wh differ

Index: PrintFailed.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/java/PrintFailed.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PrintFailed.java	14 Oct 2004 14:42:51 -0000	1.1
--- PrintFailed.java	21 Oct 2004 20:35:52 -0000	1.2
***************
*** 10,13 ****
--- 10,14 ----
      mote = new MoteIF(PrintStreamMessenger.err);
      mote.registerListener(new RosterMsg(), this);
+     mote.registerListener(new ResultPkt(), this);
    }
  
***************
*** 27,35 ****
  
        System.out.print("Received message (round = " 
! 			 + rm.get_round() +
! 			 ", compressed = "
! 			 + rm.get_alive_compressed() + 
! 			 ", len = "
! 			 + rm.get_alive_len() + ") ");
  
        byteLen = rm.get_alive_len();
--- 28,38 ----
  
        System.out.print("Received message (round = " 
! 		       + rm.get_round() +
! 		       ", compressed = "
! 		       + rm.get_alive_compressed() +
! 		       ", superSkip = "
! 		       + rm.get_alive_superSkip() +
! 		       ", len = "
! 		       + rm.get_alive_len() + ") ");
  
        byteLen = rm.get_alive_len();
***************
*** 53,56 ****
--- 56,77 ----
        
  
+     } else if (m instanceof ResultPkt) {
+       ResultPkt rp = (ResultPkt)m;
+ 
+       System.out.println("UPDATE: Failed: " 
+ 			 + rp.get_numFailedNodes() +
+ 			 "; bytes: "
+ 			 + rp.get_bytesSent() + 
+ 			 "; rounds: "
+ 			 + rp.get_numRounds() +
+ 			 "; par: " 
+ 			 + rp.get_parentAddr() +
+ 			 "; tree: "
+ 			 + rp.get_treeLevel() +
+ 			 "; late: " 
+ 			 + rp.get_numLate() +
+ 			 "; full: "
+ 			 + rp.get_numFullUpd());
+ 			 
      } else {
        throw new RuntimeException("messageReceived: Got bad message type: "

Index: RosterMsg.class
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/java/RosterMsg.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
Binary files /tmp/cvsOnYurf and /tmp/cvsqjnBDt differ

Index: RosterMsg.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/SystemCore/MementoMori/java/RosterMsg.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RosterMsg.java	14 Oct 2004 14:42:51 -0000	1.1
--- RosterMsg.java	21 Oct 2004 20:35:52 -0000	1.2
***************
*** 1,6 ****
- 
- import net.tinyos.util.*;
- import net.tinyos.message.*;
- 
  /**
   * This class is automatically generated by mig. DO NOT EDIT THIS FILE.
--- 1,2 ----
***************
*** 12,21 ****
  
      /** The default size of this message type in bytes. */
!     public static final int DEFAULT_MESSAGE_SIZE = 4;
  
      /** The Active Message type associated with this message. */
      public static final int AM_TYPE = 215;
  
!     /** Create a new RosterMsg of size 4. */
      public RosterMsg() {
          super(DEFAULT_MESSAGE_SIZE);
--- 8,17 ----
  
      /** The default size of this message type in bytes. */
!     public static final int DEFAULT_MESSAGE_SIZE = 8;
  
      /** The Active Message type associated with this message. */
      public static final int AM_TYPE = 215;
  
!     /** Create a new RosterMsg of size 8. */
      public RosterMsg() {
          super(DEFAULT_MESSAGE_SIZE);
***************
*** 78,83 ****
       * at the given base offset and length.
       */
!     public RosterMsg(net.tinyos.message.Message msg, 
! 		     int base_offset, int data_length) {
          super(msg, base_offset, data_length);
          amTypeSet(AM_TYPE);
--- 74,78 ----
       * at the given base offset and length.
       */
!     public RosterMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {
          super(msg, base_offset, data_length);
          amTypeSet(AM_TYPE);
***************
*** 97,100 ****
--- 92,98 ----
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
+         s += "  [alive.superSkip=0x"+Long.toHexString(get_alive_superSkip())+"]\n";
+       } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
+       try {
          s += "  [alive.len=0x"+Long.toHexString(get_alive_len())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
***************
*** 234,241 ****
  
      /////////////////////////////////////////////////////////
!     // Accessor methods for field: alive.len
      //   Field type: byte
      //   Offset (bits): 17
!     //   Size (bits): 7
      /////////////////////////////////////////////////////////
  
--- 232,303 ----
  
      /////////////////////////////////////////////////////////
!     // Accessor methods for field: alive.superSkip
      //   Field type: byte
      //   Offset (bits): 17
!     //   Size (bits): 1
!     /////////////////////////////////////////////////////////
! 
!     /**
!      * Return whether the field 'alive.superSkip' is signed (false).
!      */
!     public static boolean isSigned_alive_superSkip() {
!         return false;
!     }
! 
!     /**
!      * Return whether the field 'alive.superSkip' is an array (false).
!      */
!     public static boolean isArray_alive_superSkip() {
!         return false;
!     }
! 
!     /**
!      * Return the offset (in bytes) of the field 'alive.superSkip'
!      */
!     public static int offset_alive_superSkip() {
!         return (17 / 8);
!     }
! 
!     /**
!      * Return the offset (in bits) of the field 'alive.superSkip'
!      */
!     public static int offsetBits_alive_superSkip() {
!         return 17;
!     }
! 
!     /**
!      * Return the value (as a byte) of the field 'alive.superSkip'
!      */
!     public byte get_alive_superSkip() {
!         return (byte)getUIntElement(offsetBits_alive_superSkip(), 1);
!     }
! 
!     /**
!      * Set the value of the field 'alive.superSkip'
!      */
!     public void set_alive_superSkip(byte value) {
!         setUIntElement(offsetBits_alive_superSkip(), 1, value);
!     }
! 
!     /**
!      * Return the size, in bytes, of the field 'alive.superSkip'
!      * WARNING: This field is not an even-sized number of bytes (1 bits).
!      */
!     public static int size_alive_superSkip() {
!         return (1 / 8) + 1;
!     }
! 
!     /**
!      * Return the size, in bits, of the field 'alive.superSkip'
!      */
!     public static int sizeBits_alive_superSkip() {
!         return 1;
!     }
! 
!     /////////////////////////////////////////////////////////
!     // Accessor methods for field: alive.len
!     //   Field type: short
!     //   Offset (bits): 18
!     //   Size (bits): 14
      /////////////////////////////////////////////////////////
  
***************
*** 258,262 ****
       */
      public static int offset_alive_len() {
!         return (17 / 8);
      }
  
--- 320,324 ----
       */
      public static int offset_alive_len() {
!         return (18 / 8);
      }
  
***************
*** 265,276 ****
       */
      public static int offsetBits_alive_len() {
!         return 17;
      }
  
      /**
!      * Return the value (as a byte) of the field 'alive.len'
       */
!     public byte get_alive_len() {
!         return (byte)getUIntElement(offsetBits_alive_len(), 7);
      }
  
--- 327,338 ----
       */
      public static int offsetBits_alive_len() {
!         return 18;
      }
  
      /**
!      * Return the value (as a short) of the field 'alive.len'
       */
!     public short get_alive_len() {
!         return (short)getUIntElement(offsetBits_alive_len(), 14);
      }
  
***************
*** 278,291 ****
       * Set the value of the field 'alive.len'
       */
!     public void set_alive_len(byte value) {
!         setUIntElement(offsetBits_alive_len(), 7, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'alive.len'
!      * WARNING: This field is not an even-sized number of bytes (7 bits).
       */
      public static int size_alive_len() {
!         return (7 / 8) + 1;
      }
  
--- 340,353 ----
       * Set the value of the field 'alive.len'
       */
!     public void set_alive_len(short value) {
!         setUIntElement(offsetBits_alive_len(), 14, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'alive.len'
!      * WARNING: This field is not an even-sized number of bytes (14 bits).
       */
      public static int size_alive_len() {
!         return (14 / 8) + 1;
      }
  
***************
*** 294,298 ****
       */
      public static int sizeBits_alive_len() {
!         return 7;
      }
  
--- 356,360 ----
       */
      public static int sizeBits_alive_len() {
!         return 14;
      }
  
***************
*** 300,304 ****
      // Accessor methods for field: alive.data
      //   Field type: short[]
!     //   Offset (bits): 24
      //   Size of each element (bits): 8
      /////////////////////////////////////////////////////////
--- 362,366 ----
      // Accessor methods for field: alive.data
      //   Field type: short[]
!     //   Offset (bits): 32
      //   Size of each element (bits): 8
      /////////////////////////////////////////////////////////
***************
*** 322,326 ****
       */
      public static int offset_alive_data(int index1) {
!         int offset = 24;
          if (index1 < 0) throw new ArrayIndexOutOfBoundsException();
          offset += 0 + index1 * 8;
--- 384,388 ----
       */
      public static int offset_alive_data(int index1) {
!         int offset = 32;
          if (index1 < 0) throw new ArrayIndexOutOfBoundsException();
          offset += 0 + index1 * 8;
***************
*** 332,336 ****
       */
      public static int offsetBits_alive_data(int index1) {
!         int offset = 24;
          if (index1 < 0) throw new ArrayIndexOutOfBoundsException();
          offset += 0 + index1 * 8;
--- 394,398 ----
       */
      public static int offsetBits_alive_data(int index1) {
!         int offset = 32;
          if (index1 < 0) throw new ArrayIndexOutOfBoundsException();
          offset += 0 + index1 * 8;
***************
*** 396,400 ****
        int array_dims[] = { 0,  };
          if (dimension < 0 || dimension >= 1) throw new ArrayIndexOutOfBoundsException();
- 
          if (array_dims[dimension] == 0) throw new IllegalArgumentException("Array dimension "+dimension+" has unknown size");
          return array_dims[dimension];
--- 458,461 ----



More information about the Tinyos-beta-commits mailing list