protocol.py 文件源码

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

项目:gps_track_pod 作者: iwanders 项目源码 文件源码
def __new__(self):
        b = "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"\
            " 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"\
            " 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"\
            " 00 00 00 00 00 00 00"
        byte_object = bytes([int(a, 16) for a in b.split(" ")])
        a = super().__new__(self)
        ctypes.memmove(ctypes.addressof(a.set_settings_request),
                       bytes(byte_object), len(byte_object))
        return a

    # Should equal 2 for off, 1 for on.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号