Multi-CAN interface
Posted: Mon 26. Oct 2020, 16:15
Hi.
I'm wondering if you have any good advice to me.
I'm writing a program for a Linux-computer which should read data from 12 USB-CAN channels (2x PCAN-USB FDx6).
I'm ready with my code and it works perfect.
BUT,, I have coded using threads in C .
That has resulted in 100% loaded CPU-cores (all six of them.)
Is there a better way to catch data from several can-busses?
Next for me is to test with separate processes. Not sure if it helps.
But I guess somebody out there has got it working.
The Select command sit there and waits for data.Is there a memory queue in the drivers?
Or is it possible to check several channels within on select command? Probably not since it require a handle.
/Terje.
I'm wondering if you have any good advice to me.
I'm writing a program for a Linux-computer which should read data from 12 USB-CAN channels (2x PCAN-USB FDx6).
I'm ready with my code and it works perfect.
BUT,, I have coded using threads in C .
That has resulted in 100% loaded CPU-cores (all six of them.)
Is there a better way to catch data from several can-busses?
Next for me is to test with separate processes. Not sure if it helps.
But I guess somebody out there has got it working.
The Select command sit there and waits for data.Is there a memory queue in the drivers?
Or is it possible to check several channels within on select command? Probably not since it require a handle.
/Terje.