hardbyte / python-can

The can package provides controller area network support for Python developers
https://python-can.readthedocs.io
GNU Lesser General Public License v3.0
1.26k stars 599 forks source link

Inconsistencies between interfaces #77

Closed hardbyte closed 7 years ago

hardbyte commented 8 years ago

Originally reported by: Christian Sandberg (Bitbucket: sandberg, GitHub: sandberg)


Found some inconsistencies between implementations.

  1. send() should raise can.CanError on failed transmissions according to documentation.
    • [x] a) PCAN logs a warning and returns False
    • [x] b) socketcan_native logs a warning
    • [x] c)socketcan_ctypes ?
    • [x] d) usb2can logs a warning
  2. [x] serial does not implement send() and recv()
  3. [x] socketcan_native does not implement shutdown(), implements __del__ instead.
  4. [x] usb2can uses argument baud specified in kbit/s while others use bitrate and bits/s.
  5. [x] On Kvaser recv() when timeout is None, the call should block indefinitely until a message is received. Now it returns immediately.

hardbyte commented 8 years ago

Original comment by Brian Thorne (Bitbucket: hardbyte, GitHub: hardbyte):


Between changes on develop and the "doc" PR 2, 3, & 4 should all be fixed.

hardbyte commented 8 years ago

Original comment by Christian Sandberg (Bitbucket: sandberg, GitHub: sandberg):


Added no 5.

christiansandberg commented 7 years ago

Issues 1a and 5 have been fixed now.

hardbyte commented 7 years ago

Would you mind doing a quick sanity check Christian? If you're happy please close this issue.

christiansandberg commented 7 years ago

I'm happy! :thumbsup: