CAN.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:canopen-rpi 作者: bggardner 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号