surgecmdmsg.java

来自「tinyos最新版」· Java 代码 · 共 293 行

JAVA
293
字号
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'SurgeCmdMsg' * message type. */package net.tinyos.surge;public class SurgeCmdMsg extends net.tinyos.message.Message {    /** The default size of this message type in bytes. */    public static final int DEFAULT_MESSAGE_SIZE = 5;    /** The Active Message type associated with this message. */    public static final int AM_TYPE = 18;    /** Create a new SurgeCmdMsg of size 5. */    public SurgeCmdMsg() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new SurgeCmdMsg of the given data_length. */    public SurgeCmdMsg(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new SurgeCmdMsg with the given data_length     * and base offset.     */    public SurgeCmdMsg(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new SurgeCmdMsg using the given byte array     * as backing store.     */    public SurgeCmdMsg(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new SurgeCmdMsg using the given byte array     * as backing store, with the given base offset.     */    public SurgeCmdMsg(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new SurgeCmdMsg using the given byte array     * as backing store, with the given base offset and data length.     */    public SurgeCmdMsg(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new SurgeCmdMsg embedded in the given message     * at the given base offset.     */    public SurgeCmdMsg(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new SurgeCmdMsg embedded in the given message     * at the given base offset and length.     */    public SurgeCmdMsg(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 <SurgeCmdMsg> \n";      try {        s += "  [type=0x"+Long.toHexString(get_type())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [args.newrate=0x"+Long.toHexString(get_args_newrate())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [args.focusaddr=0x"+Long.toHexString(get_args_focusaddr())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      return s;    }    // Message-type-specific access methods appear below.    /////////////////////////////////////////////////////////    // Accessor methods for field: type    //   Field type: short    //   Offset (bits): 0    //   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 (0 / 8);    }    /**     * Return the offset (in bits) of the field 'type'     */    public static int offsetBits_type() {        return 0;    }    /**     * 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: args.newrate    //   Field type: long    //   Offset (bits): 8    //   Size (bits): 32    /////////////////////////////////////////////////////////    /**     * Return whether the field 'args.newrate' is signed (false).     */    public static boolean isSigned_args_newrate() {        return false;    }    /**     * Return whether the field 'args.newrate' is an array (false).     */    public static boolean isArray_args_newrate() {        return false;    }    /**     * Return the offset (in bytes) of the field 'args.newrate'     */    public static int offset_args_newrate() {        return (8 / 8);    }    /**     * Return the offset (in bits) of the field 'args.newrate'     */    public static int offsetBits_args_newrate() {        return 8;    }    /**     * Return the value (as a long) of the field 'args.newrate'     */    public long get_args_newrate() {        return (long)getUIntElement(offsetBits_args_newrate(), 32);    }    /**     * Set the value of the field 'args.newrate'     */    public void set_args_newrate(long value) {        setUIntElement(offsetBits_args_newrate(), 32, value);    }    /**     * Return the size, in bytes, of the field 'args.newrate'     */    public static int size_args_newrate() {        return (32 / 8);    }    /**     * Return the size, in bits, of the field 'args.newrate'     */    public static int sizeBits_args_newrate() {        return 32;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: args.focusaddr    //   Field type: int    //   Offset (bits): 8    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'args.focusaddr' is signed (false).     */    public static boolean isSigned_args_focusaddr() {        return false;    }    /**     * Return whether the field 'args.focusaddr' is an array (false).     */    public static boolean isArray_args_focusaddr() {        return false;    }    /**     * Return the offset (in bytes) of the field 'args.focusaddr'     */    public static int offset_args_focusaddr() {        return (8 / 8);    }    /**     * Return the offset (in bits) of the field 'args.focusaddr'     */    public static int offsetBits_args_focusaddr() {        return 8;    }    /**     * Return the value (as a int) of the field 'args.focusaddr'     */    public int get_args_focusaddr() {        return (int)getUIntElement(offsetBits_args_focusaddr(), 16);    }    /**     * Set the value of the field 'args.focusaddr'     */    public void set_args_focusaddr(int value) {        setUIntElement(offsetBits_args_focusaddr(), 16, value);    }    /**     * Return the size, in bytes, of the field 'args.focusaddr'     */    public static int size_args_focusaddr() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'args.focusaddr'     */    public static int sizeBits_args_focusaddr() {        return 16;    }}

⌨️ 快捷键说明

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