+#
+# This class is automatically generated by mig. DO NOT EDIT THIS FILE.
+# This class implements a Python interface to the 'TestFtspMsg'
+# message type.
+#
+
+import tinyos.message.Message
+
+# The default size of this message type in bytes.
+DEFAULT_MESSAGE_SIZE = 33
+
+# The Active Message type associated with this message.
+AM_TYPE = 137
+
+class TestFtspMsg(tinyos.message.Message.Message):
+ # Create a new TestFtspMsg of size 33.
+ def __init__(self, data="", addr=None, gid=None, base_offset=0, data_length=33):
+ tinyos.message.Message.Message.__init__(self, data, addr, gid, base_offset, data_length)
+ self.amTypeSet(AM_TYPE)
+
+ # Get AM_TYPE
+ def get_amType(cls):
+ return AM_TYPE
+
+ get_amType = classmethod(get_amType)
+
+ #
+ # Return a String representation of this message. Includes the
+ # message type name and the non-indexed field values.
+ #
+ def __str__(self):
+ s = "Message <TestFtspMsg> \n"
+ try:
+ s += " [src_addr=0x%x]\n" % (self.get_src_addr())
+ except:
+ pass
+ try:
+ s += " [counter=0x%x]\n" % (self.get_counter())
+ except:
+ pass
+ try:
+ s += " [local_rx_timestamp=0x%x]\n" % (self.get_local_rx_timestamp())
+ except:
+ pass
+ try:
+ s += " [global_rx_timestamp=0x%x]\n" % (self.get_global_rx_timestamp())
+ except:
+ pass
+ try:
+ s += " [skew_times_1000000=0x%x]\n" % (self.get_skew_times_1000000())
+ except:
+ pass
+ try:
+ s += " [skew=0x%x]\n" % (self.get_skew())
+ except:
+ pass
+ try:
+ s += " [is_synced=0x%x]\n" % (self.get_is_synced())
+ except:
+ pass
+ try:
+ s += " [ftsp_root_addr=0x%x]\n" % (self.get_ftsp_root_addr())
+ except:
+ pass
+ try:
+ s += " [ftsp_seq=0x%x]\n" % (self.get_ftsp_seq())
+ except:
+ pass
+ try:
+ s += " [ftsp_table_entries=0x%x]\n" % (self.get_ftsp_table_entries())
+ except:
+ pass
+ try:
+ s += " [localAverage=0x%x]\n" % (self.get_localAverage())
+ except:
+ pass
+ try:
+ s += " [offsetAverage=0x%x]\n" % (self.get_offsetAverage())
+ except:
+ pass
+ return s
+
+ # Message-type-specific access methods appear below.
+
+ #
+ # Accessor methods for field: src_addr
+ # Field type: int
+ # Offset (bits): 0
+ # Size (bits): 16
+ #
+
+ #
+ # Return whether the field 'src_addr' is signed (False).
+ #
+ def isSigned_src_addr(self):
+ return False
+
+ #
+ # Return whether the field 'src_addr' is an array (False).
+ #
+ def isArray_src_addr(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'src_addr'
+ #
+ def offset_src_addr(self):
+ return (0 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'src_addr'
+ #
+ def offsetBits_src_addr(self):
+ return 0
+
+ #
+ # Return the value (as a int) of the field 'src_addr'
+ #
+ def get_src_addr(self):
+ return self.getUIntElement(self.offsetBits_src_addr(), 16, 1)
+
+ #
+ # Set the value of the field 'src_addr'
+ #
+ def set_src_addr(self, value):
+ self.setUIntElement(self.offsetBits_src_addr(), 16, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'src_addr'
+ #
+ def size_src_addr(self):
+ return (16 / 8)
+
+ #
+ # Return the size, in bits, of the field 'src_addr'
+ #
+ def sizeBits_src_addr(self):
+ return 16
+
+ #
+ # Accessor methods for field: counter
+ # Field type: int
+ # Offset (bits): 16
+ # Size (bits): 16
+ #
+
+ #
+ # Return whether the field 'counter' is signed (False).
+ #
+ def isSigned_counter(self):
+ return False
+
+ #
+ # Return whether the field 'counter' is an array (False).
+ #
+ def isArray_counter(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'counter'
+ #
+ def offset_counter(self):
+ return (16 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'counter'
+ #
+ def offsetBits_counter(self):
+ return 16
+
+ #
+ # Return the value (as a int) of the field 'counter'
+ #
+ def get_counter(self):
+ return self.getUIntElement(self.offsetBits_counter(), 16, 1)
+
+ #
+ # Set the value of the field 'counter'
+ #
+ def set_counter(self, value):
+ self.setUIntElement(self.offsetBits_counter(), 16, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'counter'
+ #
+ def size_counter(self):
+ return (16 / 8)
+
+ #
+ # Return the size, in bits, of the field 'counter'
+ #
+ def sizeBits_counter(self):
+ return 16
+
+ #
+ # Accessor methods for field: local_rx_timestamp
+ # Field type: long
+ # Offset (bits): 32
+ # Size (bits): 32
+ #
+
+ #
+ # Return whether the field 'local_rx_timestamp' is signed (False).
+ #
+ def isSigned_local_rx_timestamp(self):
+ return False
+
+ #
+ # Return whether the field 'local_rx_timestamp' is an array (False).
+ #
+ def isArray_local_rx_timestamp(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'local_rx_timestamp'
+ #
+ def offset_local_rx_timestamp(self):
+ return (32 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'local_rx_timestamp'
+ #
+ def offsetBits_local_rx_timestamp(self):
+ return 32
+
+ #
+ # Return the value (as a long) of the field 'local_rx_timestamp'
+ #
+ def get_local_rx_timestamp(self):
+ return self.getUIntElement(self.offsetBits_local_rx_timestamp(), 32, 1)
+
+ #
+ # Set the value of the field 'local_rx_timestamp'
+ #
+ def set_local_rx_timestamp(self, value):
+ self.setUIntElement(self.offsetBits_local_rx_timestamp(), 32, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'local_rx_timestamp'
+ #
+ def size_local_rx_timestamp(self):
+ return (32 / 8)
+
+ #
+ # Return the size, in bits, of the field 'local_rx_timestamp'
+ #
+ def sizeBits_local_rx_timestamp(self):
+ return 32
+
+ #
+ # Accessor methods for field: global_rx_timestamp
+ # Field type: long
+ # Offset (bits): 64
+ # Size (bits): 32
+ #
+
+ #
+ # Return whether the field 'global_rx_timestamp' is signed (False).
+ #
+ def isSigned_global_rx_timestamp(self):
+ return False
+
+ #
+ # Return whether the field 'global_rx_timestamp' is an array (False).
+ #
+ def isArray_global_rx_timestamp(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'global_rx_timestamp'
+ #
+ def offset_global_rx_timestamp(self):
+ return (64 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'global_rx_timestamp'
+ #
+ def offsetBits_global_rx_timestamp(self):
+ return 64
+
+ #
+ # Return the value (as a long) of the field 'global_rx_timestamp'
+ #
+ def get_global_rx_timestamp(self):
+ return self.getUIntElement(self.offsetBits_global_rx_timestamp(), 32, 1)
+
+ #
+ # Set the value of the field 'global_rx_timestamp'
+ #
+ def set_global_rx_timestamp(self, value):
+ self.setUIntElement(self.offsetBits_global_rx_timestamp(), 32, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'global_rx_timestamp'
+ #
+ def size_global_rx_timestamp(self):
+ return (32 / 8)
+
+ #
+ # Return the size, in bits, of the field 'global_rx_timestamp'
+ #
+ def sizeBits_global_rx_timestamp(self):
+ return 32
+
+ #
+ # Accessor methods for field: skew_times_1000000
+ # Field type: int
+ # Offset (bits): 96
+ # Size (bits): 32
+ #
+
+ #
+ # Return whether the field 'skew_times_1000000' is signed (False).
+ #
+ def isSigned_skew_times_1000000(self):
+ return False
+
+ #
+ # Return whether the field 'skew_times_1000000' is an array (False).
+ #
+ def isArray_skew_times_1000000(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'skew_times_1000000'
+ #
+ def offset_skew_times_1000000(self):
+ return (96 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'skew_times_1000000'
+ #
+ def offsetBits_skew_times_1000000(self):
+ return 96
+
+ #
+ # Return the value (as a int) of the field 'skew_times_1000000'
+ #
+ def get_skew_times_1000000(self):
+ return self.getSIntElement(self.offsetBits_skew_times_1000000(), 32, 1)
+
+ #
+ # Set the value of the field 'skew_times_1000000'
+ #
+ def set_skew_times_1000000(self, value):
+ self.setSIntElement(self.offsetBits_skew_times_1000000(), 32, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'skew_times_1000000'
+ #
+ def size_skew_times_1000000(self):
+ return (32 / 8)
+
+ #
+ # Return the size, in bits, of the field 'skew_times_1000000'
+ #
+ def sizeBits_skew_times_1000000(self):
+ return 32
+
+ #
+ # Accessor methods for field: skew
+ # Field type: int
+ # Offset (bits): 128
+ # Size (bits): 32
+ #
+
+ #
+ # Return whether the field 'skew' is signed (False).
+ #
+ def isSigned_skew(self):
+ return False
+
+ #
+ # Return whether the field 'skew' is an array (False).
+ #
+ def isArray_skew(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'skew'
+ #
+ def offset_skew(self):
+ return (128 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'skew'
+ #
+ def offsetBits_skew(self):
+ return 128
+
+ #
+ # Return the value (as a int) of the field 'skew'
+ #
+ def get_skew(self):
+ return self.getFloatElement(self.offsetBits_skew(), 32, 0)
+
+ #
+ # Set the value of the field 'skew'
+ #
+ def set_skew(self, value):
+ self.setSIntElement(self.offsetBits_skew(), 32, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'skew'
+ #
+ def size_skew(self):
+ return (32 / 8)
+
+ #
+ # Return the size, in bits, of the field 'skew'
+ #
+ def sizeBits_skew(self):
+ return 32
+
+ #
+ # Accessor methods for field: is_synced
+ # Field type: short
+ # Offset (bits): 160
+ # Size (bits): 8
+ #
+
+ #
+ # Return whether the field 'is_synced' is signed (False).
+ #
+ def isSigned_is_synced(self):
+ return False
+
+ #
+ # Return whether the field 'is_synced' is an array (False).
+ #
+ def isArray_is_synced(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'is_synced'
+ #
+ def offset_is_synced(self):
+ return (160 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'is_synced'
+ #
+ def offsetBits_is_synced(self):
+ return 160
+
+ #
+ # Return the value (as a short) of the field 'is_synced'
+ #
+ def get_is_synced(self):
+ return self.getUIntElement(self.offsetBits_is_synced(), 8, 1)
+
+ #
+ # Set the value of the field 'is_synced'
+ #
+ def set_is_synced(self, value):
+ self.setUIntElement(self.offsetBits_is_synced(), 8, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'is_synced'
+ #
+ def size_is_synced(self):
+ return (8 / 8)
+
+ #
+ # Return the size, in bits, of the field 'is_synced'
+ #
+ def sizeBits_is_synced(self):
+ return 8
+
+ #
+ # Accessor methods for field: ftsp_root_addr
+ # Field type: int
+ # Offset (bits): 168
+ # Size (bits): 16
+ #
+
+ #
+ # Return whether the field 'ftsp_root_addr' is signed (False).
+ #
+ def isSigned_ftsp_root_addr(self):
+ return False
+
+ #
+ # Return whether the field 'ftsp_root_addr' is an array (False).
+ #
+ def isArray_ftsp_root_addr(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'ftsp_root_addr'
+ #
+ def offset_ftsp_root_addr(self):
+ return (168 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'ftsp_root_addr'
+ #
+ def offsetBits_ftsp_root_addr(self):
+ return 168
+
+ #
+ # Return the value (as a int) of the field 'ftsp_root_addr'
+ #
+ def get_ftsp_root_addr(self):
+ return self.getUIntElement(self.offsetBits_ftsp_root_addr(), 16, 1)
+
+ #
+ # Set the value of the field 'ftsp_root_addr'
+ #
+ def set_ftsp_root_addr(self, value):
+ self.setUIntElement(self.offsetBits_ftsp_root_addr(), 16, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'ftsp_root_addr'
+ #
+ def size_ftsp_root_addr(self):
+ return (16 / 8)
+
+ #
+ # Return the size, in bits, of the field 'ftsp_root_addr'
+ #
+ def sizeBits_ftsp_root_addr(self):
+ return 16
+
+ #
+ # Accessor methods for field: ftsp_seq
+ # Field type: short
+ # Offset (bits): 184
+ # Size (bits): 8
+ #
+
+ #
+ # Return whether the field 'ftsp_seq' is signed (False).
+ #
+ def isSigned_ftsp_seq(self):
+ return False
+
+ #
+ # Return whether the field 'ftsp_seq' is an array (False).
+ #
+ def isArray_ftsp_seq(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'ftsp_seq'
+ #
+ def offset_ftsp_seq(self):
+ return (184 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'ftsp_seq'
+ #
+ def offsetBits_ftsp_seq(self):
+ return 184
+
+ #
+ # Return the value (as a short) of the field 'ftsp_seq'
+ #
+ def get_ftsp_seq(self):
+ return self.getUIntElement(self.offsetBits_ftsp_seq(), 8, 1)
+
+ #
+ # Set the value of the field 'ftsp_seq'
+ #
+ def set_ftsp_seq(self, value):
+ self.setUIntElement(self.offsetBits_ftsp_seq(), 8, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'ftsp_seq'
+ #
+ def size_ftsp_seq(self):
+ return (8 / 8)
+
+ #
+ # Return the size, in bits, of the field 'ftsp_seq'
+ #
+ def sizeBits_ftsp_seq(self):
+ return 8
+
+ #
+ # Accessor methods for field: ftsp_table_entries
+ # Field type: short
+ # Offset (bits): 192
+ # Size (bits): 8
+ #
+
+ #
+ # Return whether the field 'ftsp_table_entries' is signed (False).
+ #
+ def isSigned_ftsp_table_entries(self):
+ return False
+
+ #
+ # Return whether the field 'ftsp_table_entries' is an array (False).
+ #
+ def isArray_ftsp_table_entries(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'ftsp_table_entries'
+ #
+ def offset_ftsp_table_entries(self):
+ return (192 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'ftsp_table_entries'
+ #
+ def offsetBits_ftsp_table_entries(self):
+ return 192
+
+ #
+ # Return the value (as a short) of the field 'ftsp_table_entries'
+ #
+ def get_ftsp_table_entries(self):
+ return self.getUIntElement(self.offsetBits_ftsp_table_entries(), 8, 1)
+
+ #
+ # Set the value of the field 'ftsp_table_entries'
+ #
+ def set_ftsp_table_entries(self, value):
+ self.setUIntElement(self.offsetBits_ftsp_table_entries(), 8, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'ftsp_table_entries'
+ #
+ def size_ftsp_table_entries(self):
+ return (8 / 8)
+
+ #
+ # Return the size, in bits, of the field 'ftsp_table_entries'
+ #
+ def sizeBits_ftsp_table_entries(self):
+ return 8
+
+ #
+ # Accessor methods for field: localAverage
+ # Field type: long
+ # Offset (bits): 200
+ # Size (bits): 32
+ #
+
+ #
+ # Return whether the field 'localAverage' is signed (False).
+ #
+ def isSigned_localAverage(self):
+ return False
+
+ #
+ # Return whether the field 'localAverage' is an array (False).
+ #
+ def isArray_localAverage(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'localAverage'
+ #
+ def offset_localAverage(self):
+ return (200 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'localAverage'
+ #
+ def offsetBits_localAverage(self):
+ return 200
+
+ #
+ # Return the value (as a long) of the field 'localAverage'
+ #
+ def get_localAverage(self):
+ return self.getUIntElement(self.offsetBits_localAverage(), 32, 1)
+
+ #
+ # Set the value of the field 'localAverage'
+ #
+ def set_localAverage(self, value):
+ self.setUIntElement(self.offsetBits_localAverage(), 32, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'localAverage'
+ #
+ def size_localAverage(self):
+ return (32 / 8)
+
+ #
+ # Return the size, in bits, of the field 'localAverage'
+ #
+ def sizeBits_localAverage(self):
+ return 32
+
+ #
+ # Accessor methods for field: offsetAverage
+ # Field type: int
+ # Offset (bits): 232
+ # Size (bits): 32
+ #
+
+ #
+ # Return whether the field 'offsetAverage' is signed (False).
+ #
+ def isSigned_offsetAverage(self):
+ return False
+
+ #
+ # Return whether the field 'offsetAverage' is an array (False).
+ #
+ def isArray_offsetAverage(self):
+ return False
+
+ #
+ # Return the offset (in bytes) of the field 'offsetAverage'
+ #
+ def offset_offsetAverage(self):
+ return (232 / 8)
+
+ #
+ # Return the offset (in bits) of the field 'offsetAverage'
+ #
+ def offsetBits_offsetAverage(self):
+ return 232
+
+ #
+ # Return the value (as a int) of the field 'offsetAverage'
+ #
+ def get_offsetAverage(self):
+ return self.getSIntElement(self.offsetBits_offsetAverage(), 32, 1)
+
+ #
+ # Set the value of the field 'offsetAverage'
+ #
+ def set_offsetAverage(self, value):
+ self.setSIntElement(self.offsetBits_offsetAverage(), 32, value, 1)
+
+ #
+ # Return the size, in bytes, of the field 'offsetAverage'
+ #
+ def size_offsetAverage(self):
+ return (32 / 8)
+
+ #
+ # Return the size, in bits, of the field 'offsetAverage'
+ #
+ def sizeBits_offsetAverage(self):
+ return 32
+