Skip to main content

Python wrapper for zlgcan driver.

Reason this release was yanked:

can't receive

Project description

PyPI Downloads PyPI Downloads

ZLGCAN驱动及集成到python-can(因内存模型不同,目前Windows下32位python会报内存非法访问的错误)

  1. 准备

    • 确保安装相关驱动(USBCAN-I/II驱动得额外安装)
    • 确保安装相VC++运行环境
    • 下载library文件夹(里面包含bitrate.cfg.yaml)
    • 库文件示例:
      library
        ├──bitrate.cfg.yaml
        ├──linux
          └─x86_64
        └─windows
           ├─x86
           └─x86_64
      
    • 在初始化can.Bus的时候指定zlgcan库路径(从0.2.0开始移除zcan.env配置), 默认为相对工程运行文件同级目录下library
      libpath=r"C:\your\library\path"
      
  2. 安装zlgcan(不建议使用低于0.2.0版本)

    pip install zlgcan >= 0.2.0
    
  3. 使用:

    import can
    from zlgcan.zlgcan import ZCanTxMode, ZCANDeviceType
    
    with can.Bus(interface="zlgcan", device_type=ZCANDeviceType.ZCAN_USBCANFD_200U,
                 libpath="library/",
                 configs=[{'bitrate': 500000, 'resistance': 1}, {'bitrate': 500000, 'resistance': 1}]) as bus:
        bus.send(can.Message(
            arbitration_id=0x123,
            is_extended_id=False,
            channel=0,
            data=[0x01, 0x02, 0x03, ],
            dlc=3,
        ), tx_mode=ZCanTxMode.SELF_SR)
    
        # time.sleep(0.1)
        _msg = bus.recv()
        print(_msg)
    
  4. CAN测试列表:

    • USBCAN-I-mini - ZCAN_USBCAN1, ZCAN_USBCAN2
    • USBCAN-4E-U - ZCAN_USBCAN_4E_U
    • USBCANFD-100U-mini - ZCAN_USBCANFD_MINI
    • USBCANFD-100U - ZCAN_USBCANFD_100U
    • USBCANFD-200U - ZCAN_USBCANFD_200U
    • USBCANFD-800U - ZCAN_USBCANFD_800U
  5. 注意事项:

    • ZCAN_USBCAN1及ZCAN_USBCAN2类型的设备无论是windows还是Linux, 波特率支持均在bitrate.cfg.yaml中配置
      • 此时计算timing0及timing1请下载CAN波特率计算软件
      • bitrate.cfg.yaml文件中USBCANFD设备只配置了500k及1M的波特率, 如需使用其他波特率, 请自行添加
    • 其他CANFD类型的CAN卡仅仅在Linux上使用时bitrate.cfg.yaml中配置
      • 此时计算相关值可以通过ZCANPRO软件
    • 在Linux上使用ZCAN_USBCAN1衍生CAN卡时, 请在初始化时候设置ZCanDeriveInfo信息
    • 该库主要依赖rust-can,如有问题,请提issue
  6. 官方工具及文档:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zlgcan-0.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zlgcan-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (491.1 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (491.2 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-cp313-cp313-win_amd64.whl (306.7 kB view details)

Uploaded CPython 3.13Windows x86-64

zlgcan-0.2.0-cp313-cp313-win32.whl (300.0 kB view details)

Uploaded CPython 3.13Windows x86

zlgcan-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (488.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-cp312-cp312-win_amd64.whl (307.9 kB view details)

Uploaded CPython 3.12Windows x86-64

zlgcan-0.2.0-cp312-cp312-win32.whl (300.5 kB view details)

Uploaded CPython 3.12Windows x86

zlgcan-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (489.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-cp311-cp311-win_amd64.whl (307.1 kB view details)

Uploaded CPython 3.11Windows x86-64

zlgcan-0.2.0-cp311-cp311-win32.whl (301.1 kB view details)

Uploaded CPython 3.11Windows x86

zlgcan-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (489.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-cp310-cp310-win_amd64.whl (307.1 kB view details)

Uploaded CPython 3.10Windows x86-64

zlgcan-0.2.0-cp310-cp310-win32.whl (301.2 kB view details)

Uploaded CPython 3.10Windows x86

zlgcan-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (489.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-cp39-cp39-win_amd64.whl (308.2 kB view details)

Uploaded CPython 3.9Windows x86-64

zlgcan-0.2.0-cp39-cp39-win32.whl (301.9 kB view details)

Uploaded CPython 3.9Windows x86

zlgcan-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (491.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

zlgcan-0.2.0-cp38-cp38-win_amd64.whl (308.0 kB view details)

Uploaded CPython 3.8Windows x86-64

zlgcan-0.2.0-cp38-cp38-win32.whl (301.9 kB view details)

Uploaded CPython 3.8Windows x86

zlgcan-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (491.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file zlgcan-0.2.0.tar.gz.

File metadata

  • Download URL: zlgcan-0.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c1fa9d488461b92501672f7866a06118e0c8d151b05de97d60d090ea661e0ee6
MD5 ae66966db940a32ceadb816160067948
BLAKE2b-256 1c3829bf320bf4a7d34f52421d517a32f3ba38ae1bc6fc0326e44c931cd38a06

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c34b4df9bcb970149b70dee42001635b6b459fbcbdcf74e2b97ced1f157f2108
MD5 08661d7aa86bf894ebb5c7fddd638105
BLAKE2b-256 87f3b5fbe4672e7b85ac978fe5abd77153e0795035606c5bdb14c48fcac74065

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7ec04e5d893bb0b799eddc08a290af3081a890ad1626622a328502fbbb0d197
MD5 8363f1de58c8b93e25910217bddf80b1
BLAKE2b-256 6e2b05ad6c2cb9e7930f44cfa4066e3df23c38a59d7b46f01fc9199fcd6d9fbf

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 306.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b520cf61b7d790c257e9d7d1fcea6a1f075c8c24d924bed8a534a83f685a511d
MD5 1a5962e1671a6ced3c5dc61bf3d85025
BLAKE2b-256 31f4ea47983964505b8b05c8a556323f1cf285217a438eee060078016b9612c8

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp313-cp313-win32.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 300.0 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 c234a1189d4d11c33c36a41818cc078e7a11e16c377b5588b8409c19cd37c5ec
MD5 70f3ac8091c94433bfc1459d1d403ddf
BLAKE2b-256 c095eed0c8407478815646251b6bddc9cd24c14d7db2fcf9a0514a8d8e9660f3

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0d1620a875d10592453e18faeaae94c6680189f0d01eae8157c2103e1293b8cf
MD5 cb50a7ec00a18e59bef066bb7db3e73b
BLAKE2b-256 1bd6c4665ab152d9e4b6053134361331b79ac36ac9016e5d7e246cb213648ce9

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 307.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5cb92781f905f730154f71c90511b4329e0ccc49039584cb462c641b41066390
MD5 4c2836e984e48fdb3273ae7d1f08c44c
BLAKE2b-256 6e8467d26a5f45aecbe93850e38bcbbdcc8f6726739806ad529f425691dcebc2

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 300.5 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 ed7ad2a054636767c8269f78c04eff9aafd938c06a282f259eeed201199e15c7
MD5 3dd51a7085a5a733d3ec908fd796039f
BLAKE2b-256 000ca6dd8da52371c9768981739493bc2e4c4ed65e9e26a2e706b5942a390cc1

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44e62bd88a11fbe2af2d40004134235e18a14614db0fe61136ce60dfa4bcae94
MD5 157eed2b88e048e2bfa0fe4901281e7e
BLAKE2b-256 6cdf4af9d715d983f6f5b8494b92d62227a8eed0f4a268291bb2e2c6974c7c60

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 307.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9dc72cba803596eadbccce5a2df33b930568e53b7370196de3bbe5498cf86816
MD5 d314d9e7fda645d40393f709ce86b690
BLAKE2b-256 70e75268e6e7966d141db329cc9992aaac4020307cc77603c943d06db6b97145

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 301.1 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 7a43caf63885177379f581de2b18cde96744ff78bc26149797bdbad9fedd2a24
MD5 7d96351b0bbc594508a286cddf34dbb7
BLAKE2b-256 c22f90130b0592da8cc05e66d580fa234ec226d35ff92882d1edd93dad8b262a

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c3aa38be5cec6ddf25a4aec7df61776a68e6f8113afae326eaf6dfa1dad2973
MD5 0af6940b4a0e3184739cd2501b713f68
BLAKE2b-256 9ca1113fa370c63fd228784b83c65ec93444688d8cf3690b063edce3421afec6

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 307.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d9dba5d4ba2227d24d2a1b5b15fad5111dda03346075b382285e4718ede2d15f
MD5 e0be686b98df551bfd2c0dda58795b96
BLAKE2b-256 f9044e38ca8caf6225d308b0f21fc77326f1eee52922c5e00918fc1ce3e793bb

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 301.2 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 34c36c0a863e566892bfcaec4ad553eb8c0198c08da41913a3879a40fff7b99c
MD5 edb2487759a91f9544d62ef8932e04b0
BLAKE2b-256 7a891b302e750f6f2e480e7b3cf20211c58933e9f99b1a6a4d788bf085698edd

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b309d97d1359e9a7374d1a7c38225c41b9d1e0af86b14c028e0e7ac644a7bcf
MD5 7d546cd439598a89dfbe10c3967376ac
BLAKE2b-256 28d8303584479daeb17cf85223fd70ff8c3e0708b5cfbd258ea20ee1d22c7c2d

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 308.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8c5b8b634003891378759f1df8df19d9f786b079461aee3e4a2db675bc817389
MD5 cd79c4a2a4a82f6069cb9239b693009c
BLAKE2b-256 4f7bc152b9132c280f8d056514df1c5fc64c6c2db44df4c2212d2304af78f949

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp39-cp39-win32.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp39-cp39-win32.whl
  • Upload date:
  • Size: 301.9 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 adf5bff291f8ca8218a596fe22152e9cc59473f88dfec7e2d5b6df17116fd6a6
MD5 60d966a452fa7eb926ac8f12613db0e0
BLAKE2b-256 ce65381b99af8259dab4ab0a3817656c8d419ffbcd157d803fa1ca1e066917ff

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cbb1f030dc6e73d3e436aaf11d1b1d94af4119746d4849ac26f57fc1ca99a4d
MD5 f136747313b1a7c741ae6d01119f5413
BLAKE2b-256 561270e9fc534da9997335d3d2f471838db88b6ee265a5989a553922e5ce0b2a

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 308.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 02114a796dddf60ffe0ca38a3221a1a23868a7a2d35281cb365d788d8b1080cf
MD5 6e283eaaa9c4c32af8ad16b79e3fcd15
BLAKE2b-256 d3e77e810c9ced6c2e14216af7644b0d1b302c7461c36d14460bb239b3e96bfe

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: zlgcan-0.2.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 301.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for zlgcan-0.2.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 441a0fc26a219d565007f837cad9cfdaf743ba40bced2459abb14a6aa5a79f1c
MD5 cb04bace4d58427b3e0f36c6bca32bc1
BLAKE2b-256 0c1661c5ddacfa6d8acb44c6ecc5cb1f842b4c1d4ae141ec6a231063ec73598b

See more details on using hashes here.

File details

Details for the file zlgcan-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zlgcan-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3333df3a514678c82a9471eb5fb7ded733e1169af33ad46e79e33b5d6a964a9b
MD5 58a6c583c97fb388a7be9e897ac05cb0
BLAKE2b-256 86439ff7b5f5c405544cac8f8ffd3d6441f45516233d1e29b5a4c887b737f2b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page