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

📄 packet_msg.java

📁 elliptic curve加密源代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    }    /**     * Return the offset (in bytes) of the field 'r_len'     */    public static int offset_r_len() {        return (424 / 8);    }    /**     * Return the offset (in bits) of the field 'r_len'     */    public static int offsetBits_r_len() {        return 424;    }    /**     * Return the value (as a short) of the field 'r_len'     */    public short get_r_len() {        return (short)getUIntElement(offsetBits_r_len(), 8);    }    /**     * Set the value of the field 'r_len'     */    public void set_r_len(short value) {        setUIntElement(offsetBits_r_len(), 8, value);    }    /**     * Return the size, in bytes, of the field 'r_len'     */    public static int size_r_len() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'r_len'     */    public static int sizeBits_r_len() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: r    //   Field type: short[], unsigned    //   Offset (bits): 432    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'r' is signed (false).     */    public static boolean isSigned_r() {        return false;    }    /**     * Return whether the field 'r' is an array (true).     */    public static boolean isArray_r() {        return true;    }    /**     * Return the offset (in bytes) of the field 'r'     */    public static int offset_r(int index1) {        int offset = 432;        if (index1 < 0 || index1 >= 24) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'r'     */    public static int offsetBits_r(int index1) {        int offset = 432;        if (index1 < 0 || index1 >= 24) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return offset;    }    /**     * Return the entire array 'r' as a short[]     */    public short[] get_r() {        short[] tmp = new short[24];        for (int index0 = 0; index0 < numElements_r(0); index0++) {            tmp[index0] = getElement_r(index0);        }        return tmp;    }    /**     * Set the contents of the array 'r' from the given short[]     */    public void set_r(short[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_r(index0, value[index0]);        }    }    /**     * Return an element (as a short) of the array 'r'     */    public short getElement_r(int index1) {        return (short)getUIntElement(offsetBits_r(index1), 8);    }    /**     * Set an element of the array 'r'     */    public void setElement_r(int index1, short value) {        setUIntElement(offsetBits_r(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 'r'     */    public static int totalSize_r() {        return (192 / 8);    }    /**     * Return the total size, in bits, of the array 'r'     */    public static int totalSizeBits_r() {        return 192;    }    /**     * Return the size, in bytes, of each element of the array 'r'     */    public static int elementSize_r() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 'r'     */    public static int elementSizeBits_r() {        return 8;    }    /**     * Return the number of dimensions in the array 'r'     */    public static int numDimensions_r() {        return 1;    }    /**     * Return the number of elements in the array 'r'     */    public static int numElements_r() {        return 24;    }    /**     * Return the number of elements in the array 'r'     * for the given dimension.     */    public static int numElements_r(int dimension) {      int array_dims[] = { 24,  };        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 'r' with a String     */    public void setString_r(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_r(i, (short)s.charAt(i));         }         setElement_r(i, (short)0); //null terminate    }    /**     * Read the array 'r' as a String     */    public String getString_r() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,24)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_r(i) == (char)0) break;             carr[i] = (char)getElement_r(i);         }         return new String(carr,0,i);    }    /////////////////////////////////////////////////////////    // Accessor methods for field: s    //   Field type: short[], unsigned    //   Offset (bits): 624    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 's' is signed (false).     */    public static boolean isSigned_s() {        return false;    }    /**     * Return whether the field 's' is an array (true).     */    public static boolean isArray_s() {        return true;    }    /**     * Return the offset (in bytes) of the field 's'     */    public static int offset_s(int index1) {        int offset = 624;        if (index1 < 0 || index1 >= 24) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 's'     */    public static int offsetBits_s(int index1) {        int offset = 624;        if (index1 < 0 || index1 >= 24) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return offset;    }    /**     * Return the entire array 's' as a short[]     */    public short[] get_s() {        short[] tmp = new short[24];        for (int index0 = 0; index0 < numElements_s(0); index0++) {            tmp[index0] = getElement_s(index0);        }        return tmp;    }    /**     * Set the contents of the array 's' from the given short[]     */    public void set_s(short[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_s(index0, value[index0]);        }    }    /**     * Return an element (as a short) of the array 's'     */    public short getElement_s(int index1) {        return (short)getUIntElement(offsetBits_s(index1), 8);    }    /**     * Set an element of the array 's'     */    public void setElement_s(int index1, short value) {        setUIntElement(offsetBits_s(index1), 8, value);    }    /**     * Return the total size, in bytes, of the array 's'     */    public static int totalSize_s() {        return (192 / 8);    }    /**     * Return the total size, in bits, of the array 's'     */    public static int totalSizeBits_s() {        return 192;    }    /**     * Return the size, in bytes, of each element of the array 's'     */    public static int elementSize_s() {        return (8 / 8);    }    /**     * Return the size, in bits, of each element of the array 's'     */    public static int elementSizeBits_s() {        return 8;    }    /**     * Return the number of dimensions in the array 's'     */    public static int numDimensions_s() {        return 1;    }    /**     * Return the number of elements in the array 's'     */    public static int numElements_s() {        return 24;    }    /**     * Return the number of elements in the array 's'     * for the given dimension.     */    public static int numElements_s(int dimension) {      int array_dims[] = { 24,  };        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 's' with a String     */    public void setString_s(String s) {          int len = s.length();         int i;         for (i = 0; i < len; i++) {             setElement_s(i, (short)s.charAt(i));         }         setElement_s(i, (short)0); //null terminate    }    /**     * Read the array 's' as a String     */    public String getString_s() {          char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,24)];         int i;         for (i = 0; i < carr.length; i++) {             if ((char)getElement_s(i) == (char)0) break;             carr[i] = (char)getElement_s(i);         }         return new String(carr,0,i);    }}

⌨️ 快捷键说明

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