simplecmdmsg.java
来自「nesC写的heed算法」· Java 代码 · 共 687 行 · 第 1/2 页
JAVA
687 行
return (short)getUIntElement(offsetBits_hop_count(), 8); } /** * Set the value of the field 'hop_count' */ public void set_hop_count(short value) { setUIntElement(offsetBits_hop_count(), 8, value); } /** * Return the size, in bytes, of the field 'hop_count' */ public static int size_hop_count() { return (8 / 8); } /** * Return the size, in bits, of the field 'hop_count' */ public static int sizeBits_hop_count() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: args.ss_args.nsamples // Field type: short // Offset (bits): 40 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'args.ss_args.nsamples' is signed (false). */ public static boolean isSigned_args_ss_args_nsamples() { return false; } /** * Return whether the field 'args.ss_args.nsamples' is an array (false). */ public static boolean isArray_args_ss_args_nsamples() { return false; } /** * Return the offset (in bytes) of the field 'args.ss_args.nsamples' */ public static int offset_args_ss_args_nsamples() { return (40 / 8); } /** * Return the offset (in bits) of the field 'args.ss_args.nsamples' */ public static int offsetBits_args_ss_args_nsamples() { return 40; } /** * Return the value (as a short) of the field 'args.ss_args.nsamples' */ public short get_args_ss_args_nsamples() { return (short)getSIntElement(offsetBits_args_ss_args_nsamples(), 16); } /** * Set the value of the field 'args.ss_args.nsamples' */ public void set_args_ss_args_nsamples(short value) { setSIntElement(offsetBits_args_ss_args_nsamples(), 16, value); } /** * Return the size, in bytes, of the field 'args.ss_args.nsamples' */ public static int size_args_ss_args_nsamples() { return (16 / 8); } /** * Return the size, in bits, of the field 'args.ss_args.nsamples' */ public static int sizeBits_args_ss_args_nsamples() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: args.ss_args.interval // Field type: long // Offset (bits): 56 // Size (bits): 32 ///////////////////////////////////////////////////////// /** * Return whether the field 'args.ss_args.interval' is signed (false). */ public static boolean isSigned_args_ss_args_interval() { return false; } /** * Return whether the field 'args.ss_args.interval' is an array (false). */ public static boolean isArray_args_ss_args_interval() { return false; } /** * Return the offset (in bytes) of the field 'args.ss_args.interval' */ public static int offset_args_ss_args_interval() { return (56 / 8); } /** * Return the offset (in bits) of the field 'args.ss_args.interval' */ public static int offsetBits_args_ss_args_interval() { return 56; } /** * Return the value (as a long) of the field 'args.ss_args.interval' */ public long get_args_ss_args_interval() { return (long)getUIntElement(offsetBits_args_ss_args_interval(), 32); } /** * Set the value of the field 'args.ss_args.interval' */ public void set_args_ss_args_interval(long value) { setUIntElement(offsetBits_args_ss_args_interval(), 32, value); } /** * Return the size, in bytes, of the field 'args.ss_args.interval' */ public static int size_args_ss_args_interval() { return (32 / 8); } /** * Return the size, in bits, of the field 'args.ss_args.interval' */ public static int sizeBits_args_ss_args_interval() { return 32; } ///////////////////////////////////////////////////////// // Accessor methods for field: args.rl_args.destaddr // Field type: int // Offset (bits): 40 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'args.rl_args.destaddr' is signed (false). */ public static boolean isSigned_args_rl_args_destaddr() { return false; } /** * Return whether the field 'args.rl_args.destaddr' is an array (false). */ public static boolean isArray_args_rl_args_destaddr() { return false; } /** * Return the offset (in bytes) of the field 'args.rl_args.destaddr' */ public static int offset_args_rl_args_destaddr() { return (40 / 8); } /** * Return the offset (in bits) of the field 'args.rl_args.destaddr' */ public static int offsetBits_args_rl_args_destaddr() { return 40; } /** * Return the value (as a int) of the field 'args.rl_args.destaddr' */ public int get_args_rl_args_destaddr() { return (int)getUIntElement(offsetBits_args_rl_args_destaddr(), 16); } /** * Set the value of the field 'args.rl_args.destaddr' */ public void set_args_rl_args_destaddr(int value) { setUIntElement(offsetBits_args_rl_args_destaddr(), 16, value); } /** * Return the size, in bytes, of the field 'args.rl_args.destaddr' */ public static int size_args_rl_args_destaddr() { return (16 / 8); } /** * Return the size, in bits, of the field 'args.rl_args.destaddr' */ public static int sizeBits_args_rl_args_destaddr() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: args.untyped_args // Field type: short[] // Offset (bits): 40 // Size of each element (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'args.untyped_args' is signed (false). */ public static boolean isSigned_args_untyped_args() { return false; } /** * Return whether the field 'args.untyped_args' is an array (true). */ public static boolean isArray_args_untyped_args() { return true; } /** * Return the offset (in bytes) of the field 'args.untyped_args' */ public static int offset_args_untyped_args(int index1) { int offset = 40; if (index1 < 0) throw new ArrayIndexOutOfBoundsException(); offset += 0 + index1 * 8; return (offset / 8); } /** * Return the offset (in bits) of the field 'args.untyped_args' */ public static int offsetBits_args_untyped_args(int index1) { int offset = 40; if (index1 < 0) throw new ArrayIndexOutOfBoundsException(); offset += 0 + index1 * 8; return offset; } /** * Return the entire array 'args.untyped_args' as a short[] */ public short[] get_args_untyped_args() { throw new IllegalArgumentException("Cannot get field as array - unknown size"); } /** * Set the contents of the array 'args.untyped_args' from the given short[] */ public void set_args_untyped_args(short[] value) { for (int index0 = 0; index0 < value.length; index0++) { setElement_args_untyped_args(index0, value[index0]); } } /** * Return an element (as a short) of the array 'args.untyped_args' */ public short getElement_args_untyped_args(int index1) { return (short)getUIntElement(offsetBits_args_untyped_args(index1), 8); } /** * Set an element of the array 'args.untyped_args' */ public void setElement_args_untyped_args(int index1, short value) { setUIntElement(offsetBits_args_untyped_args(index1), 8, value); } /** * Return the size, in bytes, of each element of the array 'args.untyped_args' */ public static int elementSize_args_untyped_args() { return (8 / 8); } /** * Return the size, in bits, of each element of the array 'args.untyped_args' */ public static int elementSizeBits_args_untyped_args() { return 8; } /** * Return the number of dimensions in the array 'args.untyped_args' */ public static int numDimensions_args_untyped_args() { return 1; } /** * Return the number of elements in the array 'args.untyped_args' * for the given dimension. */ public static int numElements_args_untyped_args(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 'args.untyped_args' with a String */ public void setString_args_untyped_args(String s) { int len = s.length(); int i; for (i = 0; i < len; i++) { setElement_args_untyped_args(i, (short)s.charAt(i)); } setElement_args_untyped_args(i, (short)0); //null terminate } /** * Read the array 'args.untyped_args' as a String */ public String getString_args_untyped_args() { char carr[] = new char[net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH]; int i; for (i = 0; i < carr.length; i++) { if ((char)getElement_args_untyped_args(i) == (char)0) break; carr[i] = (char)getElement_args_untyped_args(i); } return new String(carr,0,i); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?