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

📄 basetosmsg.java

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     * Return whether the field 'data' is an array (true).     */    public static boolean isArray_data() {        return true;    }    /**     * Return the offset (in bytes) of the field 'data'     */    public static int offset_data(int index1) {        int offset = 40;        if (index1 < 0 || index1 >= 29) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'data'     */    public static int offsetBits_data(int index1) {        int offset = 40;        if (index1 < 0 || index1 >= 29) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return offset;    }    /**     * Return the entire array 'data' as a byte[]     */    public byte[] get_data() {        byte[] tmp = new byte[29];        for (int index0 = 0; index0 < numElements_data(0); index0++) {            tmp[index0] = getElement_data(index0);        }        return tmp;    }    /**     * Set the contents of the array 'data' from the given byte[]     */    public void set_data(byte[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_data(index0, value[index0]);        }    }    /**     * Return an element (as a byte) of the array 'data'     */    public byte getElement_data(int index1) {        return (byte)getSIntElement(offsetBits_data(index1), 8);    }    /**     * Set an element of the array 'data'     */    public void setElement_data(int index1, byte value) {        setSIntElement(offsetBits_data(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 'data'     */    public int totalSize_data() {        return (232 / 8);    }    /**     * Return the total size, in bits, of the array 'data'     */    public int totalSizeBits_data() {        return 232;    }    /**     * Return the size, in bytes, of each element of the array 'data'     */    public static int elementSize_data() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'data'     */    public static int elementSizeBits_data() {        return 8;    }    /**     * Return the number of dimensions in the array 'data'     */    public static int numDimensions_data() {        return 1;    }    /**     * Return the number of elements in the array 'data'     */    public int numElements_data() {        return 29;    }    /**     * Return the number of elements in the array 'data'     * for the given dimension.     */    public int numElements_data(int dimension) {      int array_dims[] = { 29,  };        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 'data' with a String     */    public void setString_data(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_data(i, (byte)s.charAt(i));         }         setElement_data(i, (byte)0); //null terminate    }    /**     * Read the array 'data' as a String     */    public String getString_data() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,29)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_data(i) == (char)0) break;             carr[i] = (char)getElement_data(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: crc    //   Field type: int, unsigned    //   Offset (bits): 272    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'crc' is signed (false).     */    public static boolean isSigned_crc() {        return false;    }    /**     * Return whether the field 'crc' is an array (false).     */    public static boolean isArray_crc() {        return false;    }    /**     * Return the offset (in bytes) of the field 'crc'     */    public int offset_crc() {        return (272 / 8);    }    /**     * Return the offset (in bits) of the field 'crc'     */    public int offsetBits_crc() {        return 272;    }    /**     * Return the value (as a int) of the field 'crc'     */    public int get_crc() {        return (int)getUIntElement(offsetBits_crc(), 16);    }    /**     * Set the value of the field 'crc'     */    public void set_crc(int value) {        setUIntElement(offsetBits_crc(), 16, value);    }    /**     * Return the size, in bytes, of the field 'crc'     */    public static int size_crc() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'crc'     */    public static int sizeBits_crc() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: strength    //   Field type: int, unsigned    //   Offset (bits): 288    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'strength' is signed (false).     */    public static boolean isSigned_strength() {        return false;    }    /**     * Return whether the field 'strength' is an array (false).     */    public static boolean isArray_strength() {        return false;    }    /**     * Return the offset (in bytes) of the field 'strength'     */    public static int offset_strength() {        return (288 / 8);    }    /**     * Return the offset (in bits) of the field 'strength'     */    public static int offsetBits_strength() {        return 288;    }    /**     * Return the value (as a int) of the field 'strength'     */    public int get_strength() {        return (int)getUIntElement(offsetBits_strength(), 16);    }    /**     * Set the value of the field 'strength'     */    public void set_strength(int value) {        setUIntElement(offsetBits_strength(), 16, value);    }    /**     * Return the size, in bytes, of the field 'strength'     */    public static int size_strength() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'strength'     */    public static int sizeBits_strength() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: ack    //   Field type: short, unsigned    //   Offset (bits): 304    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'ack' is signed (false).     */    public static boolean isSigned_ack() {        return false;    }    /**     * Return whether the field 'ack' is an array (false).     */    public static boolean isArray_ack() {        return false;    }    /**     * Return the offset (in bytes) of the field 'ack'     */    public static int offset_ack() {        return (304 / 8);    }    /**     * Return the offset (in bits) of the field 'ack'     */    public static int offsetBits_ack() {        return 304;    }    /**     * Return the value (as a short) of the field 'ack'     */    public short get_ack() {        return (short)getUIntElement(offsetBits_ack(), 8);    }    /**     * Set the value of the field 'ack'     */    public void set_ack(short value) {        setUIntElement(offsetBits_ack(), 8, value);    }    /**     * Return the size, in bytes, of the field 'ack'     */    public static int size_ack() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'ack'     */    public static int sizeBits_ack() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: time    //   Field type: int, unsigned    //   Offset (bits): 312    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'time' is signed (false).     */    public static boolean isSigned_time() {        return false;    }    /**     * Return whether the field 'time' is an array (false).     */    public static boolean isArray_time() {        return false;    }    /**     * Return the offset (in bytes) of the field 'time'     */    public static int offset_time() {        return (312 / 8);    }    /**     * Return the offset (in bits) of the field 'time'     */    public static int offsetBits_time() {        return 312;    }    /**     * Return the value (as a int) of the field 'time'     */    public int get_time() {        return (int)getUIntElement(offsetBits_time(), 16);    }    /**     * Set the value of the field 'time'     */    public void set_time(int value) {        setUIntElement(offsetBits_time(), 16, value);    }    /**     * Return the size, in bytes, of the field 'time'     */    public static int size_time() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'time'     */    public static int sizeBits_time() {        return 16;    }}

⌨️ 快捷键说明

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