code: package cnr.rubicon.cml;
  
  /**
   * This class is automatically generated by mig. DO NOT EDIT THIS FILE.
   * This class implements a Java interface to the 'DemoDataMsg'
   * message type.
   */
  
  public class DemoDataMsg extends net.tinyos.message.Message {
  
      /** The default size of this message type in bytes. */
      public static final int DEFAULT_MESSAGE_SIZE = 19;
  
      /** The Active Message type associated with this message. */
      public static final int AM_TYPE = 34;
  
      /** Create a new DemoDataMsg of size 19. */
      public DemoDataMsg() {
          super(DEFAULT_MESSAGE_SIZE);
          amTypeSet(AM_TYPE);
      }
  
      /** Create a new DemoDataMsg of the given data_length. */
      public DemoDataMsg(int data_length) {
          super(data_length);
          amTypeSet(AM_TYPE);
      }
  
      /**
       * Create a new DemoDataMsg with the given data_length
       * and base offset.
       */
      public DemoDataMsg(int data_length, int base_offset) {
          super(data_length, base_offset);
          amTypeSet(AM_TYPE);
      }
  
      /**
       * Create a new DemoDataMsg using the given byte array
       * as backing store.
       */
      public DemoDataMsg(byte[] data) {
          super(data);
          amTypeSet(AM_TYPE);
      }
  
      /**
       * Create a new DemoDataMsg using the given byte array
       * as backing store, with the given base offset.
       */
      public DemoDataMsg(byte[] data, int base_offset) {
          super(data, base_offset);
          amTypeSet(AM_TYPE);
      }
  
      /**
       * Create a new DemoDataMsg using the given byte array
       * as backing store, with the given base offset and data length.
       */
      public DemoDataMsg(byte[] data, int base_offset, int data_length) {
          super(data, base_offset, data_length);
          amTypeSet(AM_TYPE);
      }
  
      /**
       * Create a new DemoDataMsg embedded in the given message
       * at the given base offset.
       */
      public DemoDataMsg(net.tinyos.message.Message msg, int base_offset) {
          super(msg, base_offset, DEFAULT_MESSAGE_SIZE);
          amTypeSet(AM_TYPE);
      }
  
      /**
       * Create a new DemoDataMsg embedded in the given message
       * at the given base offset and length.
       */
      public DemoDataMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {
          super(msg, base_offset, data_length);
          amTypeSet(AM_TYPE);
      }
  
      /**
      /* Return a String representation of this message. Includes the
       * message type name and the non-indexed field values.
       */
      public String toString() {
        String s = "Message <DemoDataMsg> \n";
        try {
          s += "  [msg_type=0x"+Long.toHexString(get_msg_type())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [light=0x"+Long.toHexString(get_light())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [temp=0x"+Long.toHexString(get_temp())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [accx=0x"+Long.toHexString(get_accx())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [accy=0x"+Long.toHexString(get_accy())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [pir=0x"+Long.toHexString(get_pir())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [mic=0x"+Long.toHexString(get_mic())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [humid=0x"+Long.toHexString(get_humid())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [magnetic=0x"+Long.toHexString(get_magnetic())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        try {
          s += "  [my_rssi=0x"+Long.toHexString(get_my_rssi())+"]\n";
        } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }
        return s;
      }
  
      // Message-type-specific access methods appear below.
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: msg_type
      //   Field type: short, unsigned
      //   Offset (bits): 0
      //   Size (bits): 8
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'msg_type' is signed (false).
       */
      public static boolean isSigned_msg_type() {
          return false;
      }
  
      /**
       * Return whether the field 'msg_type' is an array (false).
       */
      public static boolean isArray_msg_type() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'msg_type'
       */
      public static int offset_msg_type() {
          return (0 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'msg_type'
       */
      public static int offsetBits_msg_type() {
          return 0;
      }
  
      /**
       * Return the value (as a short) of the field 'msg_type'
       */
      public short get_msg_type() {
          return (short)getUIntBEElement(offsetBits_msg_type(), 8);
      }
  
      /**
       * Set the value of the field 'msg_type'
       */
      public void set_msg_type(short value) {
          setUIntBEElement(offsetBits_msg_type(), 8, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'msg_type'
       */
      public static int size_msg_type() {
          return (8 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'msg_type'
       */
      public static int sizeBits_msg_type() {
          return 8;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: light
      //   Field type: int, unsigned
      //   Offset (bits): 8
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'light' is signed (false).
       */
      public static boolean isSigned_light() {
          return false;
      }
  
      /**
       * Return whether the field 'light' is an array (false).
       */
      public static boolean isArray_light() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'light'
       */
      public static int offset_light() {
          return (8 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'light'
       */
      public static int offsetBits_light() {
          return 8;
      }
  
      /**
       * Return the value (as a int) of the field 'light'
       */
      public int get_light() {
          return (int)getUIntBEElement(offsetBits_light(), 16);
      }
  
      /**
       * Set the value of the field 'light'
       */
      public void set_light(int value) {
          setUIntBEElement(offsetBits_light(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'light'
       */
      public static int size_light() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'light'
       */
      public static int sizeBits_light() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: temp
      //   Field type: int, unsigned
      //   Offset (bits): 24
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'temp' is signed (false).
       */
      public static boolean isSigned_temp() {
          return false;
      }
  
      /**
       * Return whether the field 'temp' is an array (false).
       */
      public static boolean isArray_temp() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'temp'
       */
      public static int offset_temp() {
          return (24 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'temp'
       */
      public static int offsetBits_temp() {
          return 24;
      }
  
      /**
       * Return the value (as a int) of the field 'temp'
       */
      public int get_temp() {
          return (int)getUIntBEElement(offsetBits_temp(), 16);
      }
  
      /**
       * Set the value of the field 'temp'
       */
      public void set_temp(int value) {
          setUIntBEElement(offsetBits_temp(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'temp'
       */
      public static int size_temp() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'temp'
       */
      public static int sizeBits_temp() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: accx
      //   Field type: int, unsigned
      //   Offset (bits): 40
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'accx' is signed (false).
       */
      public static boolean isSigned_accx() {
          return false;
      }
  
      /**
       * Return whether the field 'accx' is an array (false).
       */
      public static boolean isArray_accx() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'accx'
       */
      public static int offset_accx() {
          return (40 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'accx'
       */
      public static int offsetBits_accx() {
          return 40;
      }
  
      /**
       * Return the value (as a int) of the field 'accx'
       */
      public int get_accx() {
          return (int)getUIntBEElement(offsetBits_accx(), 16);
      }
  
      /**
       * Set the value of the field 'accx'
       */
      public void set_accx(int value) {
          setUIntBEElement(offsetBits_accx(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'accx'
       */
      public static int size_accx() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'accx'
       */
      public static int sizeBits_accx() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: accy
      //   Field type: int, unsigned
      //   Offset (bits): 56
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'accy' is signed (false).
       */
      public static boolean isSigned_accy() {
          return false;
      }
  
      /**
       * Return whether the field 'accy' is an array (false).
       */
      public static boolean isArray_accy() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'accy'
       */
      public static int offset_accy() {
          return (56 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'accy'
       */
      public static int offsetBits_accy() {
          return 56;
      }
  
      /**
       * Return the value (as a int) of the field 'accy'
       */
      public int get_accy() {
          return (int)getUIntBEElement(offsetBits_accy(), 16);
      }
  
      /**
       * Set the value of the field 'accy'
       */
      public void set_accy(int value) {
          setUIntBEElement(offsetBits_accy(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'accy'
       */
      public static int size_accy() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'accy'
       */
      public static int sizeBits_accy() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: pir
      //   Field type: int, unsigned
      //   Offset (bits): 72
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'pir' is signed (false).
       */
      public static boolean isSigned_pir() {
          return false;
      }
  
      /**
       * Return whether the field 'pir' is an array (false).
       */
      public static boolean isArray_pir() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'pir'
       */
      public static int offset_pir() {
          return (72 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'pir'
       */
      public static int offsetBits_pir() {
          return 72;
      }
  
      /**
       * Return the value (as a int) of the field 'pir'
       */
      public int get_pir() {
          return (int)getUIntBEElement(offsetBits_pir(), 16);
      }
  
      /**
       * Set the value of the field 'pir'
       */
      public void set_pir(int value) {
          setUIntBEElement(offsetBits_pir(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'pir'
       */
      public static int size_pir() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'pir'
       */
      public static int sizeBits_pir() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: mic
      //   Field type: int, unsigned
      //   Offset (bits): 88
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'mic' is signed (false).
       */
      public static boolean isSigned_mic() {
          return false;
      }
  
      /**
       * Return whether the field 'mic' is an array (false).
       */
      public static boolean isArray_mic() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'mic'
       */
      public static int offset_mic() {
          return (88 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'mic'
       */
      public static int offsetBits_mic() {
          return 88;
      }
  
      /**
       * Return the value (as a int) of the field 'mic'
       */
      public int get_mic() {
          return (int)getUIntBEElement(offsetBits_mic(), 16);
      }
  
      /**
       * Set the value of the field 'mic'
       */
      public void set_mic(int value) {
          setUIntBEElement(offsetBits_mic(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'mic'
       */
      public static int size_mic() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'mic'
       */
      public static int sizeBits_mic() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: humid
      //   Field type: int, unsigned
      //   Offset (bits): 104
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'humid' is signed (false).
       */
      public static boolean isSigned_humid() {
          return false;
      }
  
      /**
       * Return whether the field 'humid' is an array (false).
       */
      public static boolean isArray_humid() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'humid'
       */
      public static int offset_humid() {
          return (104 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'humid'
       */
      public static int offsetBits_humid() {
          return 104;
      }
  
      /**
       * Return the value (as a int) of the field 'humid'
       */
      public int get_humid() {
          return (int)getUIntBEElement(offsetBits_humid(), 16);
      }
  
      /**
       * Set the value of the field 'humid'
       */
      public void set_humid(int value) {
          setUIntBEElement(offsetBits_humid(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'humid'
       */
      public static int size_humid() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'humid'
       */
      public static int sizeBits_humid() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: magnetic
      //   Field type: int, unsigned
      //   Offset (bits): 120
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'magnetic' is signed (false).
       */
      public static boolean isSigned_magnetic() {
          return false;
      }
  
      /**
       * Return whether the field 'magnetic' is an array (false).
       */
      public static boolean isArray_magnetic() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'magnetic'
       */
      public static int offset_magnetic() {
          return (120 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'magnetic'
       */
      public static int offsetBits_magnetic() {
          return 120;
      }
  
      /**
       * Return the value (as a int) of the field 'magnetic'
       */
      public int get_magnetic() {
          return (int)getUIntBEElement(offsetBits_magnetic(), 16);
      }
  
      /**
       * Set the value of the field 'magnetic'
       */
      public void set_magnetic(int value) {
          setUIntBEElement(offsetBits_magnetic(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'magnetic'
       */
      public static int size_magnetic() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'magnetic'
       */
      public static int sizeBits_magnetic() {
          return 16;
      }
  
      /////////////////////////////////////////////////////////
      // Accessor methods for field: my_rssi
      //   Field type: int, unsigned
      //   Offset (bits): 136
      //   Size (bits): 16
      /////////////////////////////////////////////////////////
  
      /**
       * Return whether the field 'my_rssi' is signed (false).
       */
      public static boolean isSigned_my_rssi() {
          return false;
      }
  
      /**
       * Return whether the field 'my_rssi' is an array (false).
       */
      public static boolean isArray_my_rssi() {
          return false;
      }
  
      /**
       * Return the offset (in bytes) of the field 'my_rssi'
       */
      public static int offset_my_rssi() {
          return (136 / 8);
      }
  
      /**
       * Return the offset (in bits) of the field 'my_rssi'
       */
      public static int offsetBits_my_rssi() {
          return 136;
      }
  
      /**
       * Return the value (as a int) of the field 'my_rssi'
       */
      public int get_my_rssi() {
          return (int)getUIntBEElement(offsetBits_my_rssi(), 16);
      }
  
      /**
       * Set the value of the field 'my_rssi'
       */
      public void set_my_rssi(int value) {
          setUIntBEElement(offsetBits_my_rssi(), 16, value);
      }
  
      /**
       * Return the size, in bytes, of the field 'my_rssi'
       */
      public static int size_my_rssi() {
          return (16 / 8);
      }
  
      /**
       * Return the size, in bits, of the field 'my_rssi'
       */
      public static int sizeBits_my_rssi() {
          return 16;
      }
  
  }
  