net.tinyos.tinydb
Class EventMsg

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

public class EventMsg
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
EventMsg()
          Create a new EventMsg of size 3.
EventMsg(byte[] data)
          Create a new EventMsg using the given byte array as backing store.
EventMsg(byte[] data, int base_offset)
          Create a new EventMsg using the given byte array as backing store, with the given base offset.
EventMsg(byte[] data, int base_offset, int data_length)
          Create a new EventMsg using the given byte array as backing store, with the given base offset and data length.
EventMsg(int data_length)
          Create a new EventMsg of the given data_length.
EventMsg(int data_length, int base_offset)
          Create a new EventMsg with the given data_length and base offset.
EventMsg(net.tinyos.message.Message msg, int base_offset)
          Create a new EventMsg embedded in the given message at the given base offset.
EventMsg(net.tinyos.message.Message msg, int base_offset, int data_length)
          Create a new EventMsg 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 get_fromBase()
          Return the value (as a byte) of the field 'fromBase'
 short get_nodeid()
          Return the value (as a short) of the field 'nodeid'
 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 isArray_fromBase()
          Return whether the field 'fromBase' is an array (false).
static boolean isArray_nodeid()
          Return whether the field 'nodeid' is an array (false).
static boolean isSigned_data()
          Return whether the field 'data' is signed (true).
static boolean isSigned_fromBase()
          Return whether the field 'fromBase' is signed (true).
static boolean isSigned_nodeid()
          Return whether the field 'nodeid' is signed (true).
static int numDimensions_data()
          Return the number of dimensions 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 offset_fromBase()
          Return the offset (in bytes) of the field 'fromBase'
static int offset_nodeid()
          Return the offset (in bytes) of the field 'nodeid'
static int offsetBits_data(int index1)
          Return the offset (in bits) of the field 'data'
static int offsetBits_fromBase()
          Return the offset (in bits) of the field 'fromBase'
static int offsetBits_nodeid()
          Return the offset (in bits) of the field 'nodeid'
 void set_data(byte[] value)
          Set the contents of the array 'data' from the given byte[]
 void set_fromBase(byte value)
          Set the value of the field 'fromBase'
 void set_nodeid(short value)
          Set the value of the field 'nodeid'
 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
static int size_fromBase()
          Return the size, in bytes, of the field 'fromBase'
static int size_nodeid()
          Return the size, in bytes, of the field 'nodeid'
static int sizeBits_fromBase()
          Return the size, in bits, of the field 'fromBase'
static int sizeBits_nodeid()
          Return the size, in bits, of the field 'nodeid'
 java.lang.String toString()
          /* Return a String representation of this message.
 
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

EventMsg

public EventMsg()
Create a new EventMsg of size 3.


EventMsg

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


EventMsg

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


EventMsg

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


EventMsg

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


EventMsg

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


EventMsg

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


EventMsg

public EventMsg(net.tinyos.message.Message msg,
                int base_offset,
                int data_length)
Create a new EventMsg 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_nodeid

public static boolean isSigned_nodeid()
Return whether the field 'nodeid' is signed (true).


isArray_nodeid

public static boolean isArray_nodeid()
Return whether the field 'nodeid' is an array (false).


offset_nodeid

public static int offset_nodeid()
Return the offset (in bytes) of the field 'nodeid'


offsetBits_nodeid

public static int offsetBits_nodeid()
Return the offset (in bits) of the field 'nodeid'


get_nodeid

public short get_nodeid()
Return the value (as a short) of the field 'nodeid'


set_nodeid

public void set_nodeid(short value)
Set the value of the field 'nodeid'


size_nodeid

public static int size_nodeid()
Return the size, in bytes, of the field 'nodeid'


sizeBits_nodeid

public static int sizeBits_nodeid()
Return the size, in bits, of the field 'nodeid'


isSigned_fromBase

public static boolean isSigned_fromBase()
Return whether the field 'fromBase' is signed (true).


isArray_fromBase

public static boolean isArray_fromBase()
Return whether the field 'fromBase' is an array (false).


offset_fromBase

public static int offset_fromBase()
Return the offset (in bytes) of the field 'fromBase'


offsetBits_fromBase

public static int offsetBits_fromBase()
Return the offset (in bits) of the field 'fromBase'


get_fromBase

public byte get_fromBase()
Return the value (as a byte) of the field 'fromBase'


set_fromBase

public void set_fromBase(byte value)
Set the value of the field 'fromBase'


size_fromBase

public static int size_fromBase()
Return the size, in bytes, of the field 'fromBase'


sizeBits_fromBase

public static int sizeBits_fromBase()
Return the size, in bits, of the field 'fromBase'


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'


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(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