⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 s4appmessage.java

📁 state strech routing protocl
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'S4AppMessage' * message type. */package net.tinyos.cr.messages;public class S4AppMessage extends net.tinyos.message.Message {    /** The default size of this message type in bytes. */    public static final int DEFAULT_MESSAGE_SIZE = 15;    /** The Active Message type associated with this message. */    public static final int AM_TYPE = 55;    /** Create a new S4AppMessage of size 15. */    public S4AppMessage() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new S4AppMessage of the given data_length. */    public S4AppMessage(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4AppMessage with the given data_length     * and base offset.     */    public S4AppMessage(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4AppMessage using the given byte array     * as backing store.     */    public S4AppMessage(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4AppMessage using the given byte array     * as backing store, with the given base offset.     */    public S4AppMessage(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4AppMessage using the given byte array     * as backing store, with the given base offset and data length.     */    public S4AppMessage(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4AppMessage embedded in the given message     * at the given base offset.     */    public S4AppMessage(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4AppMessage embedded in the given message     * at the given base offset and length.     */    public S4AppMessage(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 <S4AppMessage> \n";      try {        s += "  [header.last_hop=0x"+Long.toHexString(get_header_last_hop())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [header.seqno=0x"+Long.toHexString(get_header_seqno())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.hopcount=0x"+Long.toHexString(get_type_data_hopcount())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.closest_beacon=0x"+Long.toHexString(get_type_data_closest_beacon())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.dest_id=0x"+Long.toHexString(get_type_data_dest_id())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.origin=0x"+Long.toHexString(get_type_data_origin())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.msg_id=0x"+Long.toHexString(get_type_data_msg_id())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.rexmit_count=0x"+Long.toHexString(get_type_data_rexmit_count())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.tried_hopcount=0x"+Long.toHexString(get_type_data_tried_hopcount())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type_data.data.data=";        for (int i = 0; i < 1; i++) {          s += "0x"+Long.toHexString(getElement_type_data_data_data(i) & 0xff)+" ";        }        s += "]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      return s;    }    // Message-type-specific access methods appear below.    /////////////////////////////////////////////////////////    // Accessor methods for field: header.last_hop    //   Field type: int    //   Offset (bits): 0    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'header.last_hop' is signed (false).     */    public static boolean isSigned_header_last_hop() {        return false;    }    /**     * Return whether the field 'header.last_hop' is an array (false).     */    public static boolean isArray_header_last_hop() {        return false;    }    /**     * Return the offset (in bytes) of the field 'header.last_hop'     */    public static int offset_header_last_hop() {        return (0 / 8);    }    /**     * Return the offset (in bits) of the field 'header.last_hop'     */    public static int offsetBits_header_last_hop() {        return 0;    }    /**     * Return the value (as a int) of the field 'header.last_hop'     */    public int get_header_last_hop() {        return (int)getUIntElement(offsetBits_header_last_hop(), 16);    }    /**     * Set the value of the field 'header.last_hop'     */    public void set_header_last_hop(int value) {        setUIntElement(offsetBits_header_last_hop(), 16, value);    }    /**     * Return the size, in bytes, of the field 'header.last_hop'     */    public static int size_header_last_hop() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'header.last_hop'     */    public static int sizeBits_header_last_hop() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: header.seqno    //   Field type: int    //   Offset (bits): 16    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'header.seqno' is signed (false).     */    public static boolean isSigned_header_seqno() {        return false;    }    /**     * Return whether the field 'header.seqno' is an array (false).     */    public static boolean isArray_header_seqno() {        return false;    }    /**     * Return the offset (in bytes) of the field 'header.seqno'     */    public static int offset_header_seqno() {        return (16 / 8);    }    /**     * Return the offset (in bits) of the field 'header.seqno'     */    public static int offsetBits_header_seqno() {        return 16;    }    /**     * Return the value (as a int) of the field 'header.seqno'     */    public int get_header_seqno() {        return (int)getUIntElement(offsetBits_header_seqno(), 16);    }    /**     * Set the value of the field 'header.seqno'     */    public void set_header_seqno(int value) {        setUIntElement(offsetBits_header_seqno(), 16, value);    }    /**     * Return the size, in bytes, of the field 'header.seqno'     */    public static int size_header_seqno() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'header.seqno'     */    public static int sizeBits_header_seqno() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type_data.hopcount    //   Field type: short    //   Offset (bits): 32    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type_data.hopcount' is signed (false).     */    public static boolean isSigned_type_data_hopcount() {        return false;    }    /**     * Return whether the field 'type_data.hopcount' is an array (false).     */    public static boolean isArray_type_data_hopcount() {        return false;    }    /**     * Return the offset (in bytes) of the field 'type_data.hopcount'     */    public static int offset_type_data_hopcount() {        return (32 / 8);    }    /**     * Return the offset (in bits) of the field 'type_data.hopcount'     */    public static int offsetBits_type_data_hopcount() {        return 32;    }    /**     * Return the value (as a short) of the field 'type_data.hopcount'     */    public short get_type_data_hopcount() {        return (short)getUIntElement(offsetBits_type_data_hopcount(), 8);    }    /**     * Set the value of the field 'type_data.hopcount'     */    public void set_type_data_hopcount(short value) {        setUIntElement(offsetBits_type_data_hopcount(), 8, value);    }    /**     * Return the size, in bytes, of the field 'type_data.hopcount'     */    public static int size_type_data_hopcount() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'type_data.hopcount'     */    public static int sizeBits_type_data_hopcount() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type_data.closest_beacon    //   Field type: short    //   Offset (bits): 40    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type_data.closest_beacon' is signed (false).     */    public static boolean isSigned_type_data_closest_beacon() {        return false;    }    /**     * Return whether the field 'type_data.closest_beacon' is an array (false).     */    public static boolean isArray_type_data_closest_beacon() {        return false;    }    /**     * Return the offset (in bytes) of the field 'type_data.closest_beacon'     */    public static int offset_type_data_closest_beacon() {        return (40 / 8);    }    /**     * Return the offset (in bits) of the field 'type_data.closest_beacon'     */    public static int offsetBits_type_data_closest_beacon() {        return 40;    }    /**     * Return the value (as a short) of the field 'type_data.closest_beacon'     */    public short get_type_data_closest_beacon() {        return (short)getUIntElement(offsetBits_type_data_closest_beacon(), 8);    }    /**     * Set the value of the field 'type_data.closest_beacon'     */    public void set_type_data_closest_beacon(short value) {        setUIntElement(offsetBits_type_data_closest_beacon(), 8, value);    }    /**     * Return the size, in bytes, of the field 'type_data.closest_beacon'     */    public static int size_type_data_closest_beacon() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'type_data.closest_beacon'     */    public static int sizeBits_type_data_closest_beacon() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type_data.dest_id    //   Field type: int    //   Offset (bits): 48    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type_data.dest_id' is signed (false).     */    public static boolean isSigned_type_data_dest_id() {        return false;    }    /**     * Return whether the field 'type_data.dest_id' is an array (false).     */    public static boolean isArray_type_data_dest_id() {        return false;    }    /**     * Return the offset (in bytes) of the field 'type_data.dest_id'     */    public static int offset_type_data_dest_id() {        return (48 / 8);    }    /**     * Return the offset (in bits) of the field 'type_data.dest_id'     */    public static int offsetBits_type_data_dest_id() {        return 48;    }    /**     * Return the value (as a int) of the field 'type_data.dest_id'     */    public int get_type_data_dest_id() {        return (int)getUIntElement(offsetBits_type_data_dest_id(), 16);    }    /**     * Set the value of the field 'type_data.dest_id'     */    public void set_type_data_dest_id(int value) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -