📄 commandresponsemessage.java
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'CommandResponseMessage' * message type. */package net.tinyos.cr.messages;public class CommandResponseMessage extends net.tinyos.message.Message { /** The default size of this message type in bytes. */ public static final int DEFAULT_MESSAGE_SIZE = 29; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 201; /** Create a new CommandResponseMessage of size 29. */ public CommandResponseMessage() { super(DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** Create a new CommandResponseMessage of the given data_length. */ public CommandResponseMessage(int data_length) { super(data_length); amTypeSet(AM_TYPE); } /** * Create a new CommandResponseMessage with the given data_length * and base offset. */ public CommandResponseMessage(int data_length, int base_offset) { super(data_length, base_offset); amTypeSet(AM_TYPE); } /** * Create a new CommandResponseMessage using the given byte array * as backing store. */ public CommandResponseMessage(byte[] data) { super(data); amTypeSet(AM_TYPE); } /** * Create a new CommandResponseMessage using the given byte array * as backing store, with the given base offset. */ public CommandResponseMessage(byte[] data, int base_offset) { super(data, base_offset); amTypeSet(AM_TYPE); } /** * Create a new CommandResponseMessage using the given byte array * as backing store, with the given base offset and data length. */ public CommandResponseMessage(byte[] data, int base_offset, int data_length) { super(data, base_offset, data_length); amTypeSet(AM_TYPE); } /** * Create a new CommandResponseMessage embedded in the given message * at the given base offset. */ public CommandResponseMessage(net.tinyos.message.Message msg, int base_offset) { super(msg, base_offset, DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** * Create a new CommandResponseMessage embedded in the given message * at the given base offset and length. */ public CommandResponseMessage(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 <CommandResponseMessage> \n"; try { s += " [gateway_addr=0x"+Long.toHexString(get_gateway_addr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_addr=0x"+Long.toHexString(get_cmd_addr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [type=0x"+Long.toHexString(get_type())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_response.args.count_info.src_addr=0x"+Long.toHexString(get_cmd_response_args_count_info_src_addr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_response.args.count_info.count="; for (int i = 0; i < 10; i++) { s += "0x"+Long.toHexString(getElement_cmd_response_args_count_info_count(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_response.args.rssi_info.src_addr=0x"+Long.toHexString(get_cmd_response_args_rssi_info_src_addr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_response.args.rssi_info.rssi="; for (int i = 0; i < 10; i++) { s += "0x"+Long.toHexString(getElement_cmd_response_args_rssi_info_rssi(i) & 0xff)+" "; } s += "]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_response.args.rssi_info.voltage=0x"+Long.toHexString(get_cmd_response_args_rssi_info_voltage())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cmd_response.args.image_id=0x"+Long.toHexString(get_cmd_response_args_image_id())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } return s; } // Message-type-specific access methods appear below. ///////////////////////////////////////////////////////// // Accessor methods for field: gateway_addr // Field type: int // Offset (bits): 0 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'gateway_addr' is signed (false). */ public static boolean isSigned_gateway_addr() { return false; } /** * Return whether the field 'gateway_addr' is an array (false). */ public static boolean isArray_gateway_addr() { return false; } /** * Return the offset (in bytes) of the field 'gateway_addr' */ public static int offset_gateway_addr() { return (0 / 8); } /** * Return the offset (in bits) of the field 'gateway_addr' */ public static int offsetBits_gateway_addr() { return 0; } /** * Return the value (as a int) of the field 'gateway_addr' */ public int get_gateway_addr() { return (int)getUIntElement(offsetBits_gateway_addr(), 16); } /** * Set the value of the field 'gateway_addr' */ public void set_gateway_addr(int value) { setUIntElement(offsetBits_gateway_addr(), 16, value); } /** * Return the size, in bytes, of the field 'gateway_addr' */ public static int size_gateway_addr() { return (16 / 8); } /** * Return the size, in bits, of the field 'gateway_addr' */ public static int sizeBits_gateway_addr() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: cmd_addr // Field type: int // Offset (bits): 16 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'cmd_addr' is signed (false). */ public static boolean isSigned_cmd_addr() { return false; } /** * Return whether the field 'cmd_addr' is an array (false). */ public static boolean isArray_cmd_addr() { return false; } /** * Return the offset (in bytes) of the field 'cmd_addr' */ public static int offset_cmd_addr() { return (16 / 8); } /** * Return the offset (in bits) of the field 'cmd_addr' */ public static int offsetBits_cmd_addr() { return 16; } /** * Return the value (as a int) of the field 'cmd_addr' */ public int get_cmd_addr() { return (int)getUIntElement(offsetBits_cmd_addr(), 16); } /** * Set the value of the field 'cmd_addr' */ public void set_cmd_addr(int value) { setUIntElement(offsetBits_cmd_addr(), 16, value); } /** * Return the size, in bytes, of the field 'cmd_addr' */ public static int size_cmd_addr() { return (16 / 8); } /** * Return the size, in bits, of the field 'cmd_addr' */ public static int sizeBits_cmd_addr() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: type // Field type: short // Offset (bits): 32 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'type' is signed (false). */ public static boolean isSigned_type() { return false; } /** * Return whether the field 'type' is an array (false). */ public static boolean isArray_type() { return false; } /** * Return the offset (in bytes) of the field 'type' */ public static int offset_type() { return (32 / 8); } /** * Return the offset (in bits) of the field 'type' */ public static int offsetBits_type() { return 32; } /** * Return the value (as a short) of the field 'type' */ public short get_type() { return (short)getUIntElement(offsetBits_type(), 8); } /** * Set the value of the field 'type' */ public void set_type(short value) { setUIntElement(offsetBits_type(), 8, value); } /** * Return the size, in bytes, of the field 'type' */ public static int size_type() { return (8 / 8); } /** * Return the size, in bits, of the field 'type' */ public static int sizeBits_type() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: cmd_response.args.count_info.src_addr // Field type: int // Offset (bits): 40 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'cmd_response.args.count_info.src_addr' is signed (false). */ public static boolean isSigned_cmd_response_args_count_info_src_addr() { return false; } /** * Return whether the field 'cmd_response.args.count_info.src_addr' is an array (false). */ public static boolean isArray_cmd_response_args_count_info_src_addr() { return false; } /** * Return the offset (in bytes) of the field 'cmd_response.args.count_info.src_addr' */ public static int offset_cmd_response_args_count_info_src_addr() { return (40 / 8); } /** * Return the offset (in bits) of the field 'cmd_response.args.count_info.src_addr' */ public static int offsetBits_cmd_response_args_count_info_src_addr() { return 40; } /** * Return the value (as a int) of the field 'cmd_response.args.count_info.src_addr' */ public int get_cmd_response_args_count_info_src_addr() { return (int)getUIntElement(offsetBits_cmd_response_args_count_info_src_addr(), 16); } /** * Set the value of the field 'cmd_response.args.count_info.src_addr' */ public void set_cmd_response_args_count_info_src_addr(int value) { setUIntElement(offsetBits_cmd_response_args_count_info_src_addr(), 16, value); } /** * Return the size, in bytes, of the field 'cmd_response.args.count_info.src_addr' */ public static int size_cmd_response_args_count_info_src_addr() { return (16 / 8); } /** * Return the size, in bits, of the field 'cmd_response.args.count_info.src_addr' */ public static int sizeBits_cmd_response_args_count_info_src_addr() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: cmd_response.args.count_info.count // Field type: int[] // Offset (bits): 56 // Size of each element (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'cmd_response.args.count_info.count' is signed (false). */ public static boolean isSigned_cmd_response_args_count_info_count() { return false; } /** * Return whether the field 'cmd_response.args.count_info.count' is an array (true). */ public static boolean isArray_cmd_response_args_count_info_count() { return true; } /** * Return the offset (in bytes) of the field 'cmd_response.args.count_info.count' */ public static int offset_cmd_response_args_count_info_count(int index1) { int offset = 56; if (index1 < 0 || index1 >= 10) throw new ArrayIndexOutOfBoundsException(); offset += 0 + index1 * 16; return (offset / 8); } /** * Return the offset (in bits) of the field 'cmd_response.args.count_info.count' */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -