⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commandmessage.java

📁 state strech routing protocl
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'CommandMessage' * message type. */package net.tinyos.cr.messages;public class CommandMessage 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 = 200;    /** Create a new CommandMessage of size 11. */    public CommandMessage() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new CommandMessage of the given data_length. */    public CommandMessage(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new CommandMessage with the given data_length     * and base offset.     */    public CommandMessage(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new CommandMessage using the given byte array     * as backing store.     */    public CommandMessage(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new CommandMessage using the given byte array     * as backing store, with the given base offset.     */    public CommandMessage(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new CommandMessage using the given byte array     * as backing store, with the given base offset and data length.     */    public CommandMessage(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new CommandMessage embedded in the given message     * at the given base offset.     */    public CommandMessage(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new CommandMessage embedded in the given message     * at the given base offset and length.     */    public CommandMessage(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 <CommandMessage> \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.args.src_addr=0x"+Long.toHexString(get_cmd_args_src_addr())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [cmd.args.start_measure.n_packets=0x"+Long.toHexString(get_cmd_args_start_measure_n_packets())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [cmd.args.start_measure.repeat=0x"+Long.toHexString(get_cmd_args_start_measure_repeat())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [cmd.args.start_measure.power=0x"+Long.toHexString(get_cmd_args_start_measure_power())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [cmd.args.start_measure.measure_seq=0x"+Long.toHexString(get_cmd_args_start_measure_measure_seq())+"]\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.args.src_addr    //   Field type: int    //   Offset (bits): 40    //   Size (bits): 16    /////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -