📄 simplecmdmsg.java
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'SimpleCmdMsg' * message type. */package net.tinyos.tools;public class SimpleCmdMsg extends net.tinyos.message.Message { /** The default size of this message type in bytes. */ public static final int DEFAULT_MESSAGE_SIZE = 11; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 8; /** Create a new SimpleCmdMsg of size 11. */ public SimpleCmdMsg() { super(DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** Create a new SimpleCmdMsg of the given data_length. */ public SimpleCmdMsg(int data_length) { super(data_length); amTypeSet(AM_TYPE); } /** * Create a new SimpleCmdMsg with the given data_length * and base offset. */ public SimpleCmdMsg(int data_length, int base_offset) { super(data_length, base_offset); amTypeSet(AM_TYPE); } /** * Create a new SimpleCmdMsg using the given byte array * as backing store. */ public SimpleCmdMsg(byte[] data) { super(data); amTypeSet(AM_TYPE); } /** * Create a new SimpleCmdMsg using the given byte array * as backing store, with the given base offset. */ public SimpleCmdMsg(byte[] data, int base_offset) { super(data, base_offset); amTypeSet(AM_TYPE); } /** * Create a new SimpleCmdMsg using the given byte array * as backing store, with the given base offset and data length. */ public SimpleCmdMsg(byte[] data, int base_offset, int data_length) { super(data, base_offset, data_length); amTypeSet(AM_TYPE); } /** * Create a new SimpleCmdMsg embedded in the given message * at the given base offset. */ public SimpleCmdMsg(net.tinyos.message.Message msg, int base_offset) { super(msg, base_offset, DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** * Create a new SimpleCmdMsg embedded in the given message * at the given base offset and length. */ public SimpleCmdMsg(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 <SimpleCmdMsg> \n"; try { s += " [seqno=0x"+Long.toHexString(get_seqno())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [action=0x"+Long.toHexString(get_action())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [source=0x"+Long.toHexString(get_source())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [hop_count=0x"+Long.toHexString(get_hop_count())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [args.ss_args.nsamples=0x"+Long.toHexString(get_args_ss_args_nsamples())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [args.ss_args.interval=0x"+Long.toHexString(get_args_ss_args_interval())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [args.rl_args.destaddr=0x"+Long.toHexString(get_args_rl_args_destaddr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } return s; } // Message-type-specific access methods appear below. ///////////////////////////////////////////////////////// // Accessor methods for field: seqno // Field type: byte // Offset (bits): 0 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'seqno' is signed (false). */ public static boolean isSigned_seqno() { return false; } /** * Return whether the field 'seqno' is an array (false). */ public static boolean isArray_seqno() { return false; } /** * Return the offset (in bytes) of the field 'seqno' */ public static int offset_seqno() { return (0 / 8); } /** * Return the offset (in bits) of the field 'seqno' */ public static int offsetBits_seqno() { return 0; } /** * Return the value (as a byte) of the field 'seqno' */ public byte get_seqno() { return (byte)getSIntElement(offsetBits_seqno(), 8); } /** * Set the value of the field 'seqno' */ public void set_seqno(byte value) { setSIntElement(offsetBits_seqno(), 8, value); } /** * Return the size, in bytes, of the field 'seqno' */ public static int size_seqno() { return (8 / 8); } /** * Return the size, in bits, of the field 'seqno' */ public static int sizeBits_seqno() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: action // Field type: byte // Offset (bits): 8 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'action' is signed (false). */ public static boolean isSigned_action() { return false; } /** * Return whether the field 'action' is an array (false). */ public static boolean isArray_action() { return false; } /** * Return the offset (in bytes) of the field 'action' */ public static int offset_action() { return (8 / 8); } /** * Return the offset (in bits) of the field 'action' */ public static int offsetBits_action() { return 8; } /** * Return the value (as a byte) of the field 'action' */ public byte get_action() { return (byte)getSIntElement(offsetBits_action(), 8); } /** * Set the value of the field 'action' */ public void set_action(byte value) { setSIntElement(offsetBits_action(), 8, value); } /** * Return the size, in bytes, of the field 'action' */ public static int size_action() { return (8 / 8); } /** * Return the size, in bits, of the field 'action' */ public static int sizeBits_action() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: source // Field type: int // Offset (bits): 16 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'source' is signed (false). */ public static boolean isSigned_source() { return false; } /** * Return whether the field 'source' is an array (false). */ public static boolean isArray_source() { return false; } /** * Return the offset (in bytes) of the field 'source' */ public static int offset_source() { return (16 / 8); } /** * Return the offset (in bits) of the field 'source' */ public static int offsetBits_source() { return 16; } /** * Return the value (as a int) of the field 'source' */ public int get_source() { return (int)getUIntElement(offsetBits_source(), 16); } /** * Set the value of the field 'source' */ public void set_source(int value) { setUIntElement(offsetBits_source(), 16, value); } /** * Return the size, in bytes, of the field 'source' */ public static int size_source() { return (16 / 8); } /** * Return the size, in bits, of the field 'source' */ public static int sizeBits_source() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: hop_count // Field type: short // Offset (bits): 32 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'hop_count' is signed (false). */ public static boolean isSigned_hop_count() { return false; } /** * Return whether the field 'hop_count' is an array (false). */ public static boolean isArray_hop_count() { return false; } /** * Return the offset (in bytes) of the field 'hop_count' */ public static int offset_hop_count() { return (32 / 8); } /** * Return the offset (in bits) of the field 'hop_count' */ public static int offsetBits_hop_count() { return 32; } /** * Return the value (as a short) of the field 'hop_count' */ public short get_hop_count() {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -