📄 queryresultmsg.java
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'QueryResultMsg' * message type. */package net.tinyos.tinydb;public class QueryResultMsg extends net.tinyos.message.Message { /** The default size of this message type in bytes. */ public static final int DEFAULT_MESSAGE_SIZE = 42; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 240; /** Create a new QueryResultMsg of size 42. */ public QueryResultMsg() { super(DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** Create a new QueryResultMsg of the given data_length. */ public QueryResultMsg(int data_length) { super(data_length); amTypeSet(AM_TYPE); } /** * Create a new QueryResultMsg with the given data_length * and base offset. */ public QueryResultMsg(int data_length, int base_offset) { super(data_length, base_offset); amTypeSet(AM_TYPE); } /** * Create a new QueryResultMsg using the given byte array * as backing store. */ public QueryResultMsg(byte[] data) { super(data); amTypeSet(AM_TYPE); } /** * Create a new QueryResultMsg using the given byte array * as backing store, with the given base offset. */ public QueryResultMsg(byte[] data, int base_offset) { super(data, base_offset); amTypeSet(AM_TYPE); } /** * Create a new QueryResultMsg using the given byte array * as backing store, with the given base offset and data length. */ public QueryResultMsg(byte[] data, int base_offset, int data_length) { super(data, base_offset, data_length); amTypeSet(AM_TYPE); } /** * Create a new QueryResultMsg embedded in the given message * at the given base offset. */ public QueryResultMsg(net.tinyos.message.Message msg, int base_offset) { super(msg, base_offset, DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** * Create a new QueryResultMsg embedded in the given message * at the given base offset and length. */ public QueryResultMsg(net.tinyos.message.Message msg, int base_offset, int data_length) { super(msg, base_offset, data_length); amTypeSet(AM_TYPE); } /** /* Return a String representation of this message. Includes the * message type name and the non-indexed field values. */ public String toString() { String s = "Message <QueryResultMsg> \n"; try { s += " [qid=0x"+Long.toHexString(get_qid())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [result_idx=0x"+Long.toHexString(get_result_idx())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [epoch=0x"+Long.toHexString(get_epoch())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [qrType=0x"+Long.toHexString(get_qrType())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [timeSyncData="; for (int i = 0; i < 5; i++) { s += "0x"+Long.toHexString(getElement_timeSyncData(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [clockCount=0x"+Long.toHexString(get_clockCount())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [lastDiff=0x"+Long.toHexString(get_lastDiff())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [d.t.qid=0x"+Long.toHexString(get_d_t_qid())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [d.t.numFields=0x"+Long.toHexString(get_d_t_numFields())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [d.t.notNull=0x"+Long.toHexString(get_d_t_notNull())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [d.data="; for (int i = 0; i < 28; i++) { s += "0x"+Long.toHexString(getElement_d_data(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [d.buf.group="; for (int i = 0; i < 4; i++) { s += "0x"+Long.toHexString(getElement_d_buf_group(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [d.buf.data="; for (int i = 0; i < 4; i++) { s += "0x"+Long.toHexString(getElement_d_buf_data(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } return s; } // Message-type-specific access methods appear below. ///////////////////////////////////////////////////////// // Accessor methods for field: qid // Field type: short // Offset (bits): 0 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'qid' is signed (false). */ public static boolean isSigned_qid() { return false; } /** * Return whether the field 'qid' is an array (false). */ public static boolean isArray_qid() { return false; } /** * Return the offset (in bytes) of the field 'qid' */ public static int offset_qid() { return (0 / 8); } /** * Return the offset (in bits) of the field 'qid' */ public static int offsetBits_qid() { return 0; } /** * Return the value (as a short) of the field 'qid' */ public short get_qid() { return (short)getUIntElement(offsetBits_qid(), 8); } /** * Set the value of the field 'qid' */ public void set_qid(short value) { setUIntElement(offsetBits_qid(), 8, value); } /** * Return the size, in bytes, of the field 'qid' */ public static int size_qid() { return (8 / 8); } /** * Return the size, in bits, of the field 'qid' */ public static int sizeBits_qid() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: result_idx // Field type: byte // Offset (bits): 8 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'result_idx' is signed (false). */ public static boolean isSigned_result_idx() { return false; } /** * Return whether the field 'result_idx' is an array (false). */ public static boolean isArray_result_idx() { return false; } /** * Return the offset (in bytes) of the field 'result_idx' */ public static int offset_result_idx() { return (8 / 8); } /** * Return the offset (in bits) of the field 'result_idx' */ public static int offsetBits_result_idx() { return 8; } /** * Return the value (as a byte) of the field 'result_idx' */ public byte get_result_idx() { return (byte)getSIntElement(offsetBits_result_idx(), 8); } /** * Set the value of the field 'result_idx' */ public void set_result_idx(byte value) { setSIntElement(offsetBits_result_idx(), 8, value); } /** * Return the size, in bytes, of the field 'result_idx' */ public static int size_result_idx() { return (8 / 8); } /** * Return the size, in bits, of the field 'result_idx' */ public static int sizeBits_result_idx() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: epoch // Field type: int // Offset (bits): 16 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'epoch' is signed (false). */ public static boolean isSigned_epoch() { return false; } /** * Return whether the field 'epoch' is an array (false). */ public static boolean isArray_epoch() { return false; } /** * Return the offset (in bytes) of the field 'epoch' */ public static int offset_epoch() { return (16 / 8); } /** * Return the offset (in bits) of the field 'epoch' */ public static int offsetBits_epoch() { return 16; } /** * Return the value (as a int) of the field 'epoch' */ public int get_epoch() { return (int)getUIntElement(offsetBits_epoch(), 16); } /** * Set the value of the field 'epoch' */ public void set_epoch(int value) { setUIntElement(offsetBits_epoch(), 16, value); } /** * Return the size, in bytes, of the field 'epoch' */ public static int size_epoch() { return (16 / 8); } /** * Return the size, in bits, of the field 'epoch' */ public static int sizeBits_epoch() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: qrType // Field type: short // Offset (bits): 32 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'qrType' is signed (false). */ public static boolean isSigned_qrType() { return false; } /** * Return whether the field 'qrType' is an array (false). */ public static boolean isArray_qrType() { return false; } /** * Return the offset (in bytes) of the field 'qrType' */ public static int offset_qrType() { return (32 / 8); } /** * Return the offset (in bits) of the field 'qrType' */ public static int offsetBits_qrType() { return 32; } /** * Return the value (as a short) of the field 'qrType' */ public short get_qrType() { return (short)getUIntElement(offsetBits_qrType(), 8); } /** * Set the value of the field 'qrType' */ public void set_qrType(short value) { setUIntElement(offsetBits_qrType(), 8, value); } /** * Return the size, in bytes, of the field 'qrType' */ public static int size_qrType() { return (8 / 8); } /** * Return the size, in bits, of the field 'qrType' */ public static int sizeBits_qrType() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: timeSyncData // Field type: short[] // Offset (bits): 40 // Size of each element (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'timeSyncData' is signed (false). */ public static boolean isSigned_timeSyncData() { return false; } /** * Return whether the field 'timeSyncData' is an array (true). */ public static boolean isArray_timeSyncData() { return true; } /** * Return the offset (in bytes) of the field 'timeSyncData' */ public static int offset_timeSyncData(int index1) { int offset = 40; if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException(); offset += 0 + index1 * 8; return (offset / 8); } /** * Return the offset (in bits) of the field 'timeSyncData' */ public static int offsetBits_timeSyncData(int index1) { int offset = 40; if (index1 < 0 || index1 >= 5) throw new ArrayIndexOutOfBoundsException(); offset += 0 + index1 * 8; return offset; } /** * Return the entire array 'timeSyncData' as a short[] */ public short[] get_timeSyncData() { short[] tmp = new short[5]; for (int index0 = 0; index0 < numElements_timeSyncData(0); index0++) { tmp[index0] = getElement_timeSyncData(index0); } return tmp; } /** * Set the contents of the array 'timeSyncData' from the given short[] */ public void set_timeSyncData(short[] value) { for (int index0 = 0; index0 < value.length; index0++) { setElement_timeSyncData(index0, value[index0]); } } /** * Return an element (as a short) of the array 'timeSyncData' */ public short getElement_timeSyncData(int index1) { return (short)getUIntElement(offsetBits_timeSyncData(index1), 8); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -