net.tinyos.tinydb
Class UartMsg

java.lang.Object
  |
  +--net.tinyos.message.Message
        |
        +--net.tinyos.tinydb.UartMsg
All Implemented Interfaces:
java.lang.Cloneable

public class UartMsg
extends net.tinyos.message.Message


Field Summary
static int AM_TYPE
          The Active Message type associated with this message.
static int DEFAULT_MESSAGE_SIZE
          The default size of this message type in bytes.
 
Fields inherited from class net.tinyos.message.Message
base_offset, data_length, MAX_CONVERTED_STRING_LENGTH
 
Constructor Summary
UartMsg()
          Create a new UartMsg of size 30.
UartMsg(byte[] data)
          Create a new UartMsg using the given byte array as backing store.
UartMsg(byte[] data, int base_offset)
          Create a new UartMsg using the given byte array as backing store, with the given base offset.
UartMsg(byte[] data, int base_offset, int data_length)
          Create a new UartMsg using the given byte array as backing store, with the given base offset and data length.
UartMsg(int data_length)
          Create a new UartMsg of the given data_length.
UartMsg(int data_length, int base_offset)
          Create a new UartMsg with the given data_length and base offset.
UartMsg(net.tinyos.message.Message msg, int base_offset)
          Create a new UartMsg embedded in the given message at the given base offset.
UartMsg(net.tinyos.message.Message msg, int base_offset, int data_length)
          Create a new UartMsg embedded in the given message at the given base offset and length.
 
Method Summary
 int amType()
          Return the Active Message type of this message (-1 if unknown).
static int elementSize_data()
          Return the size, in bytes, of each element of the array 'data'
static int elementSizeBits_data()
          Return the size, in bits, of each element of the array 'data'
 byte[] get_data()
          Return the entire array 'data' as a byte[]
 byte getElement_data(int index1)
          Return an element (as a byte) of the array 'data'
 java.lang.String getString_data()
          Read the array 'data' as a String
static boolean isArray_data()
          Return whether the field 'data' is an array (true).
static boolean isSigned_data()
          Return whether the field 'data' is signed (true).
static int numDimensions_data()
          Return the number of dimensions in the array 'data'
static int numElements_data()
          Return the number of elements in the array 'data'
static int numElements_data(int dimension)
          Return the number of elements in the array 'data' for the given dimension.
static int offset_data(int index1)
          Return the offset (in bytes) of the field 'data'
static int offsetBits_data(int index1)
          Return the offset (in bits) of the field 'data'
 void set_data(byte[] value)
          Set the contents of the array 'data' from the given byte[]
 void setElement_data(int index1, byte value)
          Set an element of the array 'data'
 void setString_data(java.lang.String s)
          Fill in the array 'data' with a String
 java.lang.String toString()
          /* Return a String representation of this message.
static int totalSize_data()
          Return the total size, in bytes, of the array 'data'
static int totalSizeBits_data()
          Return the total size, in bits, of the array 'data'
 
Methods inherited from class net.tinyos.message.Message
baseOffset, clone, clone, dataGet, dataLength, dataSet, dataSet, getFloatElement, getSIntElement, getUIntElement, setFloatElement, setSIntElement, setUIntElement
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MESSAGE_SIZE

public static final int DEFAULT_MESSAGE_SIZE
The default size of this message type in bytes.

See Also:
Constant Field Values

AM_TYPE

public static final int AM_TYPE
The Active Message type associated with this message.

See Also:
Constant Field Values
Constructor Detail

UartMsg

public UartMsg()
Create a new UartMsg of size 30.


UartMsg

public UartMsg(int data_length)
Create a new UartMsg of the given data_length.


UartMsg

public UartMsg(int data_length,
               int base_offset)
Create a new UartMsg with the given data_length and base offset.


UartMsg

public UartMsg(byte[] data)
Create a new UartMsg using the given byte array as backing store.


UartMsg

public UartMsg(byte[] data,
               int base_offset)
Create a new UartMsg using the given byte array as backing store, with the given base offset.


UartMsg

public UartMsg(byte[] data,
               int base_offset,
               int data_length)
Create a new UartMsg using the given byte array as backing store, with the given base offset and data length.


UartMsg

public UartMsg(net.tinyos.message.Message msg,
               int base_offset)
Create a new UartMsg embedded in the given message at the given base offset.


UartMsg

public UartMsg(net.tinyos.message.Message msg,
               int base_offset,
               int data_length)
Create a new UartMsg embedded in the given message at the given base offset and length.

Method Detail

amType

public int amType()
Return the Active Message type of this message (-1 if unknown).

Overrides:
amType in class net.tinyos.message.Message

toString

public java.lang.String toString()
/* Return a String representation of this message. Includes the message type name and the non-indexed field values.

Overrides:
toString in class java.lang.Object

isSigned_data

public static boolean isSigned_data()
Return whether the field 'data' is signed (true).


isArray_data

public static boolean isArray_data()
Return whether the field 'data' is an array (true).


offset_data

public static int offset_data(int index1)
Return the offset (in bytes) of the field 'data'


offsetBits_data

public static int offsetBits_data(int index1)
Return the offset (in bits) of the field 'data'


get_data

public byte[] get_data()
Return the entire array 'data' as a byte[]


set_data

public void set_data(byte[] value)
Set the contents of the array 'data' from the given byte[]


getElement_data

public byte getElement_data(int index1)
Return an element (as a byte) of the array 'data'


setElement_data

public void setElement_data(int index1,
                            byte value)
Set an element of the array 'data'


totalSize_data

public static int totalSize_data()
Return the total size, in bytes, of the array 'data'


totalSizeBits_data

public static int totalSizeBits_data()
Return the total size, in bits, of the array 'data'


elementSize_data

public static int elementSize_data()
Return the size, in bytes, of each element of the array 'data'


elementSizeBits_data

public static int elementSizeBits_data()
Return the size, in bits, of each element of the array 'data'


numDimensions_data

public static int numDimensions_data()
Return the number of dimensions in the array 'data'


numElements_data

public static int numElements_data()
Return the number of elements in the array 'data'


numElements_data

public static int numElements_data(int dimension)
Return the number of elements in the array 'data' for the given dimension.


setString_data

public void setString_data(java.lang.String s)
Fill in the array 'data' with a String


getString_data

public java.lang.String getString_data()
Read the array 'data' as a String