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

📄 uartmsgsendcommand.java

📁 nesC写的heed算法
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'UARTMsgSendCommand' * message type. */package net.tinyos.sim.msg;public class UARTMsgSendCommand extends net.tinyos.message.Message {    /** The default size of this message type in bytes. */    public static final int DEFAULT_MESSAGE_SIZE = 44;    /** The Active Message type associated with this message. */    public static final int AM_TYPE = 8;    /** Create a new UARTMsgSendCommand of size 44. */    public UARTMsgSendCommand() {        super(DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /** Create a new UARTMsgSendCommand of the given data_length. */    public UARTMsgSendCommand(int data_length) {        super(data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new UARTMsgSendCommand with the given data_length     * and base offset.     */    public UARTMsgSendCommand(int data_length, int base_offset) {        super(data_length, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new UARTMsgSendCommand using the given byte array     * as backing store.     */    public UARTMsgSendCommand(byte[] data) {        super(data);        amTypeSet(AM_TYPE);    }    /**     * Create a new UARTMsgSendCommand using the given byte array     * as backing store, with the given base offset.     */    public UARTMsgSendCommand(byte[] data, int base_offset) {        super(data, base_offset);        amTypeSet(AM_TYPE);    }    /**     * Create a new UARTMsgSendCommand using the given byte array     * as backing store, with the given base offset and data length.     */    public UARTMsgSendCommand(byte[] data, int base_offset, int data_length) {        super(data, base_offset, data_length);        amTypeSet(AM_TYPE);    }    /**     * Create a new UARTMsgSendCommand embedded in the given message     * at the given base offset.     */    public UARTMsgSendCommand(net.tinyos.message.Message msg, int base_offset) {        super(msg, base_offset, DEFAULT_MESSAGE_SIZE);        amTypeSet(AM_TYPE);    }    /**     * Create a new UARTMsgSendCommand embedded in the given message     * at the given base offset and length.     */    public UARTMsgSendCommand(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 <UARTMsgSendCommand> \n";      try {        s += "  [message.addr=0x"+Long.toHexString(get_message_addr())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.type=0x"+Long.toHexString(get_message_type())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.group=0x"+Long.toHexString(get_message_group())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.length=0x"+Long.toHexString(get_message_length())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.data=";        for (int i = 0; i < 29; i++) {          s += "0x"+Long.toHexString(getElement_message_data(i) & 0xff)+" ";        }        s += "]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.crc=0x"+Long.toHexString(get_message_crc())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.strength=0x"+Long.toHexString(get_message_strength())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.ack=0x"+Long.toHexString(get_message_ack())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.time=0x"+Long.toHexString(get_message_time())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.sendSecurityMode=0x"+Long.toHexString(get_message_sendSecurityMode())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      try {        s += "  [message.receiveSecurityMode=0x"+Long.toHexString(get_message_receiveSecurityMode())+"]\n";      } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }      return s;    }    // Message-type-specific access methods appear below.    /////////////////////////////////////////////////////////    // Accessor methods for field: message.addr    //   Field type: int    //   Offset (bits): 0    //   Size (bits): 16    /////////////////////////////////////////////////////////    /**     * Return whether the field 'message.addr' is signed (false).     */    public static boolean isSigned_message_addr() {        return false;    }    /**     * Return whether the field 'message.addr' is an array (false).     */    public static boolean isArray_message_addr() {        return false;    }    /**     * Return the offset (in bytes) of the field 'message.addr'     */    public static int offset_message_addr() {        return (0 / 8);    }    /**     * Return the offset (in bits) of the field 'message.addr'     */    public static int offsetBits_message_addr() {        return 0;    }    /**     * Return the value (as a int) of the field 'message.addr'     */    public int get_message_addr() {        return (int)getUIntElement(offsetBits_message_addr(), 16);    }    /**     * Set the value of the field 'message.addr'     */    public void set_message_addr(int value) {        setUIntElement(offsetBits_message_addr(), 16, value);    }    /**     * Return the size, in bytes, of the field 'message.addr'     */    public static int size_message_addr() {        return (16 / 8);    }    /**     * Return the size, in bits, of the field 'message.addr'     */    public static int sizeBits_message_addr() {        return 16;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: message.type    //   Field type: short    //   Offset (bits): 16    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'message.type' is signed (false).     */    public static boolean isSigned_message_type() {        return false;    }    /**     * Return whether the field 'message.type' is an array (false).     */    public static boolean isArray_message_type() {        return false;    }    /**     * Return the offset (in bytes) of the field 'message.type'     */    public static int offset_message_type() {        return (16 / 8);    }    /**     * Return the offset (in bits) of the field 'message.type'     */    public static int offsetBits_message_type() {        return 16;    }    /**     * Return the value (as a short) of the field 'message.type'     */    public short get_message_type() {        return (short)getUIntElement(offsetBits_message_type(), 8);    }    /**     * Set the value of the field 'message.type'     */    public void set_message_type(short value) {        setUIntElement(offsetBits_message_type(), 8, value);    }    /**     * Return the size, in bytes, of the field 'message.type'     */    public static int size_message_type() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'message.type'     */    public static int sizeBits_message_type() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: message.group    //   Field type: short    //   Offset (bits): 24    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'message.group' is signed (false).     */    public static boolean isSigned_message_group() {        return false;    }    /**     * Return whether the field 'message.group' is an array (false).     */    public static boolean isArray_message_group() {        return false;    }    /**     * Return the offset (in bytes) of the field 'message.group'     */    public static int offset_message_group() {        return (24 / 8);    }    /**     * Return the offset (in bits) of the field 'message.group'     */    public static int offsetBits_message_group() {        return 24;    }    /**     * Return the value (as a short) of the field 'message.group'     */    public short get_message_group() {        return (short)getUIntElement(offsetBits_message_group(), 8);    }    /**     * Set the value of the field 'message.group'     */    public void set_message_group(short value) {        setUIntElement(offsetBits_message_group(), 8, value);    }    /**     * Return the size, in bytes, of the field 'message.group'     */    public static int size_message_group() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'message.group'     */    public static int sizeBits_message_group() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: message.length    //   Field type: short    //   Offset (bits): 32    //   Size (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'message.length' is signed (false).     */    public static boolean isSigned_message_length() {        return false;    }    /**     * Return whether the field 'message.length' is an array (false).     */    public static boolean isArray_message_length() {        return false;    }    /**     * Return the offset (in bytes) of the field 'message.length'     */    public static int offset_message_length() {        return (32 / 8);    }    /**     * Return the offset (in bits) of the field 'message.length'     */    public static int offsetBits_message_length() {        return 32;    }    /**     * Return the value (as a short) of the field 'message.length'     */    public short get_message_length() {        return (short)getUIntElement(offsetBits_message_length(), 8);    }    /**     * Set the value of the field 'message.length'     */    public void set_message_length(short value) {        setUIntElement(offsetBits_message_length(), 8, value);    }    /**     * Return the size, in bytes, of the field 'message.length'     */    public static int size_message_length() {        return (8 / 8);    }    /**     * Return the size, in bits, of the field 'message.length'     */    public static int sizeBits_message_length() {        return 8;    }    /////////////////////////////////////////////////////////    // Accessor methods for field: message.data    //   Field type: byte[]    //   Offset (bits): 40    //   Size of each element (bits): 8    /////////////////////////////////////////////////////////    /**     * Return whether the field 'message.data' is signed (false).     */    public static boolean isSigned_message_data() {        return false;    }    /**     * Return whether the field 'message.data' is an array (true).     */    public static boolean isArray_message_data() {        return true;    }    /**     * Return the offset (in bytes) of the field 'message.data'     */    public static int offset_message_data(int index1) {        int offset = 40;        if (index1 < 0 || index1 >= 29) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return (offset / 8);    }    /**     * Return the offset (in bits) of the field 'message.data'     */    public static int offsetBits_message_data(int index1) {        int offset = 40;        if (index1 < 0 || index1 >= 29) throw new ArrayIndexOutOfBoundsException();        offset += 0 + index1 * 8;        return offset;    }    /**     * Return the entire array 'message.data' as a byte[]     */    public byte[] get_message_data() {        byte[] tmp = new byte[29];        for (int index0 = 0; index0 < numElements_message_data(0); index0++) {            tmp[index0] = getElement_message_data(index0);        }        return tmp;    }    /**     * Set the contents of the array 'message.data' from the given byte[]     */    public void set_message_data(byte[] value) {        for (int index0 = 0; index0 < value.length; index0++) {            setElement_message_data(index0, value[index0]);        }    }    /**     * Return an element (as a byte) of the array 'message.data'     */    public byte getElement_message_data(int index1) {        return (byte)getSIntElement(offsetBits_message_data(index1), 8);    }    /**     * Set an element of the array 'message.data'     */    public void setElement_message_data(int index1, byte value) {        setSIntElement(offsetBits_message_data(index1), 8, value);    }    /**

⌨️ 快捷键说明

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