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

📄 testftspmsg.py

📁 tinyos-2.x.rar
💻 PY
📖 第 1 页 / 共 2 页
字号:
#
# 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

    #

⌨️ 快捷键说明

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