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

📄 queryresultmsg.java

📁 nesC写的heed算法
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    /**     * Return the size, in bytes, of each element of the array 'd.t.fields'     */    public static int elementSize_d_t_fields() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'd.t.fields'     */    public static int elementSizeBits_d_t_fields() {        return 8;    }    /**     * Return the number of dimensions in the array 'd.t.fields'     */    public static int numDimensions_d_t_fields() {        return 1;    }    /**     * Return the number of elements in the array 'd.t.fields'     * for the given dimension.     */    public static int numElements_d_t_fields(int dimension) {      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];    }    /**     * Fill in the array 'd.t.fields' with a String     */    public void setString_d_t_fields(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_d_t_fields(i, (byte)s.charAt(i));         }         setElement_d_t_fields(i, (byte)0); //null terminate    }    /**     * Read the array 'd.t.fields' as a String     */    public String getString_d_t_fields() {          char carr[] = new char[net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_d_t_fields(i) == (char)0) break;             carr[i] = (char)getElement_d_t_fields(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: d.data    //   Field type: byte[]    //   Offset (bits): 112    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'd.data' is signed (false).     */    public static boolean isSigned_d_data() {        return false;    }    /**     * Return whether the field 'd.data' is an array (true).     */    public static boolean isArray_d_data() {        return true;    }    /**     * Return the offset (in bytes) of the field 'd.data'     */    public static int offset_d_data(int index1) {        int offset = 112;        if (index1 < 0 || index1 >= 28) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'd.data'     */    public static int offsetBits_d_data(int index1) {        int offset = 112;        if (index1 < 0 || index1 >= 28) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return offset;    }    /**     * Return the entire array 'd.data' as a byte[]     */    public byte[] get_d_data() {        byte[] tmp = new byte[28];        for (int index0 = 0; index0 < numElements_d_data(0); index0++) {            tmp[index0] = getElement_d_data(index0);        }        return tmp;    }    /**     * Set the contents of the array 'd.data' from the given byte[]     */    public void set_d_data(byte[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_d_data(index0, value[index0]);        }    }    /**     * Return an element (as a byte) of the array 'd.data'     */    public byte getElement_d_data(int index1) {        return (byte)getSIntElement(offsetBits_d_data(index1), 8);    }    /**     * Set an element of the array 'd.data'     */    public void setElement_d_data(int index1, byte value) {        setSIntElement(offsetBits_d_data(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 'd.data'     */    public static int totalSize_d_data() {        return (224 / 8);    }    /**     * Return the total size, in bits, of the array 'd.data'     */    public static int totalSizeBits_d_data() {        return 224;    }    /**     * Return the size, in bytes, of each element of the array 'd.data'     */    public static int elementSize_d_data() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'd.data'     */    public static int elementSizeBits_d_data() {        return 8;    }    /**     * Return the number of dimensions in the array 'd.data'     */    public static int numDimensions_d_data() {        return 1;    }    /**     * Return the number of elements in the array 'd.data'     */    public static int numElements_d_data() {        return 28;    }    /**     * Return the number of elements in the array 'd.data'     * for the given dimension.     */    public static int numElements_d_data(int dimension) {      int array_dims[] = { 28,  };        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];    }    /**     * Fill in the array 'd.data' with a String     */    public void setString_d_data(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_d_data(i, (byte)s.charAt(i));         }         setElement_d_data(i, (byte)0); //null terminate    }    /**     * Read the array 'd.data' as a String     */    public String getString_d_data() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,28)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_d_data(i) == (char)0) break;             carr[i] = (char)getElement_d_data(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: d.buf.group    //   Field type: int[]    //   Offset (bits): 0    //   Size of each element (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'd.buf.group' is signed (false).     */    public static boolean isSigned_d_buf_group() {        return false;    }    /**     * Return whether the field 'd.buf.group' is an array (true).     */    public static boolean isArray_d_buf_group() {        return true;    }    /**     * Return the offset (in bytes) of the field 'd.buf.group'     */    public static int offset_d_buf_group(int index1) {        int offset = 0;        if (index1 < 0 || index1 >= 4) throw new ArrayIndexOutOfBoundsException();        offset += 112 + index1 * 32;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'd.buf.group'     */    public static int offsetBits_d_buf_group(int index1) {        int offset = 0;        if (index1 < 0 || index1 >= 4) throw new ArrayIndexOutOfBoundsException();        offset += 112 + index1 * 32;        return offset;    }    /**     * Return the entire array 'd.buf.group' as a int[]     */    public int[] get_d_buf_group() {        int[] tmp = new int[4];        for (int index0 = 0; index0 < numElements_d_buf_group(0); index0++) {            tmp[index0] = getElement_d_buf_group(index0);        }        return tmp;    }    /**     * Set the contents of the array 'd.buf.group' from the given int[]     */    public void set_d_buf_group(int[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_d_buf_group(index0, value[index0]);        }    }    /**     * Return an element (as a int) of the array 'd.buf.group'     */    public int getElement_d_buf_group(int index1) {        return (int)getUIntElement(offsetBits_d_buf_group(index1), 16);    }    /**     * Set an element of the array 'd.buf.group'     */    public void setElement_d_buf_group(int index1, int value) {        setUIntElement(offsetBits_d_buf_group(index1), 16, value);    }    /**     * Return the total size, in bytes, of the array 'd.buf.group'     */    public static int totalSize_d_buf_group() {        return (128 / 8);    }    /**     * Return the total size, in bits, of the array 'd.buf.group'     */    public static int totalSizeBits_d_buf_group() {        return 128;    }    /**     * Return the size, in bytes, of each element of the array 'd.buf.group'     */    public static int elementSize_d_buf_group() {        return (16 / 8);    }    /**     * Return the size, in bits, of each element of the array 'd.buf.group'     */    public static int elementSizeBits_d_buf_group() {        return 16;    }    /**     * Return the number of dimensions in the array 'd.buf.group'     */    public static int numDimensions_d_buf_group() {        return 1;    }    /**     * Return the number of elements in the array 'd.buf.group'     */    public static int numElements_d_buf_group() {        return 4;    }    /**     * Return the number of elements in the array 'd.buf.group'     * for the given dimension.     */    public static int numElements_d_buf_group(int dimension) {      int array_dims[] = { 4,  };        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];    }    /////////////////////////////////////////////////////////    // Accessor methods for field: d.buf.data    //   Field type: int[]    //   Offset (bits): 16    //   Size of each element (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'd.buf.data' is signed (false).     */    public static boolean isSigned_d_buf_data() {        return false;    }    /**     * Return whether the field 'd.buf.data' is an array (true).     */    public static boolean isArray_d_buf_data() {        return true;    }    /**     * Return the offset (in bytes) of the field 'd.buf.data'     */    public static int offset_d_buf_data(int index1) {        int offset = 16;        if (index1 < 0 || index1 >= 4) throw new ArrayIndexOutOfBoundsException();        offset += 112 + index1 * 32;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'd.buf.data'     */    public static int offsetBits_d_buf_data(int index1) {        int offset = 16;        if (index1 < 0 || index1 >= 4) throw new ArrayIndexOutOfBoundsException();        offset += 112 + index1 * 32;        return offset;    }    /**     * Return the entire array 'd.buf.data' as a int[]     */    public int[] get_d_buf_data() {        int[] tmp = new int[4];        for (int index0 = 0; index0 < numElements_d_buf_data(0); index0++) {            tmp[index0] = getElement_d_buf_data(index0);        }        return tmp;    }    /**     * Set the contents of the array 'd.buf.data' from the given int[]     */    public void set_d_buf_data(int[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_d_buf_data(index0, value[index0]);        }    }    /**     * Return an element (as a int) of the array 'd.buf.data'     */    public int getElement_d_buf_data(int index1) {        return (int)getUIntElement(offsetBits_d_buf_data(index1), 16);    }    /**     * Set an element of the array 'd.buf.data'     */    public void setElement_d_buf_data(int index1, int value) {        setUIntElement(offsetBits_d_buf_data(index1), 16, value);    }    /**     * Return the total size, in bytes, of the array 'd.buf.data'     */    public static int totalSize_d_buf_data() {        return (128 / 8);    }    /**     * Return the total size, in bits, of the array 'd.buf.data'     */    public static int totalSizeBits_d_buf_data() {        return 128;    }    /**     * Return the size, in bytes, of each element of the array 'd.buf.data'     */    public static int elementSize_d_buf_data() {        return (16 / 8);    }    /**     * Return the size, in bits, of each element of the array 'd.buf.data'     */    public static int elementSizeBits_d_buf_data() {        return 16;    }    /**     * Return the number of dimensions in the array 'd.buf.data'     */    public static int numDimensions_d_buf_data() {        return 1;    }    /**     * Return the number of elements in the array 'd.buf.data'     */    public static int numElements_d_buf_data() {        return 4;    }    /**     * Return the number of elements in the array 'd.buf.data'     * for the given dimension.     */    public static int numElements_d_buf_data(int dimension) {      int array_dims[] = { 4,  };        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];    }}

⌨️ 快捷键说明

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