python-can icon indicating copy to clipboard operation
python-can copied to clipboard

Add can bridge

Open pkess opened this issue 10 months ago • 3 comments

Hello,

it might be useful to have the possibility to use the RedirectReader in a script so that one can connect two can busses with a single cli program. This is extremly helpful if one would like to connect e.g. socketcand with a proprietary hardware interface.

Comments are appreciated

pkess avatar Feb 22 '25 21:02 pkess

I think this is may be very useful 👍

Not a review yet, but a few notes:

  • New code should have type annotations, at least for the function signatures.
  • The other CLI tools have tests in test_scripts.py and e.g. test_player.py, test_logger.py etc., i think this bridge could also be tested with two virtual buses.
  • Minor: I think the plural of bus is usually buses, not busses 🤷‍♂️

zariiii9003 avatar Feb 23 '25 14:02 zariiii9003

Ok. I will work on all those three

pkess avatar Feb 23 '25 15:02 pkess

I addes some very basic tests now. I do not know at the moment how to test that a message that was received on one bus is forwarded to the other bus. Maybe i can try this again in the next days

pkess avatar Feb 23 '25 19:02 pkess

Closing in favor of #1961

zariiii9003 avatar Jul 25 '25 17:07 zariiii9003