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

Nice to have a "local loopback" bus state

Open John-Titor opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe.

It would be nice to be able to request local loopback mode (for adapters that support it) using a standard API rather than a side-channel based on adapter-specific knowledge.

Local loopback (when supported) is a useful testing tool.

Describe the solution you'd like

Something along the lines of a LOCAL_LOOPBACK entry in the enum.

Ideally interfaces already reject states they don't support, but perhaps this would also require interfaces to learn to be more picky about state requests?

Describe alternatives you've considered

Obviously the alternative is private methods on the interface, which seems to be the standard way of dealing with per-interface weirdness already.

John-Titor avatar Jan 04 '22 03:01 John-Titor

I think for testing the virtual bus can always be used. A loopback with specific hardware will always require adapter specific knowledge.

pkess avatar Jan 16 '22 10:01 pkess