Git Product home page Git Product logo

python-can's Introduction

python-can

Latest Version on PyPi Latest Version on conda-forge Supported Python implementations Downloads on PePy Monthly downloads on PePy

Documentation Github Actions workflow status Test coverage reports on Coveralls.io Mergify Status This project uses the black formatter.

The Controller Area Network is a bus standard designed to allow microcontrollers and devices to communicate with each other. It has priority based bus arbitration and reliable deterministic communication. It is used in cars, trucks, boats, wheelchairs and more.

The can package provides controller area network support for Python developers; providing common abstractions to different hardware devices, and a suite of utilities for sending and receiving messages on a can bus.

The library currently supports CPython as well as PyPy and runs on Mac, Linux and Windows.

Library Version Python

2.x

2.6+, 3.4+

3.x

2.7+, 3.5+

4.0+

3.7+

4.3+

3.8+

Features

  • common abstractions for CAN communication
  • support for many different backends (see the docs)
  • receiving, sending, and periodically sending messages
  • normal and extended arbitration IDs
  • CAN FD support
  • many different loggers and readers supporting playback: ASC (CANalyzer format), BLF (Binary Logging Format by Vector), MF4 (Measurement Data Format v4 by ASAM), TRC, CSV, SQLite, and Canutils log
  • efficient in-kernel or in-hardware filtering of messages on supported interfaces
  • bus configuration reading from a file or from environment variables
  • command line tools for working with CAN buses (see the docs)
  • more

Example usage

pip install python-can

# import the library
import can

# create a bus instance using 'with' statement,
# this will cause bus.shutdown() to be called on the block exit;
# many other interfaces are supported as well (see documentation)
with can.Bus(interface='socketcan',
              channel='vcan0',
              receive_own_messages=True) as bus:

   # send a message
   message = can.Message(arbitration_id=123, is_extended_id=True,
                         data=[0x11, 0x22, 0x33])
   bus.send(message, timeout=0.2)

   # iterate over received messages
   for msg in bus:
       print(f"{msg.arbitration_id:X}: {msg.data}")

   # or use an asynchronous notifier
   notifier = can.Notifier(bus, [can.Logger("recorded.log"), can.Printer()])

You can find more information in the documentation, online at python-can.readthedocs.org.

Discussion

If you run into bugs, you can file them in our issue tracker on GitHub.

Stackoverflow has several questions and answers tagged with python+can.

Wherever we interact, we strive to follow the Python Community Code of Conduct.

Contributing

See doc/development.rst for getting started.

python-can's People

Contributors

altendky avatar antoniocohimbra avatar bessman avatar bhass1 avatar boris-wenzlaff avatar christiansandberg avatar cowo78 avatar ebroecker avatar es-m-se avatar felixdivo avatar hardbyte avatar j-c-cook avatar jsee23 avatar jxltom avatar karlding avatar karlvw avatar lauszus avatar lumagi avatar marcel-kanter avatar mergify[bot] avatar pierreluctg avatar pkess avatar radiocane avatar sam-bristow avatar simontegelid avatar tamenol avatar tbruno25 avatar umlaeute avatar xelarellum avatar zariiii9003 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-can's Issues

Message interface

Originally reported by: Brian Thorne (Bitbucket: hardbyte, GitHub: hardbyte)


Similar to how the Bus is specialized for each inteface, the Message class can be as well.

Need to think about the prefered approach and at least document what that should be.

The old method was:

from can.interfaces import kvaser as interface
msg = interface.Message(...)

But for the Bus we are now using:

import can
bus = can.interface.Bus(...)

Alternatively, each interface could take generic Message objects and if necessary convert them - but I think there might be performance impacts for embedded devices with that option. Take a look at the kvaser interface which doesn't accept generic can.Message objects because it requires the flags attribute to be set.

Interested to hear thoughts...


No way to import python-can without a configuration file

