tossiminitevent.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 'TossimInitEvent' * message type. */package net.tinyos.sim.msg;public class TossimInitEvent extends net.tinyos.message.Message {    /** The default size of this message type in bytes. */    public static final int DEFAULT_MESSAGE_SIZE = 12;    /** The Active Message type associated with this message. */    public static final int AM_TYPE = 16;    /** Create a new TossimInitEvent of size 12. */    public TossimInitEvent() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new TossimInitEvent of the given data_length. */    public TossimInitEvent(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new TossimInitEvent with the given data_length     * and base offset.     */    public TossimInitEvent(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new TossimInitEvent using the given byte array     * as backing store.     */    public TossimInitEvent(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new TossimInitEvent using the given byte array     * as backing store, with the given base offset.     */    public TossimInitEvent(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new TossimInitEvent using the given byte array     * as backing store, with the given base offset and data length.     */    public TossimInitEvent(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new TossimInitEvent embedded in the given message     * at the given base offset.     */    public TossimInitEvent(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new TossimInitEvent embedded in the given message     * at the given base offset and length.     */    public TossimInitEvent(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 <TossimInitEvent> \n";      try {        s += "  [numMotes=0x"+Long.toHexString(get_numMotes())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [radioModel=0x"+Long.toHexString(get_radioModel())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [rate=0x"+Long.toHexString(get_rate())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      return s;    }    // Message-type-specific access methods appear below.    /////////////////////////////////////////////////////////    // Accessor methods for field: numMotes    //   Field type: int, unsigned    //   Offset (bits): 0    //   Size (bits): 32    /////////////////////////////////////////////////////////    /**     * Return whether the field 'numMotes' is signed (false).     */    public static boolean isSigned_numMotes() {        return false;    }    /**     * Return whether the field 'numMotes' is an array (false).     */    public static boolean isArray_numMotes() {        return false;    }    /**     * Return the offset (in bytes) of the field 'numMotes'     */    public static int offset_numMotes() {        return (0 / 8);    }    /**     * Return the offset (in bits) of the field 'numMotes'     */    public static int offsetBits_numMotes() {        return 0;    }    /**     * Return the value (as a int) of the field 'numMotes'     */    public int get_numMotes() {        return (int)getSIntElement(offsetBits_numMotes(), 32);    }    /**     * Set the value of the field 'numMotes'     */    public void set_numMotes(int value) {        setSIntElement(offsetBits_numMotes(), 32, value);    }    /**     * Return the size, in bytes, of the field 'numMotes'     */    public static int size_numMotes() {        return (32 / 8);    }    /**     * Return the size, in bits, of the field 'numMotes'     */    public static int sizeBits_numMotes() {        return 32;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: radioModel    //   Field type: short, unsigned    //   Offset (bits): 32    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'radioModel' is signed (false).     */    public static boolean isSigned_radioModel() {        return false;    }    /**     * Return whether the field 'radioModel' is an array (false).     */    public static boolean isArray_radioModel() {        return false;    }    /**     * Return the offset (in bytes) of the field 'radioModel'     */    public static int offset_radioModel() {        return (32 / 8);    }    /**     * Return the offset (in bits) of the field 'radioModel'     */    public static int offsetBits_radioModel() {        return 32;    }    /**     * Return the value (as a short) of the field 'radioModel'     */    public short get_radioModel() {        return (short)getUIntElement(offsetBits_radioModel(), 8);    }    /**     * Set the value of the field 'radioModel'     */    public void set_radioModel(short value) {        setUIntElement(offsetBits_radioModel(), 8, value);    }    /**     * Return the size, in bytes, of the field 'radioModel'     */    public static int size_radioModel() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'radioModel'     */    public static int sizeBits_radioModel() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: rate    //   Field type: long, unsigned    //   Offset (bits): 64    //   Size (bits): 32    /////////////////////////////////////////////////////////    /**     * Return whether the field 'rate' is signed (false).     */    public static boolean isSigned_rate() {        return false;    }    /**     * Return whether the field 'rate' is an array (false).     */    public static boolean isArray_rate() {        return false;    }    /**     * Return the offset (in bytes) of the field 'rate'     */    public static int offset_rate() {        return (64 / 8);    }    /**     * Return the offset (in bits) of the field 'rate'     */    public static int offsetBits_rate() {        return 64;    }    /**     * Return the value (as a long) of the field 'rate'     */    public long get_rate() {        return (long)getUIntElement(offsetBits_rate(), 32);    }    /**     * Set the value of the field 'rate'     */    public void set_rate(long value) {        setUIntElement(offsetBits_rate(), 32, value);    }    /**     * Return the size, in bytes, of the field 'rate'     */    public static int size_rate() {        return (32 / 8);    }    /**     * Return the size, in bits, of the field 'rate'     */    public static int sizeBits_rate() {        return 32;    }}

⌨️ 快捷键说明

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