Closed hardbyte closed 8 years ago
Original comment by Brian Thorne (Bitbucket: hardbyte, GitHub: hardbyte):
Yeah that lines up with my experience as well Kyle. There shouldn't be any problem having another open bus handle to do your logging which will include the bus timestamps. When you run can_logger or candump that is essentially what is happening.
Original comment by Kyle Altendorf (Bitbucket: altendky, GitHub: altendky):
Candump is a separate connection to the underlying bus and so what you are sending is not actually being sent by the particular connection candump has, but rather by the connection that cansend (or your Python application) has open. If you were to open two separate python-can buses I bet they would each receive the other's sent messages, but not their own. Anyways, my particular interest is not just to have the messages present but with bus-accurate timestamps. I don't know what if any hardware even supports this.
Original comment by Mike Molt (Bitbucket: M_Molt, GitHub: Unknown):
I'll be interested to see what Brian thinks, but for now I've just decided to write all messages I send directly to the buffered reader queue so they show up. Now it works.
Original comment by Mike Molt (Bitbucket: M_Molt, GitHub: Unknown):
I've noticed the same thing...messages sent do not seem to end up in the queue. I'd like to see all messages on the bus, not just the ones received by other hardware.
I'm confused though as candump shows all messages.
Two issues with the option of just opening another connection.
This is relevant to me as I am adding logging functionality to my application (different than the script I was writing when this issue was originally opened). Presently I just catch messages that I am sending to python-can and also feed them back to my logging code and accept that there won't be timestamps (well, I could create one that would likely be good enough but no timestamp from PCAN/python-can).
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