def endianness(self):
"""
'<' little-endian
'!' Network-byte-order (big-endian)
https://docs.python.org/3.5/library/struct.html#format-strings
From the RFC:
The NETWORK_BYTE_ORDER bit applies to all multi-byte integer
values in the entire AgentX packet, including the remaining
header fields. If set, then network byte order (most
significant byte first; "big endian") is used. If not set,
then least significant byte first ("little endian") is used.
"""
return '!' if self.flag__network_byte_order else '<'
评论列表
文章目录