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

📄 s4beaconmessage.java

📁 state strech routing protocl
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
             carr[i] = (char)getElement_type_data_beacons_beacon_id(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type_data.beacons.hopcount    //   Field type: short[]    //   Offset (bits): 8    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type_data.beacons.hopcount' is signed (false).     */    public static boolean isSigned_type_data_beacons_hopcount() {        return false;    }    /**     * Return whether the field 'type_data.beacons.hopcount' is an array (true).     */    public static boolean isArray_type_data_beacons_hopcount() {        return true;    }    /**     * Return the offset (in bytes) of the field 'type_data.beacons.hopcount'     */    public static int offset_type_data_beacons_hopcount(int index1) {        int offset = 8;        if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'type_data.beacons.hopcount'     */    public static int offsetBits_type_data_beacons_hopcount(int index1) {        int offset = 8;        if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return offset;    }    /**     * Return the entire array 'type_data.beacons.hopcount' as a short[]     */    public short[] get_type_data_beacons_hopcount() {        short[] tmp = new short[5];        for (int index0 = 0; index0 < numElements_type_data_beacons_hopcount(0); index0++) {            tmp[index0] = getElement_type_data_beacons_hopcount(index0);        }        return tmp;    }    /**     * Set the contents of the array 'type_data.beacons.hopcount' from the given short[]     */    public void set_type_data_beacons_hopcount(short[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_type_data_beacons_hopcount(index0, value[index0]);        }    }    /**     * Return an element (as a short) of the array 'type_data.beacons.hopcount'     */    public short getElement_type_data_beacons_hopcount(int index1) {        return (short)getUIntElement(offsetBits_type_data_beacons_hopcount(index1), 8);    }    /**     * Set an element of the array 'type_data.beacons.hopcount'     */    public void setElement_type_data_beacons_hopcount(int index1, short value) {        setUIntElement(offsetBits_type_data_beacons_hopcount(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 'type_data.beacons.hopcount'     */    public static int totalSize_type_data_beacons_hopcount() {        return (160 / 8);    }    /**     * Return the total size, in bits, of the array 'type_data.beacons.hopcount'     */    public static int totalSizeBits_type_data_beacons_hopcount() {        return 160;    }    /**     * Return the size, in bytes, of each element of the array 'type_data.beacons.hopcount'     */    public static int elementSize_type_data_beacons_hopcount() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'type_data.beacons.hopcount'     */    public static int elementSizeBits_type_data_beacons_hopcount() {        return 8;    }    /**     * Return the number of dimensions in the array 'type_data.beacons.hopcount'     */    public static int numDimensions_type_data_beacons_hopcount() {        return 1;    }    /**     * Return the number of elements in the array 'type_data.beacons.hopcount'     */    public static int numElements_type_data_beacons_hopcount() {        return 5;    }    /**     * Return the number of elements in the array 'type_data.beacons.hopcount'     * for the given dimension.     */    public static int numElements_type_data_beacons_hopcount(int dimension) {      int array_dims[] = { 5,  };        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 'type_data.beacons.hopcount' with a String     */    public void setString_type_data_beacons_hopcount(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_type_data_beacons_hopcount(i, (short)s.charAt(i));         }         setElement_type_data_beacons_hopcount(i, (short)0); //null terminate    }    /**     * Read the array 'type_data.beacons.hopcount' as a String     */    public String getString_type_data_beacons_hopcount() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,5)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_type_data_beacons_hopcount(i) == (char)0) break;             carr[i] = (char)getElement_type_data_beacons_hopcount(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type_data.beacons.seqno    //   Field type: short[]    //   Offset (bits): 16    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type_data.beacons.seqno' is signed (false).     */    public static boolean isSigned_type_data_beacons_seqno() {        return false;    }    /**     * Return whether the field 'type_data.beacons.seqno' is an array (true).     */    public static boolean isArray_type_data_beacons_seqno() {        return true;    }    /**     * Return the offset (in bytes) of the field 'type_data.beacons.seqno'     */    public static int offset_type_data_beacons_seqno(int index1) {        int offset = 16;        if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'type_data.beacons.seqno'     */    public static int offsetBits_type_data_beacons_seqno(int index1) {        int offset = 16;        if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return offset;    }    /**     * Return the entire array 'type_data.beacons.seqno' as a short[]     */    public short[] get_type_data_beacons_seqno() {        short[] tmp = new short[5];        for (int index0 = 0; index0 < numElements_type_data_beacons_seqno(0); index0++) {            tmp[index0] = getElement_type_data_beacons_seqno(index0);        }        return tmp;    }    /**     * Set the contents of the array 'type_data.beacons.seqno' from the given short[]     */    public void set_type_data_beacons_seqno(short[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_type_data_beacons_seqno(index0, value[index0]);        }    }    /**     * Return an element (as a short) of the array 'type_data.beacons.seqno'     */    public short getElement_type_data_beacons_seqno(int index1) {        return (short)getUIntElement(offsetBits_type_data_beacons_seqno(index1), 8);    }    /**     * Set an element of the array 'type_data.beacons.seqno'     */    public void setElement_type_data_beacons_seqno(int index1, short value) {        setUIntElement(offsetBits_type_data_beacons_seqno(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 'type_data.beacons.seqno'     */    public static int totalSize_type_data_beacons_seqno() {        return (160 / 8);    }    /**     * Return the total size, in bits, of the array 'type_data.beacons.seqno'     */    public static int totalSizeBits_type_data_beacons_seqno() {        return 160;    }    /**     * Return the size, in bytes, of each element of the array 'type_data.beacons.seqno'     */    public static int elementSize_type_data_beacons_seqno() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'type_data.beacons.seqno'     */    public static int elementSizeBits_type_data_beacons_seqno() {        return 8;    }    /**     * Return the number of dimensions in the array 'type_data.beacons.seqno'     */    public static int numDimensions_type_data_beacons_seqno() {        return 1;    }    /**     * Return the number of elements in the array 'type_data.beacons.seqno'     */    public static int numElements_type_data_beacons_seqno() {        return 5;    }    /**     * Return the number of elements in the array 'type_data.beacons.seqno'     * for the given dimension.     */    public static int numElements_type_data_beacons_seqno(int dimension) {      int array_dims[] = { 5,  };        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 'type_data.beacons.seqno' with a String     */    public void setString_type_data_beacons_seqno(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_type_data_beacons_seqno(i, (short)s.charAt(i));         }         setElement_type_data_beacons_seqno(i, (short)0); //null terminate    }    /**     * Read the array 'type_data.beacons.seqno' as a String     */    public String getString_type_data_beacons_seqno() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,5)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_type_data_beacons_seqno(i) == (char)0) break;             carr[i] = (char)getElement_type_data_beacons_seqno(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: type_data.beacons.quality    //   Field type: short[]    //   Offset (bits): 24    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'type_data.beacons.quality' is signed (false).     */    public static boolean isSigned_type_data_beacons_quality() {        return false;    }    /**     * Return whether the field 'type_data.beacons.quality' is an array (true).     */    public static boolean isArray_type_data_beacons_quality() {        return true;    }    /**     * Return the offset (in bytes) of the field 'type_data.beacons.quality'     */    public static int offset_type_data_beacons_quality(int index1) {        int offset = 24;        if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'type_data.beacons.quality'     */    public static int offsetBits_type_data_beacons_quality(int index1) {        int offset = 24;        if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException();        offset += 48 + index1 * 32;        return offset;    }    /**     * Return the entire array 'type_data.beacons.quality' as a short[]     */    public short[] get_type_data_beacons_quality() {        short[] tmp = new short[5];        for (int index0 = 0; index0 < numElements_type_data_beacons_quality(0); index0++) {            tmp[index0] = getElement_type_data_beacons_quality(index0);        }        return tmp;    }    /**     * Set the contents of the array 'type_data.beacons.quality' from the given short[]     */    public void set_type_data_beacons_quality(short[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_type_data_beacons_quality(index0, value[index0]);        }    }    /**     * Return an element (as a short) of the array 'type_data.beacons.quality'     */    public short getElement_type_data_beacons_quality(int index1) {        return (short)getUIntElement(offsetBits_type_data_beacons_quality(index1), 8);    }    /**     * Set an element of the array 'type_data.beacons.quality'     */    public void setElement_type_data_beacons_quality(int index1, short value) {        setUIntElement(offsetBits_type_data_beacons_quality(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 'type_data.beacons.quality'     */    public static int totalSize_type_data_beacons_quality() {        return (160 / 8);    }    /**     * Return the total size, in bits, of the array 'type_data.beacons.quality'     */    public static int totalSizeBits_type_data_beacons_quality() {        return 160;    }    /**     * Return the size, in bytes, of each element of the array 'type_data.beacons.quality'     */    public static int elementSize_type_data_beacons_quality() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'type_data.beacons.quality'     */    public static int elementSizeBits_type_data_beacons_quality() {        return 8;    }    /**     * Return the number of dimensions in the array 'type_data.beacons.quality'     */    public static int numDimensions_type_data_beacons_quality() {        return 1;    }    /**     * Return the number of elements in the array 'type_data.beacons.quality'     */    public static int numElements_type_data_beacons_quality() {        return 5;    }    /**     * Return the number of elements in the array 'type_data.beacons.quality'     * for the given dimension.     */    public static int numElements_type_data_beacons_quality(int dimension) {      int array_dims[] = { 5,  };        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 'type_data.beacons.quality' with a String     */    public void setString_type_data_beacons_quality(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_type_data_beacons_quality(i, (short)s.charAt(i));         }         setElement_type_data_beacons_quality(i, (short)0); //null terminate    }    /**     * Read the array 'type_data.beacons.quality' as a String     */    public String getString_type_data_beacons_quality() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,5)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_type_data_beacons_quality(i) == (char)0) break;             carr[i] = (char)getElement_type_data_beacons_quality(i);         }         return new String(carr,0,i);    }}

⌨️ 快捷键说明

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