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

📄 s4rawmessage.java

📁 state strech routing protocl
💻 JAVA
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'S4RawMessage' * message type. */package net.tinyos.cr.messages;public class S4RawMessage extends net.tinyos.message.Message {    /** 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 = 202;    /** Create a new S4RawMessage of size 4. */    public S4RawMessage() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new S4RawMessage of the given data_length. */    public S4RawMessage(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4RawMessage with the given data_length     * and base offset.     */    public S4RawMessage(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4RawMessage using the given byte array     * as backing store.     */    public S4RawMessage(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4RawMessage using the given byte array     * as backing store, with the given base offset.     */    public S4RawMessage(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4RawMessage using the given byte array     * as backing store, with the given base offset and data length.     */    public S4RawMessage(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4RawMessage embedded in the given message     * at the given base offset.     */    public S4RawMessage(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new S4RawMessage embedded in the given message     * at the given base offset and length.     */    public S4RawMessage(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 <S4RawMessage> \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 */ }      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;    }}

⌨️ 快捷键说明

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