📄 basetosmsg.java
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'BaseTOSMsg' * message type. */package net.tinyos.message.telos;public abstract class BaseTOSMsg extends net.tinyos.message.TOSMsg { /** The default size of this message type in bytes. */ public static final int DEFAULT_MESSAGE_SIZE = 44; /** The Active Message type associated with this message. */ public static final int AM_TYPE = -1; /** Create a new BaseTOSMsg of size 44. */ public BaseTOSMsg() { super(DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** Create a new BaseTOSMsg of the given data_length. */ public BaseTOSMsg(int data_length) { super(data_length); amTypeSet(AM_TYPE); } /** * Create a new BaseTOSMsg with the given data_length * and base offset. */ public BaseTOSMsg(int data_length, int base_offset) { super(data_length, base_offset); amTypeSet(AM_TYPE); } /** * Create a new BaseTOSMsg using the given byte array * as backing store. */ public BaseTOSMsg(byte[] data) { super(data); amTypeSet(AM_TYPE); } /** * Create a new BaseTOSMsg using the given byte array * as backing store, with the given base offset. */ public BaseTOSMsg(byte[] data, int base_offset) { super(data, base_offset); amTypeSet(AM_TYPE); } /** * Create a new BaseTOSMsg using the given byte array * as backing store, with the given base offset and data length. */ public BaseTOSMsg(byte[] data, int base_offset, int data_length) { super(data, base_offset, data_length); amTypeSet(AM_TYPE); } /** * Create a new BaseTOSMsg embedded in the given message * at the given base offset. */ public BaseTOSMsg(net.tinyos.message.Message msg, int base_offset) { super(msg, base_offset, DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** * Create a new BaseTOSMsg embedded in the given message * at the given base offset and length. */ public BaseTOSMsg(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 <BaseTOSMsg> \n"; try { s += " [length=0x"+Long.toHexString(get_length())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [fcfhi=0x"+Long.toHexString(get_fcfhi())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [fcflo=0x"+Long.toHexString(get_fcflo())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [dsn=0x"+Long.toHexString(get_dsn())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [destpan=0x"+Long.toHexString(get_destpan())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [addr=0x"+Long.toHexString(get_addr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [type=0x"+Long.toHexString(get_type())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [group=0x"+Long.toHexString(get_group())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [data="; for (int i = 0; i < 28; i++) { s += "0x"+Long.toHexString(getElement_data(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [strength=0x"+Long.toHexString(get_strength())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [crc=0x"+Long.toHexString(get_crc())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [ack=0x"+Long.toHexString(get_ack())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [time=0x"+Long.toHexString(get_time())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } return s; } // Message-type-specific access methods appear below. ///////////////////////////////////////////////////////// // Accessor methods for field: length // Field type: short, unsigned // Offset (bits): 0 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'length' is signed (false). */ public static boolean isSigned_length() { return false; } /** * Return whether the field 'length' is an array (false). */ public static boolean isArray_length() { return false; } /** * Return the offset (in bytes) of the field 'length' */ public int offset_length() { return (0 / 8); } /** * Return the offset (in bits) of the field 'length' */ public static int offsetBits_length() { return 0; } /** * Return the value (as a short) of the field 'length' */ public short get_length() { return (short)getUIntElement(offsetBits_length(), 8); } /** * Set the value of the field 'length' */ public void set_length(short value) { setUIntElement(offsetBits_length(), 8, value); } /** * Return the size, in bytes, of the field 'length' */ public static int size_length() { return (8 / 8); } /** * Return the size, in bits, of the field 'length' */ public static int sizeBits_length() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: fcfhi // Field type: short, unsigned // Offset (bits): 8 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'fcfhi' is signed (false). */ public static boolean isSigned_fcfhi() { return false; } /** * Return whether the field 'fcfhi' is an array (false). */ public static boolean isArray_fcfhi() { return false; } /** * Return the offset (in bytes) of the field 'fcfhi' */ public static int offset_fcfhi() { return (8 / 8); } /** * Return the offset (in bits) of the field 'fcfhi' */ public static int offsetBits_fcfhi() { return 8; } /** * Return the value (as a short) of the field 'fcfhi' */ public short get_fcfhi() { return (short)getUIntElement(offsetBits_fcfhi(), 8); } /** * Set the value of the field 'fcfhi' */ public void set_fcfhi(short value) { setUIntElement(offsetBits_fcfhi(), 8, value); } /** * Return the size, in bytes, of the field 'fcfhi' */ public static int size_fcfhi() { return (8 / 8); } /** * Return the size, in bits, of the field 'fcfhi' */ public static int sizeBits_fcfhi() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: fcflo // Field type: short, unsigned // Offset (bits): 16 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'fcflo' is signed (false). */ public static boolean isSigned_fcflo() { return false; } /** * Return whether the field 'fcflo' is an array (false). */ public static boolean isArray_fcflo() { return false; } /** * Return the offset (in bytes) of the field 'fcflo' */ public static int offset_fcflo() { return (16 / 8); } /** * Return the offset (in bits) of the field 'fcflo' */ public static int offsetBits_fcflo() { return 16; } /** * Return the value (as a short) of the field 'fcflo' */ public short get_fcflo() { return (short)getUIntElement(offsetBits_fcflo(), 8); } /** * Set the value of the field 'fcflo' */ public void set_fcflo(short value) { setUIntElement(offsetBits_fcflo(), 8, value); } /** * Return the size, in bytes, of the field 'fcflo' */ public static int size_fcflo() { return (8 / 8); } /** * Return the size, in bits, of the field 'fcflo' */ public static int sizeBits_fcflo() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: dsn // Field type: short, unsigned // Offset (bits): 24 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'dsn' is signed (false). */ public static boolean isSigned_dsn() { return false; } /** * Return whether the field 'dsn' is an array (false). */ public static boolean isArray_dsn() { return false; } /** * Return the offset (in bytes) of the field 'dsn' */ public static int offset_dsn() { return (24 / 8); } /** * Return the offset (in bits) of the field 'dsn' */ public static int offsetBits_dsn() { return 24; } /** * Return the value (as a short) of the field 'dsn' */ public short get_dsn() { return (short)getUIntElement(offsetBits_dsn(), 8); } /** * Set the value of the field 'dsn' */ public void set_dsn(short value) { setUIntElement(offsetBits_dsn(), 8, value); } /** * Return the size, in bytes, of the field 'dsn' */ public static int size_dsn() { return (8 / 8); } /** * Return the size, in bits, of the field 'dsn' */ public static int sizeBits_dsn() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: destpan // Field type: int, unsigned // Offset (bits): 32 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'destpan' is signed (false). */ public static boolean isSigned_destpan() { return false; } /** * Return whether the field 'destpan' is an array (false). */ public static boolean isArray_destpan() { return false; } /** * Return the offset (in bytes) of the field 'destpan' */ public static int offset_destpan() { return (32 / 8); } /** * Return the offset (in bits) of the field 'destpan' */ public static int offsetBits_destpan() { return 32; } /** * Return the value (as a int) of the field 'destpan' */ public int get_destpan() { return (int)getUIntElement(offsetBits_destpan(), 16); } /** * Set the value of the field 'destpan' */ public void set_destpan(int value) { setUIntElement(offsetBits_destpan(), 16, value); } /** * Return the size, in bytes, of the field 'destpan' */ public static int size_destpan() { return (16 / 8); } /** * Return the size, in bits, of the field 'destpan' */ public static int sizeBits_destpan() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: addr // Field type: int, unsigned // Offset (bits): 48 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'addr' is signed (false). */ public static boolean isSigned_addr() { return false; } /** * Return whether the field 'addr' is an array (false). */ public static boolean isArray_addr() { return false; } /** * Return the offset (in bytes) of the field 'addr' */ public static int offset_addr() { return (48 / 8); } /** * Return the offset (in bits) of the field 'addr' */ public static int offsetBits_addr() { return 48; } /** * Return the value (as a int) of the field 'addr' */ public int get_addr() { return (int)getUIntElement(offsetBits_addr(), 16); } /** * Set the value of the field 'addr' */ public void set_addr(int value) { setUIntElement(offsetBits_addr(), 16, value); } /** * Return the size, in bytes, of the field 'addr' */ public static int size_addr() { return (16 / 8); } /** * Return the size, in bits, of the field 'addr' */ public static int sizeBits_addr() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: type // Field type: short, unsigned
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -