From: Xiaofan C. <xia...@gm...> - 2010-10-09 11:45:09
|
On Sat, Oct 9, 2010 at 7:32 PM, Ludovic Rousseau <lud...@gm...> wrote: > 2010/10/9 Xiaofan Chen <xia...@gm...>: >> For example, right now libusb-1.0's HID API does not >> deal with HID Collections. HIDAPI does not seem to support >> that either. Under Windows HID API, you may have to deal with >> HID Collections. >> http://msdn.microsoft.com/en-us/library/ff539861%28v=VS.85%29.aspx > > I am working with a device having 2 top collections [1] on 1 HID > interface. On Windows you can get a handle for each collections and > than have two different applications talking to the collections at the > same time. Application A is using collection 1 and application B is > using collection 2. > > You can't do this with hidapi (or libusb). So I plan to provide a kind > of resource manager to multiplex the requests from applications A and > B. I don't see how to do that in a "simple" library since the USB > device can only be used by one process. > In my case, applications A and B would talk to the resource manager > using IPC and only the resource manager has to claim the device. > > Maybe someone has a better idea? > It seems to me that the HID Collection is like USB composite device, supposedly you can treat them as two independent device. That seems to be at least how Windows HID API works. I am not so sure about Mac OS X and Linux. -- Xiaofan |