Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets support for CAN_BCM #59564

Closed
Thorney mannequin opened this issue Jul 15, 2012 · 9 comments
Closed

Sockets support for CAN_BCM #59564

Thorney mannequin opened this issue Jul 15, 2012 · 9 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@Thorney
Copy link
Mannequin

Thorney mannequin commented Jul 15, 2012

BPO 15359
Nosy @pitrou
Files
  • python_bcm.patch: Diff against 78110:ba264b26d8d9
  • bcm2.patch: Diff against 81536:3fa3e7975724
  • bcm3.patch
  • bcm4.patch: Diff against 81667:9a0cd5363c2a
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2013-02-05.19:38:42.755>
    created_at = <Date 2012-07-15.13:10:55.436>
    labels = ['type-feature', 'library']
    title = 'Sockets support for CAN_BCM'
    updated_at = <Date 2013-02-05.19:38:42.753>
    user = 'https://bugs.python.org/Thorney'

    bugs.python.org fields:

    activity = <Date 2013-02-05.19:38:42.753>
    actor = 'neologix'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-02-05.19:38:42.755>
    closer = 'neologix'
    components = ['Library (Lib)']
    creation = <Date 2012-07-15.13:10:55.436>
    creator = 'Thorney'
    dependencies = []
    files = ['26386', '28747', '28756', '28805']
    hgrepos = []
    issue_num = 15359
    keywords = ['patch']
    message_count = 9.0
    messages = ['165527', '165564', '179030', '180070', '180118', '180444', '180671', '181466', '181472']
    nosy_count = 5.0
    nosy_names = ['pitrou', 'Thorney', 'neologix', 'tshepang', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue15359'
    versions = ['Python 3.4']

    @Thorney
    Copy link
    Mannequin Author

    Thorney mannequin commented Jul 15, 2012

    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 https://bitbucket.org/hardbyte/python-socket-examples

    @Thorney Thorney mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Jul 15, 2012
    @Thorney
    Copy link
    Mannequin Author

    Thorney mannequin commented Jul 16, 2012

    Once I've got more complete examples, I can update the patch to include a testcase.

    @neologix
    Copy link
    Mannequin

    neologix mannequin commented Jan 4, 2013

    Brian, could you add tests to Lib/test/test_socket.py (look for CANTest, you should be able to complete them).

    @Thorney
    Copy link
    Mannequin Author

    Thorney mannequin commented Jan 16, 2013

    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?

    @Thorney
    Copy link
    Mannequin Author

    Thorney mannequin commented Jan 17, 2013

    Thanks for the review Charles-François.
    I can't make your suggested bcm_msg_fmt work - it was deadlocking on my machine!

    @Thorney
    Copy link
    Mannequin Author

    Thorney mannequin commented Jan 23, 2013

    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?

    @neologix
    Copy link
    Mannequin

    neologix mannequin commented Jan 26, 2013

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 5, 2013

    New changeset f714af60508d by Charles-François Natali in branch 'default':
    Issue bpo-15359: Add CAN_BCM protocol support to the socket module. Patch by Brian
    http://hg.python.org/cpython/rev/f714af60508d

    @neologix
    Copy link
    Mannequin

    neologix mannequin commented Feb 5, 2013

    Committed.
    Brian, thanks for the patch!

    @neologix neologix mannequin closed this as completed Feb 5, 2013
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants