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

📄 delugeadvmsg.java

📁 tinyos最新版
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'DelugeAdvMsg' * message type. */package net.tinyos.tools;public class DelugeAdvMsg extends net.tinyos.message.Message {    /** The default size of this message type in bytes. */    public static final int DEFAULT_MESSAGE_SIZE = 16;    /** The Active Message type associated with this message. */    public static final int AM_TYPE = 161;    /** Create a new DelugeAdvMsg of size 16. */    public DelugeAdvMsg() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new DelugeAdvMsg of the given data_length. */    public DelugeAdvMsg(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new DelugeAdvMsg with the given data_length     * and base offset.     */    public DelugeAdvMsg(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new DelugeAdvMsg using the given byte array     * as backing store.     */    public DelugeAdvMsg(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new DelugeAdvMsg using the given byte array     * as backing store, with the given base offset.     */    public DelugeAdvMsg(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new DelugeAdvMsg using the given byte array     * as backing store, with the given base offset and data length.     */    public DelugeAdvMsg(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new DelugeAdvMsg embedded in the given message     * at the given base offset.     */    public DelugeAdvMsg(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new DelugeAdvMsg embedded in the given message     * at the given base offset and length.     */    public DelugeAdvMsg(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 <DelugeAdvMsg> \n";      try {        s += "  [sourceAddr=0x"+Long.toHexString(get_sourceAddr())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [globalVNum=0x"+Long.toHexString(get_globalVNum())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [runningImgNum=0x"+Long.toHexString(get_runningImgNum())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [type=0x"+Long.toHexString(get_type())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [imgSummaries.vNum=";        for (int i = 0; i < 2; i++) {          s += "0x"+Long.toHexString(getElement_imgSummaries_vNum(i) & 0xff)+" ";        }        s += "]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [imgSummaries.numPgs=";        for (int i = 0; i < 2; i++) {          s += "0x"+Long.toHexString(getElement_imgSummaries_numPgs(i) & 0xff)+" ";        }        s += "]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [imgSummaries.numPgsComplete=";        for (int i = 0; i < 2; i++) {          s += "0x"+Long.toHexString(getElement_imgSummaries_numPgsComplete(i) & 0xff)+" ";        }        s += "]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [crc=0x"+Long.toHexString(get_crc())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      return s;    }    // Message-type-specific access methods appear below.    /////////////////////////////////////////////////////////    // Accessor methods for field: sourceAddr    //   Field type: int, unsigned    //   Offset (bits): 0    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'sourceAddr' is signed (false).     */    public static boolean isSigned_sourceAddr() {        return false;    }    /**     * Return whether the field 'sourceAddr' is an array (false).     */    public static boolean isArray_sourceAddr() {        return false;    }    /**     * Return the offset (in bytes) of the field 'sourceAddr'     */    public static int offset_sourceAddr() {        return (0 / 8);    }    /**     * Return the offset (in bits) of the field 'sourceAddr'     */    public static int offsetBits_sourceAddr() {        return 0;    }    /**     * Return the value (as a int) of the field 'sourceAddr'     */    public int get_sourceAddr() {        return (int)getUIntElement(offsetBits_sourceAddr(), 16);    }    /**     * Set the value of the field 'sourceAddr'     */    public void set_sourceAddr(int value) {        setUIntElement(offsetBits_sourceAddr(), 16, value);    }    /**     * Return the size, in bytes, of the field 'sourceAddr'     */    public static int size_sourceAddr() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'sourceAddr'     */    public static int sizeBits_sourceAddr() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: globalVNum    //   Field type: short, unsigned    //   Offset (bits): 16    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'globalVNum' is signed (false).     */    public static boolean isSigned_globalVNum() {        return false;    }    /**     * Return whether the field 'globalVNum' is an array (false).     */    public static boolean isArray_globalVNum() {        return false;    }    /**     * Return the offset (in bytes) of the field 'globalVNum'     */    public static int offset_globalVNum() {        return (16 / 8);    }    /**     * Return the offset (in bits) of the field 'globalVNum'     */    public static int offsetBits_globalVNum() {        return 16;    }    /**     * Return the value (as a short) of the field 'globalVNum'     */    public short get_globalVNum() {        return (short)getSIntElement(offsetBits_globalVNum(), 16);    }    /**     * Set the value of the field 'globalVNum'     */    public void set_globalVNum(short value) {        setSIntElement(offsetBits_globalVNum(), 16, value);    }    /**     * Return the size, in bytes, of the field 'globalVNum'     */    public static int size_globalVNum() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'globalVNum'     */    public static int sizeBits_globalVNum() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: runningImgNum    //   Field type: short, unsigned    //   Offset (bits): 32    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'runningImgNum' is signed (false).     */    public static boolean isSigned_runningImgNum() {        return false;    }    /**     * Return whether the field 'runningImgNum' is an array (false).     */    public static boolean isArray_runningImgNum() {        return false;    }    /**     * Return the offset (in bytes) of the field 'runningImgNum'     */    public static int offset_runningImgNum() {        return (32 / 8);    }    /**     * Return the offset (in bits) of the field 'runningImgNum'     */    public static int offsetBits_runningImgNum() {        return 32;    }    /**     * Return the value (as a short) of the field 'runningImgNum'     */    public short get_runningImgNum() {        return (short)getUIntElement(offsetBits_runningImgNum(), 8);    }    /**     * Set the value of the field 'runningImgNum'     */    public void set_runningImgNum(short value) {        setUIntElement(offsetBits_runningImgNum(), 8, value);    }    /**     * Return the size, in bytes, of the field 'runningImgNum'     */    public static int size_runningImgNum() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'runningImgNum'     */    public static int sizeBits_runningImgNum() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type    //   Field type: short, unsigned    //   Offset (bits): 40    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type' is signed (false).     */    public static boolean isSigned_type() {        return false;    }    /**     * Return whether the field 'type' is an array (false).     */    public static boolean isArray_type() {        return false;    }    /**     * Return the offset (in bytes) of the field 'type'     */    public static int offset_type() {        return (40 / 8);    }    /**     * Return the offset (in bits) of the field 'type'     */    public static int offsetBits_type() {        return 40;    }    /**     * Return the value (as a short) of the field 'type'     */    public short get_type() {        return (short)getUIntElement(offsetBits_type(), 8);    }    /**     * Set the value of the field 'type'     */    public void set_type(short value) {        setUIntElement(offsetBits_type(), 8, value);    }    /**     * Return the size, in bytes, of the field 'type'     */    public static int size_type() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'type'     */    public static int sizeBits_type() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: imgSummaries.vNum    //   Field type: short[], unsigned    //   Offset (bits): 0    //   Size of each element (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'imgSummaries.vNum' is signed (false).     */    public static boolean isSigned_imgSummaries_vNum() {        return false;    }    /**     * Return whether the field 'imgSummaries.vNum' is an array (true).     */    public static boolean isArray_imgSummaries_vNum() {        return true;    }    /**     * Return the offset (in bytes) of the field 'imgSummaries.vNum'     */    public static int offset_imgSummaries_vNum(int index1) {        int offset = 0;        if (index1 < 0 || index1 >= 2) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'imgSummaries.vNum'     */    public static int offsetBits_imgSummaries_vNum(int index1) {        int offset = 0;        if (index1 < 0 || index1 >= 2) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return offset;    }    /**     * Return the entire array 'imgSummaries.vNum' as a short[]     */    public short[] get_imgSummaries_vNum() {        short[] tmp = new short[2];        for (int index0 = 0; index0 < numElements_imgSummaries_vNum(0); index0++) {            tmp[index0] = getElement_imgSummaries_vNum(index0);        }        return tmp;    }    /**     * Set the contents of the array 'imgSummaries.vNum' from the given short[]     */    public void set_imgSummaries_vNum(short[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_imgSummaries_vNum(index0, value[index0]);        }

⌨️ 快捷键说明

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