[Firebug-cvs] firebug/project/java/src/org/firebug FireMsg.java,NONE,1.1
Brought to you by:
doolin
From: <do...@us...> - 2004-02-18 01:27:46
|
Update of /cvsroot/firebug/firebug/project/java/src/org/firebug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10187/src/org/firebug Added Files: FireMsg.java Log Message: Updated firebug java tools to work with new stuff. --- NEW FILE: FireMsg.java --- /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'FireMsg' * message type. */ package org.firebug; public class FireMsg extends net.tinyos.message.Message { /** The default size of this message type in bytes. */ public static final int DEFAULT_MESSAGE_SIZE = 20; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 128; /** Create a new FireMsg of size 20. */ public FireMsg() { super(DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** Create a new FireMsg of the given data_length. */ public FireMsg(int data_length) { super(data_length); amTypeSet(AM_TYPE); } /** * Create a new FireMsg with the given data_length * and base offset. */ public FireMsg(int data_length, int base_offset) { super(data_length, base_offset); amTypeSet(AM_TYPE); } /** * Create a new FireMsg using the given byte array * as backing store. */ public FireMsg(byte[] data) { super(data); amTypeSet(AM_TYPE); } /** * Create a new FireMsg using the given byte array * as backing store, with the given base offset. */ public FireMsg(byte[] data, int base_offset) { super(data, base_offset); amTypeSet(AM_TYPE); } /** * Create a new FireMsg using the given byte array * as backing store, with the given base offset and data length. */ public FireMsg(byte[] data, int base_offset, int data_length) { super(data, base_offset, data_length); amTypeSet(AM_TYPE); } /** * Create a new FireMsg embedded in the given message * at the given base offset. */ public FireMsg(net.tinyos.message.Message msg, int base_offset) { super(msg, base_offset, DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** * Create a new FireMsg embedded in the given message * at the given base offset and length. */ public FireMsg(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 <FireMsg> \n"; try { s += " [addr=0x"+Long.toHexString(get_addr())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [cnt=0x"+Long.toHexString(get_cnt())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [temp="+Float.toString(get_temp())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [rel_hum="+Float.toString(get_rel_hum())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [baro_pres="+Float.toString(get_baro_pres())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [lux="+Float.toString(get_lux())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } return s; } // Message-type-specific access methods appear below. ///////////////////////////////////////////////////////// // Accessor methods for field: addr // Field type: int // Offset (bits): 0 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'addr' is signed (true). */ public static boolean isSigned_addr() { return true; } /** * Return whether the field 'addr' is an array (false). */ public static boolean isArray_addr() { return false; } /** * Return the offset (in bytes) of the field 'addr' */ public static int offset_addr() { return (0 / 8); } /** * Return the offset (in bits) of the field 'addr' */ public static int offsetBits_addr() { return 0; } /** * Return the value (as a int) of the field 'addr' */ public int get_addr() { return (int)getUIntElement(offsetBits_addr(), 16); } /** * Set the value of the field 'addr' */ public void set_addr(int value) { setUIntElement(offsetBits_addr(), 16, value); } /** * Return the size, in bytes, of the field 'addr' */ public static int size_addr() { return (16 / 8); } /** * Return the size, in bits, of the field 'addr' */ public static int sizeBits_addr() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: cnt // Field type: int // Offset (bits): 16 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'cnt' is signed (true). */ public static boolean isSigned_cnt() { return true; } /** * Return whether the field 'cnt' is an array (false). */ public static boolean isArray_cnt() { return false; } /** * Return the offset (in bytes) of the field 'cnt' */ public static int offset_cnt() { return (16 / 8); } /** * Return the offset (in bits) of the field 'cnt' */ public static int offsetBits_cnt() { return 16; } /** * Return the value (as a int) of the field 'cnt' */ public int get_cnt() { return (int)getUIntElement(offsetBits_cnt(), 16); } /** * Set the value of the field 'cnt' */ public void set_cnt(int value) { setUIntElement(offsetBits_cnt(), 16, value); } /** * Return the size, in bytes, of the field 'cnt' */ public static int size_cnt() { return (16 / 8); } /** * Return the size, in bits, of the field 'cnt' */ public static int sizeBits_cnt() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: temp // Field type: float // Offset (bits): 32 // Size (bits): 32 ///////////////////////////////////////////////////////// /** * Return whether the field 'temp' is signed (true). */ public static boolean isSigned_temp() { return true; } /** * Return whether the field 'temp' is an array (false). */ public static boolean isArray_temp() { return false; } /** * Return the offset (in bytes) of the field 'temp' */ public static int offset_temp() { return (32 / 8); } /** * Return the offset (in bits) of the field 'temp' */ public static int offsetBits_temp() { return 32; } /** * Return the value (as a float) of the field 'temp' */ public float get_temp() { return (float)getFloatElement(offsetBits_temp(), 32); } /** * Set the value of the field 'temp' */ public void set_temp(float value) { setFloatElement(offsetBits_temp(), 32, value); } /** * Return the size, in bytes, of the field 'temp' */ public static int size_temp() { return (32 / 8); } /** * Return the size, in bits, of the field 'temp' */ public static int sizeBits_temp() { return 32; } ///////////////////////////////////////////////////////// // Accessor methods for field: rel_hum // Field type: float // Offset (bits): 64 // Size (bits): 32 ///////////////////////////////////////////////////////// /** * Return whether the field 'rel_hum' is signed (true). */ public static boolean isSigned_rel_hum() { return true; } /** * Return whether the field 'rel_hum' is an array (false). */ public static boolean isArray_rel_hum() { return false; } /** * Return the offset (in bytes) of the field 'rel_hum' */ public static int offset_rel_hum() { return (64 / 8); } /** * Return the offset (in bits) of the field 'rel_hum' */ public static int offsetBits_rel_hum() { return 64; } /** * Return the value (as a float) of the field 'rel_hum' */ public float get_rel_hum() { return (float)getFloatElement(offsetBits_rel_hum(), 32); } /** * Set the value of the field 'rel_hum' */ public void set_rel_hum(float value) { setFloatElement(offsetBits_rel_hum(), 32, value); } /** * Return the size, in bytes, of the field 'rel_hum' */ public static int size_rel_hum() { return (32 / 8); } /** * Return the size, in bits, of the field 'rel_hum' */ public static int sizeBits_rel_hum() { return 32; } ///////////////////////////////////////////////////////// // Accessor methods for field: baro_pres // Field type: float // Offset (bits): 96 // Size (bits): 32 ///////////////////////////////////////////////////////// /** * Return whether the field 'baro_pres' is signed (true). */ public static boolean isSigned_baro_pres() { return true; } /** * Return whether the field 'baro_pres' is an array (false). */ public static boolean isArray_baro_pres() { return false; } /** * Return the offset (in bytes) of the field 'baro_pres' */ public static int offset_baro_pres() { return (96 / 8); } /** * Return the offset (in bits) of the field 'baro_pres' */ public static int offsetBits_baro_pres() { return 96; } /** * Return the value (as a float) of the field 'baro_pres' */ public float get_baro_pres() { return (float)getFloatElement(offsetBits_baro_pres(), 32); } /** * Set the value of the field 'baro_pres' */ public void set_baro_pres(float value) { setFloatElement(offsetBits_baro_pres(), 32, value); } /** * Return the size, in bytes, of the field 'baro_pres' */ public static int size_baro_pres() { return (32 / 8); } /** * Return the size, in bits, of the field 'baro_pres' */ public static int sizeBits_baro_pres() { return 32; } ///////////////////////////////////////////////////////// // Accessor methods for field: lux // Field type: float // Offset (bits): 128 // Size (bits): 32 ///////////////////////////////////////////////////////// /** * Return whether the field 'lux' is signed (true). */ public static boolean isSigned_lux() { return true; } /** * Return whether the field 'lux' is an array (false). */ public static boolean isArray_lux() { return false; } /** * Return the offset (in bytes) of the field 'lux' */ public static int offset_lux() { return (128 / 8); } /** * Return the offset (in bits) of the field 'lux' */ public static int offsetBits_lux() { return 128; } /** * Return the value (as a float) of the field 'lux' */ public float get_lux() { return (float)getFloatElement(offsetBits_lux(), 32); } /** * Set the value of the field 'lux' */ public void set_lux(float value) { setFloatElement(offsetBits_lux(), 32, value); } /** * Return the size, in bytes, of the field 'lux' */ public static int size_lux() { return (32 / 8); } /** * Return the size, in bits, of the field 'lux' */ public static int sizeBits_lux() { return 32; } } |