📄 udpreport.py
字号:
#
# This class is automatically generated by mig. DO NOT EDIT THIS FILE.
# This class implements a Python interface to the 'UdpReport'
# message type.
#
import tinyos.message.Message
# The default size of this message type in bytes.
DEFAULT_MESSAGE_SIZE = 35
# The Active Message type associated with this message.
AM_TYPE = -1
class UdpReport(tinyos.message.Message.Message):
# Create a new UdpReport of size 35.
def __init__(self, data="", addr=None, gid=None, base_offset=0, data_length=35):
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 <UdpReport> \n"
try:
s += " [ip.sent=0x%x]\n" % (self.get_ip_sent())
except:
pass
try:
s += " [ip.forwarded=0x%x]\n" % (self.get_ip_forwarded())
except:
pass
try:
s += " [ip.rx_drop=0x%x]\n" % (self.get_ip_rx_drop())
except:
pass
try:
s += " [ip.tx_drop=0x%x]\n" % (self.get_ip_tx_drop())
except:
pass
try:
s += " [ip.fw_drop=0x%x]\n" % (self.get_ip_fw_drop())
except:
pass
try:
s += " [ip.rx_total=0x%x]\n" % (self.get_ip_rx_total())
except:
pass
try:
s += " [ip.real_drop=0x%x]\n" % (self.get_ip_real_drop())
except:
pass
try:
s += " [ip.hlim_drop=0x%x]\n" % (self.get_ip_hlim_drop())
except:
pass
try:
s += " [ip.senddone_el=0x%x]\n" % (self.get_ip_senddone_el())
except:
pass
try:
s += " [ip.fragpool=0x%x]\n" % (self.get_ip_fragpool())
except:
pass
try:
s += " [ip.sendinfo=0x%x]\n" % (self.get_ip_sendinfo())
except:
pass
try:
s += " [ip.sendentry=0x%x]\n" % (self.get_ip_sendentry())
except:
pass
try:
s += " [ip.sndqueue=0x%x]\n" % (self.get_ip_sndqueue())
except:
pass
try:
s += " [ip.encfail=0x%x]\n" % (self.get_ip_encfail())
except:
pass
try:
s += " [ip.heapfree=0x%x]\n" % (self.get_ip_heapfree())
except:
pass
try:
s += " [udp.total=0x%x]\n" % (self.get_udp_total())
except:
pass
try:
s += " [udp.failed=0x%x]\n" % (self.get_udp_failed())
except:
pass
try:
s += " [udp.seqno=0x%x]\n" % (self.get_udp_seqno())
except:
pass
try:
s += " [udp.sender=0x%x]\n" % (self.get_udp_sender())
except:
pass
try:
s += " [icmp.rx=0x%x]\n" % (self.get_icmp_rx())
except:
pass
try:
s += " [route.hop_limit=0x%x]\n" % (self.get_route_hop_limit())
except:
pass
try:
s += " [route.parent=0x%x]\n" % (self.get_route_parent())
except:
pass
try:
s += " [route.parent_metric=0x%x]\n" % (self.get_route_parent_metric())
except:
pass
try:
s += " [route.parent_etx=0x%x]\n" % (self.get_route_parent_etx())
except:
pass
return s
# Message-type-specific access methods appear below.
#
# Accessor methods for field: ip.sent
# Field type: int
# Offset (bits): 0
# Size (bits): 16
#
#
# Return whether the field 'ip.sent' is signed (False).
#
def isSigned_ip_sent(self):
return False
#
# Return whether the field 'ip.sent' is an array (False).
#
def isArray_ip_sent(self):
return False
#
# Return the offset (in bytes) of the field 'ip.sent'
#
def offset_ip_sent(self):
return (0 / 8)
#
# Return the offset (in bits) of the field 'ip.sent'
#
def offsetBits_ip_sent(self):
return 0
#
# Return the value (as a int) of the field 'ip.sent'
#
def get_ip_sent(self):
return self.getUIntElement(self.offsetBits_ip_sent(), 16, 1)
#
# Set the value of the field 'ip.sent'
#
def set_ip_sent(self, value):
self.setUIntElement(self.offsetBits_ip_sent(), 16, value, 1)
#
# Return the size, in bytes, of the field 'ip.sent'
#
def size_ip_sent(self):
return (16 / 8)
#
# Return the size, in bits, of the field 'ip.sent'
#
def sizeBits_ip_sent(self):
return 16
#
# Accessor methods for field: ip.forwarded
# Field type: int
# Offset (bits): 16
# Size (bits): 16
#
#
# Return whether the field 'ip.forwarded' is signed (False).
#
def isSigned_ip_forwarded(self):
return False
#
# Return whether the field 'ip.forwarded' is an array (False).
#
def isArray_ip_forwarded(self):
return False
#
# Return the offset (in bytes) of the field 'ip.forwarded'
#
def offset_ip_forwarded(self):
return (16 / 8)
#
# Return the offset (in bits) of the field 'ip.forwarded'
#
def offsetBits_ip_forwarded(self):
return 16
#
# Return the value (as a int) of the field 'ip.forwarded'
#
def get_ip_forwarded(self):
return self.getUIntElement(self.offsetBits_ip_forwarded(), 16, 1)
#
# Set the value of the field 'ip.forwarded'
#
def set_ip_forwarded(self, value):
self.setUIntElement(self.offsetBits_ip_forwarded(), 16, value, 1)
#
# Return the size, in bytes, of the field 'ip.forwarded'
#
def size_ip_forwarded(self):
return (16 / 8)
#
# Return the size, in bits, of the field 'ip.forwarded'
#
def sizeBits_ip_forwarded(self):
return 16
#
# Accessor methods for field: ip.rx_drop
# Field type: short
# Offset (bits): 32
# Size (bits): 8
#
#
# Return whether the field 'ip.rx_drop' is signed (False).
#
def isSigned_ip_rx_drop(self):
return False
#
# Return whether the field 'ip.rx_drop' is an array (False).
#
def isArray_ip_rx_drop(self):
return False
#
# Return the offset (in bytes) of the field 'ip.rx_drop'
#
def offset_ip_rx_drop(self):
return (32 / 8)
#
# Return the offset (in bits) of the field 'ip.rx_drop'
#
def offsetBits_ip_rx_drop(self):
return 32
#
# Return the value (as a short) of the field 'ip.rx_drop'
#
def get_ip_rx_drop(self):
return self.getUIntElement(self.offsetBits_ip_rx_drop(), 8, 1)
#
# Set the value of the field 'ip.rx_drop'
#
def set_ip_rx_drop(self, value):
self.setUIntElement(self.offsetBits_ip_rx_drop(), 8, value, 1)
#
# Return the size, in bytes, of the field 'ip.rx_drop'
#
def size_ip_rx_drop(self):
return (8 / 8)
#
# Return the size, in bits, of the field 'ip.rx_drop'
#
def sizeBits_ip_rx_drop(self):
return 8
#
# Accessor methods for field: ip.tx_drop
# Field type: short
# Offset (bits): 40
# Size (bits): 8
#
#
# Return whether the field 'ip.tx_drop' is signed (False).
#
def isSigned_ip_tx_drop(self):
return False
#
# Return whether the field 'ip.tx_drop' is an array (False).
#
def isArray_ip_tx_drop(self):
return False
#
# Return the offset (in bytes) of the field 'ip.tx_drop'
#
def offset_ip_tx_drop(self):
return (40 / 8)
#
# Return the offset (in bits) of the field 'ip.tx_drop'
#
def offsetBits_ip_tx_drop(self):
return 40
#
# Return the value (as a short) of the field 'ip.tx_drop'
#
def get_ip_tx_drop(self):
return self.getUIntElement(self.offsetBits_ip_tx_drop(), 8, 1)
#
# Set the value of the field 'ip.tx_drop'
#
def set_ip_tx_drop(self, value):
self.setUIntElement(self.offsetBits_ip_tx_drop(), 8, value, 1)
#
# Return the size, in bytes, of the field 'ip.tx_drop'
#
def size_ip_tx_drop(self):
return (8 / 8)
#
# Return the size, in bits, of the field 'ip.tx_drop'
#
def sizeBits_ip_tx_drop(self):
return 8
#
# Accessor methods for field: ip.fw_drop
# Field type: short
# Offset (bits): 48
# Size (bits): 8
#
#
# Return whether the field 'ip.fw_drop' is signed (False).
#
def isSigned_ip_fw_drop(self):
return False
#
# Return whether the field 'ip.fw_drop' is an array (False).
#
def isArray_ip_fw_drop(self):
return False
#
# Return the offset (in bytes) of the field 'ip.fw_drop'
#
def offset_ip_fw_drop(self):
return (48 / 8)
#
# Return the offset (in bits) of the field 'ip.fw_drop'
#
def offsetBits_ip_fw_drop(self):
return 48
#
# Return the value (as a short) of the field 'ip.fw_drop'
#
def get_ip_fw_drop(self):
return self.getUIntElement(self.offsetBits_ip_fw_drop(), 8, 1)
#
# Set the value of the field 'ip.fw_drop'
#
def set_ip_fw_drop(self, value):
self.setUIntElement(self.offsetBits_ip_fw_drop(), 8, value, 1)
#
# Return the size, in bytes, of the field 'ip.fw_drop'
#
def size_ip_fw_drop(self):
return (8 / 8)
#
# Return the size, in bits, of the field 'ip.fw_drop'
#
def sizeBits_ip_fw_drop(self):
return 8
#
# Accessor methods for field: ip.rx_total
# Field type: short
# Offset (bits): 56
# Size (bits): 8
#
#
# Return whether the field 'ip.rx_total' is signed (False).
#
def isSigned_ip_rx_total(self):
return False
#
# Return whether the field 'ip.rx_total' is an array (False).
#
def isArray_ip_rx_total(self):
return False
#
# Return the offset (in bytes) of the field 'ip.rx_total'
#
def offset_ip_rx_total(self):
return (56 / 8)
#
# Return the offset (in bits) of the field 'ip.rx_total'
#
def offsetBits_ip_rx_total(self):
return 56
#
# Return the value (as a short) of the field 'ip.rx_total'
#
def get_ip_rx_total(self):
return self.getUIntElement(self.offsetBits_ip_rx_total(), 8, 1)
#
# Set the value of the field 'ip.rx_total'
#
def set_ip_rx_total(self, value):
self.setUIntElement(self.offsetBits_ip_rx_total(), 8, value, 1)
#
# Return the size, in bytes, of the field 'ip.rx_total'
#
def size_ip_rx_total(self):
return (8 / 8)
#
# Return the size, in bits, of the field 'ip.rx_total'
#
def sizeBits_ip_rx_total(self):
return 8
#
# Accessor methods for field: ip.real_drop
# Field type: short
# Offset (bits): 64
# Size (bits): 8
#
#
# Return whether the field 'ip.real_drop' is signed (False).
#
def isSigned_ip_real_drop(self):
return False
#
# Return whether the field 'ip.real_drop' is an array (False).
#
def isArray_ip_real_drop(self):
return False
#
# Return the offset (in bytes) of the field 'ip.real_drop'
#
def offset_ip_real_drop(self):
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -