Anonymous
Not applicable
Nov 28, 2014
11:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 28, 2014
11:40 PM
Hi
I would like to do a program that only read data from devices.
I plan to send a vendor command to request data from both devices and both devices will send data to host. Is it open two threading?
Best regards
Chong Han
1 Reply
Anonymous
Not applicable
Dec 01, 2014
04:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 01, 2014
04:13 PM
Yes, you can have a separate thread for each device and do your transfers. This approach will scale to as many devices you want. It will also be easy to add >2 devices and it will prevent any one device from locking up transfers on other devices.
You can alternatively go for a simple run loop by polling all devices. It is very simple to code but can introduce a lot of delays between samples of different devices. And one failed device can hold up every other devices in your loop.