def recv(self):
try:
data = super().recv(Message.SIZE)
except OSError as e:
if e.errno == errno.ENETDOWN:
raise BusDown
raise
res = ioctl(self, 0x8906, struct.pack("@LL", 0, 0))
seconds, microseconds = struct.unpack("@LL", res)
timestamp = seconds + microseconds / 1000000
msg = Message.from_bytes(data)
msg.timestamp = timestamp
return msg
评论列表
文章目录