This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Sockets support for CAN_BCM
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Thorney, neologix, pitrou, python-dev, tshepang
Priority: normal Keywords: patch

Created on 2012-07-15 13:10 by Thorney, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
python_bcm.patch Thorney, 2012-07-15 13:10 Diff against 78110:ba264b26d8d9 review
bcm2.patch Thorney, 2013-01-16 02:49 Diff against 81536:3fa3e7975724 review
bcm3.patch Thorney, 2013-01-17 06:03 review
bcm4.patch Thorney, 2013-01-23 04:24 Diff against 81667:9a0cd5363c2a review
Messages (9)
msg165527 - (view) Author: Brian Thorne (Thorney) Date: 2012-07-15 13:10
In addition to CAN_RAW introduced in Python 3.3, it would be really useful to expose the CAN_BCM protocol. Effectively it hands off as much  to the kernel as possible which gives Python programs the ability to send and receive many periodic messages with little additional jitter or overhead.

I've attached an early stab at a patch to see if there is interest.

I'll be putting more examples of using BCM sockets at
msg165564 - (view) Author: Brian Thorne (Thorney) Date: 2012-07-16 02:25
Once I've got more complete examples, I can update the patch to include a testcase.
msg179030 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2013-01-04 14:36
Brian, could you add tests to Lib/test/ (look for CANTest, you should be able to complete them).
msg180070 - (view) Author: Brian Thorne (Thorney) Date: 2013-01-16 02:49
I've added a single BCM test. Any feedback on it would be good and then I'll add more complex ones.

Should the documentation be updated in this patch as well?
msg180118 - (view) Author: Brian Thorne (Thorney) Date: 2013-01-17 06:03
Thanks for the review Charles-François.
I can't make your suggested bcm_msg_fmt work - it was deadlocking on my machine!
msg180444 - (view) Author: Brian Thorne (Thorney) Date: 2013-01-23 04:24
I've added (some) docs and added checking of the BCM constants to the test_socket module.

I would guess that checking each broadcast manager function provided by the kernel isn't required?
msg180671 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2013-01-26 14:11
> I've added (some) docs and added checking of the BCM constants to the test_socket module.

This version looks good to me.
I'll commit it next week (I currently don't have access to my
development machine).

> I would guess that checking each broadcast manager function provided by the kernel isn't required?

No, the goal is not to test the kernel implementation. That should be
enough for now.
msg181466 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-02-05 18:42
New changeset f714af60508d by Charles-François Natali in branch 'default':
Issue #15359: Add CAN_BCM protocol support to the socket module. Patch by Brian
msg181472 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2013-02-05 19:38
Brian, thanks for the patch!
Date User Action Args
2022-04-11 14:57:32adminsetgithub: 59564
2013-02-05 19:38:42neologixsetstatus: open -> closed
resolution: fixed
messages: + msg181472

stage: resolved
2013-02-05 18:42:59python-devsetnosy: + python-dev
messages: + msg181466
2013-01-26 14:11:31neologixsetmessages: + msg180671
2013-01-23 04:25:00Thorneysetfiles: + bcm4.patch

messages: + msg180444
2013-01-17 06:03:23Thorneysetfiles: + bcm3.patch

messages: + msg180118
2013-01-16 02:49:53Thorneysetfiles: + bcm2.patch

messages: + msg180070
2013-01-04 14:36:22neologixsetmessages: + msg179030
2012-07-20 16:23:13tshepangsetnosy: + tshepang
2012-07-16 02:25:35Thorneysetmessages: + msg165564
2012-07-15 13:18:03pitrousetnosy: + neologix
2012-07-15 13:10:55Thorneycreate