Originally reported by: Nick Johnson (Bitbucket: nickjohnson, GitHub: nickjohnson)


It'd be really nice to be able to import the library and configure it in code, rather than it expecting configuration files; this isn't terribly useful behaviour for a library.

Further, the example here (https://bitbucket.org/hardbyte/python-can/src/4baa9ebb48c1fa6702613c617972ea46b5d4206f/examples/cyclic.py?at=default) no longer works; 'import can' throws "ImportError: CAN interface not found" on line 15.


Installing, configuring and initial test of library

Originally reported by: Travis Travelstead (Bitbucket: travis_travelstead, GitHub: Unknown)


Hello,

I am am very excited to use this library for communication on a CAN bus system I am developing. Right now the portion that is microcontroller based is working as expected but now I need to implement a GUI and data collection ideally using python and this library.

My issues is after installing the library, using "setup.py" as explained on the website, running the kernel "modprobe" command and creating a configuration file, I was unable to get "Bus()" object constructed. I keep getting an issue were it says there is not module called "interfaces" in "can".

I apologize is this is something simple that I am missing, but it would be helpful for myself and I guess others if there was a little bit more of a walkthrough on the initial setup.

I appreciate any time that is offered in helping me.


PEP: Stratagy for Broadcast Connection Management

Originally reported by: Brian Thorne (Bitbucket: hardbyte, GitHub: hardbyte)


BCM Sockets

A type of managed can socket can be created on Linux to send and monitor cyclic messages. There isn't much kernel documentation of the bcm feature, although the header is be located at linux/can/bcm.h and the original documentation is found on brownhat

Putting this functionality into python-can would be ideal, especially in a backend independent way. For sending cyclic messages a function interface (as follows) might be enough, it could return a reference that can change the data, remove the cyclic transmission/subscription.

#!python

class CyclicSendTask:
    __init__(channel, message, period)
    stop()
    modify_data(updated_message)


def send_periodic(channel, message, period):
    return CyclicSendTask(channel, message, period)

The ability to create bcm sockets natively (on linux) is introduced in Python 3.4, ctypes can be used to bring the functionality back to Python 2.7. To keep a consistent API a user level implementation could be made for kvaser etc.

A C example using cyclic transmission and rx content filter subscription can be found here


Add support for ISO TP

Originally reported by: toonst (Bitbucket: toonst, GitHub: toonst)


Support for ISO TP is not yet built in SocketCAN by default, but there exists an implementation:
https://github.com/hartkopp/can-isotp

It would be great to be able to use this from python-can.

Since I really could use this functionality, I might take stab at implementing it. Could someone list the changes that are needed to make it work? I'm not familiar with the python-can code, so I don't know if this is feasible.


Doesn't load config file when launched from a startup script

Originally reported by: Travis Travelstead (Bitbucket: travis_travelstead, GitHub: Unknown)


I am working on getting a python GUI to load during startup and python-can fails to load with this error.

raise ImportError("CAN interface not found")

After it fails and I am in userspace (as root) I run the same script and it runs without issue. My only guess is that it cannot load the required "can.config" file because it is not running as the root user yet.

Is is possible to fix this in the script or avoid the "can.config" file and just hardcode the interface information?


examples/send_one.py does not work

Originally reported by: Bruno Pennati (Bitbucket: radiocane, GitHub: radiocane)


Hi,
I cannot run examples/send_one.py (I've created .pth files in ~/.local/lib/python/ to make "import can" just work).
I've just forked and cloned the repo, without building it with python setup.py build, so maybe this is a non-issue.

#!bash
bruno@jeeg:~/src/python-can$ python examples/send_one.py 
Traceback (most recent call last):
  File "send_one.py", line 15, in <module>
    main()
  File "send_one.py", line 7, in main
    bus = can.interface.Bus()
TypeError: __new__() takes at least 3 arguments (2 given)

Similarly with python3

#!bash
bruno@jeeg:~/src/python-can$ python3 examples/send_one.py 
Traceback (most recent call last):
  File "send_one.py", line 15, in <module>
    main()
  File "send_one.py", line 7, in main
    bus = can.interface.Bus()
TypeError: __new__() missing 1 required positional argument: 'channel'

I've managed to manually create a bus with

#!bash
bruno@jeeg:~/src/python-can$ python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import can
>>> bus = can.interface.Bus(channel='can0', bustype='socketcan')
>>>

Maybe this is similar to Issue #13


"select() takes no keyword arguments" in socketcan_ctypes on Python 2.7

Originally reported by: Nick Johnson (Bitbucket: nickjohnson, GitHub: nickjohnson)


Line 45 of socketcan_ctypes.py reads:

if timeout is None or len( select.select([self.socket], [], [], timeout=timeout)[0]) > 0:

Which causes the following exception:

TypeError: select() takes no keyword arguments

This can be fixed by removing 'timeout=' and passing the timeout as a positional argument.


sending error frames

Originally reported by: raashid ansari (Bitbucket: raashid_ansari, GitHub: Unknown)


Hi,

I am trying to send error frames on virtual can driver by setting "is_error_frame=True".

However, I am getting an error message that says, "Trying to send error frames - this won't work". Could you please help me in understanding this error? Does this mean that I won't be able to send error frames on a virtual bus as well as a real bus?


can.send_periodic fails

Originally reported by: Michal Gloc (Bitbucket: michalgloc, GitHub: Unknown)


Send_periodic fails. Interfaces seem to be missing CyclicSendTask.

Example:

task = can.send_periodic(channel='socketcan_ctypes', message=msg, period=0.1)

result:

task = can.send_periodic(channel=channel, message=msg, period=0.1)
File "/usr/local/lib/python2.7/dist-packages/python_can-1.4.1-py2.7.egg/can/broadcastmanager.py", line 75, in send_periodic
return can.interfaces.interface.CyclicSendTask(channel, message, period)
AttributeError: 'module' object has no attribute 'CyclicSendTask'

Same on python3 with socketcan_native.


Timeouts not working when using socketcan_native

Originally reported by: Amr Bekhit (Bitbucket: amrbekhit, GitHub: amrbekhit)


Hello,

First off, thanks for a great library! I'm using Python 3.4 on an embedded ARM system running Kernel 3.15.1, and as recommended in the docs, the library is configured to use socketcan_native in the /etc/can.conf file. Unfortunately, none of the timeouts seem to be working. For example, if I create a bus object called "bus" and call bus.recv(1), the function just hangs indefinitely. Switching the library over to use socketcan_ctypes works OK. Any thoughts?


socketcan_native will not raise import error on 2.7

Originally reported by: Daniele Paganelli (Bitbucket: mythsmith, GitHub: mythsmith)


Just try:

#!python

python2.7 -c "from can.interfaces.socketcan_native import *; print 1"

As module interface.py expects an ImportError to be raised, but no error is raised, the Bus initializator fails with:

WARNING:root:Kvaser canlib is unavailable.
WARNING:root:Function was not found in library
[... repeated many times...]
WARNING:root:Kvaser canlib is unavailable.
ERROR:can.socketcan.native:Note Python 3.3 or later is required to use native socketcan
Traceback (most recent call last):
  File "pycan.py", line 39, in <module>
    main()
  File "pycan.py", line 31, in main
    bus = can.interface.Bus(can_interface,bustype='socketcan_ctypes')
  File "/usr/local/lib/python2.7/dist-packages/can/interfaces/interface.py", line 50, in __new__
    cls = SocketscanCtypes_Bus
NameError: global name 'SocketscanCtypes_Bus' is not defined

For the moment I resolved by monkey-patching the interface.py module at import time:

#!python

from can.interfaces import socketcan_ctypes
from can.interfaces import interface
interface.SocketscanCtypes_Bus=socketcan_ctypes.SocketscanCtypes_Bus
from can.interfaces.interface import Bus

bus.send() fail, 'message' not defined

Originally reported by: Anonymous


I am trying to adapt virtual_can_demo.py to send messages to a real CAN device using the socketcan_ctypes interface and Python 2.7.

#!python

import can
can.rc['interface'] = 'socketcan_ctypes'
from can.interfaces.interface import Bus
can_interface = 'can0'

bus = Bus(can_interface)
msg = can.Message(arbitration_id=0x0cf02200, data=[1,2,3,4,5,6,7,8])
bus.send(msg)

bus.send(msg) raises the following error:

Traceback (most recent call last):
File "", line 1, in
File "can/interfaces/socketcan_ctypes.py", line 78, in send
sendPacket(self.socket, message)
NameError: global name 'message' is not defined


PCAN hardware is sometimes not released (on Windows)

Originally reported by: SadE (Bitbucket: SadE, GitHub: SadE)


After successive connections, debugging a liitle test app , it seems the pcan dongle is not always released correctly.
My python app is closed , and when I'm trying to connect using PCAN Explorer I get this error :
Error in Connection Connection1: Hardware is already in use (Code 0400h)
Even by unplugging anf plugging it again, I get the same message.


kvaser interface not working on tip

Originally reported by: Brian Thorne (Bitbucket: hardbyte, GitHub: hardbyte)


As reported by @deva_deka

File "/usr/local/bin/can_logger.py", line 10, in <module>
    execfile(__file__)
  File "/home/.../python-can/bin/can_logger.py", line 71, in <module>
    bus = can.interface.Bus(results.channel, bustype=results.interface, can_filters=can_filters)
  File "/home/.../python-can/can/interfaces/interface.py", line 57, in __new__
    return cls(channel, **kwargs)
  File "/home/.../python-can/can/interfaces/kvaser/canlib.py", line 343, in __init__
    self._read_handle = canOpenChannel(channel, canOPEN_ACCEPT_VIRTUAL)
ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: wrong type

Can anyone with a kvaser help diagnose or confirm this?


filter usage

Originally reported by: Olivier Bertrand (Bitbucket: lamoule74, GitHub: Unknown)


Hello,

I'm trying to use filters on my CAN network, simply by listening and receiving a frame...

It seems I don't understood how it works because I'm still receiving the frames with IDs not supposed to match with my filter...

I'm using the can_logger.py script for listening the network :
can_logger.py -i socketcan -c can0 --filter FFFFFFFF:1FFEFFFF

it is supposed to keep the frames equipped with this ID : 1FFEFFFF

see attached picture,

any Ideas ?
Thank you in advance...


With bustype='socketcan' interface.py tries to use socketcan_native under python 2

Originally reported by: Bruno Pennati (Bitbucket: radiocane, GitHub: radiocane)


With the generic bustype='socketcan' the Bus.new() method tries to use socketcan_native when "import fcntl" does not raise an ImportError.
That is test is not good enough because it does not make sure that:

  • we're running linux >= 2.6.25
  • we're running python >= 3.3

If Linux is < 2.6.25 there is no SocketCAN, and if python < 3.3 socketcan_ctypes must be used.


socketcan_native timeout ignored

Originally reported by: John Gehrig (Bitbucket: gehrigj, GitHub: Unknown)


Hello,

I just downloaded your library for a project, and it has been working wonderfully!

One minor issue I noticed, was that the timeout parameter for the recv() method of the socketcan_native interface is ignored. Am I using this correctly?

Here is the code which hangs (but shouldn't?)

#!python
import can
bus.recv(timeout=1)
bus = can.interface.Bus('can0', bustype='socketcan_native', can_filters=[])
bus.recv(timeout=1)

I made a quick hack to your source code on my system, as I needed this functionality for my application. But I am curious if this is an unimplemented feature, or if I am using the library incorrectly. If it is the prior, I have attached my quick and dirty fix for the feature.

I hope this is helpful, and thanks for the awesome library!

-John


Kernel level filtering with ctypes

Originally reported by: Travis Travelstead (Bitbucket: travis_travelstead, GitHub: Unknown)


I understand that with native support you are able to do kernel level ID filtering.

My question, is it possible to use userspace commands, like the ones used to setup the CAN socket. I see it is possible with the "candump" tool. This way with some userspace commands can supplement the missing feature.

example:
candump can0 -m 0x7FC -v 0x66 -t d

Below is the command I use to setup the CAN interface from my startup script and it would be great to do something similar to implement a lower level filter.
subprocess.call(['ip', 'link', 'set', 'can0', 'type', 'can', 'bitrate', '500000' , 'restart-ms' , '10000'])

I apologize because this crosses over into socketcan questions, but I think it would be a nice thing to add the work around to the documentation for kernel level message filtering.

Thanks for your time


git cloning broken ?

Originally reported by: Steve Rice (Bitbucket: wulfman, GitHub: wulfman)


when i hit the clone button i get this
hg clone https://bitbucket.org/hardbyte/python-can
i have no idea what hg is supposed to do so i remove it and add git
git clone https://bitbucket.org/hardbyte/python-can
then i get a nice error
Cloning into 'python-can'...
fatal: https://bitbucket.org/hardbyte/python-can/info/refs not found: did you run git update-server-info on the server?
looking at the repo i do not see a python-can/info directory
am i going about this wrong ?
i have no issues using git on github


cyclic example fails on import

Originally reported by: nicktime (Bitbucket: nicktime, GitHub: nicktime)


Hi,

$ python3 -m examples.cyclic
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/work/python-can/examples/cyclic.py", line 18, in <module>
    from can.interfaces.interface import Message, MultiRateCyclicSendTask
ImportError: cannot import name 'Message'
$ hg id
8f3908c6293c tip

PS I've setup vcan0.


Receive messages which are sent

Originally reported by: Kyle Altendorf (Bitbucket: altendky, GitHub: altendky)


Is it possible to configure a bus to add sent messages to the receive queue? I am writing an integrated script that both controls a device and logs all bus traffic. I would like the sent messages stored with accurate timestamps and logged as well. I am specifically working on Windows with PCANBasic but would be interested generally.

If not presently available, is anyone already familiar with whether or not the underlying libraries generally support this?

Thanks for your help.

Cheers,
-kyle


Configuration file doesn't register in Windows

Originally reported by: Colin Heinzmann (Bitbucket: DepthDeluxe, GitHub: DepthDeluxe)


I am trying to use the PCAN interface on Windows 7 with python-can and have followed the configuration instructions (i.e. https://bitbucket.org/hardbyte/python-can). When I try to "import can", I get the following error message even when I have explicitly stated to use the pcan interface in the configuration file.

WARNING:root:Kvaser canlib is unavailable.
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Function was not found in library
WARNING:root:Kvaser canlib is unavailable.
ERROR:can.serial:You won't be able to use the serial can backend without the serial module installed!

My can.ini/can.conf file contains:

[default]
interface = pcan
channel = 1

The Kvaser canlib missing error is also strange because while I was trying to fix the issue, I installed the Kvaser canlib SDK.

My Python version is 2.7.10 (32-bit) and I'm running Windows 7.


Use library without installing

Originally reported by: Travis Travelstead (Bitbucket: travis_travelstead, GitHub: Unknown)


Hello,

I planned on testing this but since it might be a quick answer that others might be interested in as well I decided to ask.

I want to know if instead of installing using "setup.py" if I can just copy the source folder for "can" with my source to allow for simpler deployment which I do need to require the install to the device? Is there any dependancies that need to be installed/configured that the "setup.py" is required for.

Thanks


Multiple nodes on single virtual bus

Originally reported by: raashid ansari (Bitbucket: raashid_ansari, GitHub: Unknown)


Apologies if this is the wrong portal for this issue. Although, I would like if someone can give me an idea.

I was wondering if python-can supports multiple can nodes on a virtual bus (vcan0).
I want to send multiple messages with different arbitration IDs simultaneously on vcan0. Just like it happens on a real network so that I can observe the bus arbitration to favor the ID that is lower in order.


Python_USB_CAN_ reading

Originally reported by: Mahaveer Hanuman Share (Bitbucket: sharemahaveer, GitHub: sharemahaveer)


Hi ,
I am new to this python programming.

Recently, I have started working with python programming to communicate with PCAN-usb(Channel1) interfaced with ECU.
I was able to Initialize PCAN-USB, write message but i am unable to receive the data from it.


but while using the PCAN view Explorer-5 I am able to write and read the data but not with python programming.


can you please help out to fix this issue.

Thankingyou


"""
added main by icarreno
"""
if name == 'main':

msg = TPCANMsg()
tmstamp = TPCANTimestamp()
data = 0x22,0xF1,0x50
msg._fields_ = [ ("ID",0x602),("MSGTYPE", PCAN_MESSAGE_STATUS  ),("LEN",    3),("DATA", data) ]

______________________________________________________________________________________________

----------------Initializ---------------------------

_______________________________________________________________________________________________

can = PCANBasic()
result = can.Initialize(PCAN_USBBUS1, PCAN_BAUD_500K)
if result == PCAN_ERROR_OK:
    print "Getstatus:-",can.GetStatus(PCAN_USBBUS1)
    print "hardwar:-", can.GetValue(PCAN_USBBUS1,PCAN_DEVICE_NUMBER)

______________________________________________________________________________________________

--------------Writing/Sending _data------------------

______________________________________________________________________________________________

    wrtstat= can.Write(PCAN_USBBUS1,msg)
    if (wrtstat == PCAN_ERROR_OK):
        print "Message was sent"
    else:
        print "Error Occured during writing"

__________________________________________________________________________________________________

-------------Reading----------------------------------

_________________________________________________________________________________________________

    can.Read(PCAN_USBBUS1)
    status = PCAN_ERROR_QRCVEMPTY     
    print "beforeloop:-",status        
    while((status & PCAN_ERROR_QRCVEMPTY) == PCAN_ERROR_QRCVEMPTY):
       status,msg,Time = can.Read(PCAN_USBBUS1)
       print status
       if (status == PCAN_ERROR_OK):
           print "Message sucessfully received "
       else:
           error = can.GetErrorText(PCAN_ERROR_QRCVEMPTY , 0)
       print "inside loop:-", status
       time.sleep(1)

__________________________________________________________________________________________________

else:
    print "Init error!"

print "End"
can.Uninitialize(PCAN_USBBUS1)

output:-
Getstatus:- 8
hardwar:- (0, 255)
Message was sent
beforeloop:- 32
32
inside loop:- 32
4
inside loop:- 4
End


J1939 Bus implementation losing J1939 messages

Originally reported by: Jeff Jasper (Bitbucket: jajasp1, GitHub: Unknown)


I noticed I was losing J1939 messages and noticed that there are two threads that remove messages from the queue containing received CAN messages. The first thread is the one from which the bus is iterated over (the client code) and the second being the thread that is created during the instantiation of the Notifier assigned to j1939_notifier.

The messages removed when iterating over the bus are expected. However, the messages removed from the Notifier assigned to j1939_notifier do not get passed on to anything and are lost.

I'll preface the following with the fact that it's not entirely clear what j1939_notifier is for (it appears that it might be a mechanism to send J1939 messages and notify the sender of the response?). A possible client (one that is not interested in sending any messages) code workaround might be to create a istener in the client code and override the listener assigned to j1939_notifier (not sure if this is even possible yet). Doing so would mean all messages would have to be received through the listener and not by iterating over the Bus.


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.