[PD-dev] making a libusb object (expanding on [hid] toolkit)

Christian Klippel ck at mamalala.de
Sat Jan 21 08:25:47 CET 2006


hi,

Am Samstag 21 Januar 2006 06:28 schrieb Mathieu Bouchard:
> On Fri, 20 Jan 2006, Christian Klippel wrote:
> > yea, good idea, but impossible to do. you can be sure that whatever
> > interface you take, it will send its data in a different way.
>
> I'm sure that Ben is talking about having a common interface for things
> that objects have in common, and not for the things that they don't have
> in common. Just because the commonality can't be total doesn't mean it
> can't exist at all.
>
> > each unit has different resolutions, different amounts of i/o, and for
> > that reason, a different protocol.
>
> The commonality between objects may be increased by specifying that
> classes in particular should have a query interface in order to
> figure out how many sensors there are, how they are labeled if they
> are labeled, and what is the type and possible values of each sensor.
>

well, that is what the hid driver (in the os) does already by inspecting the 
report descriptors that the device sent during enumeration.....
the question is just: is it planned to have, at some time, the [hid] object 
replaced by some more generic objects that use libusb instead and will decode 
this stuff on their own, or will the libusb stuff just an extension to it?

> > this is neccesarry because of the differencies in the devices. it is
> > even possible that you take two different joysticks, and both pack their
> > messages in completely different ways: one could put all info in just
> > one report-descriptor, the other may use serveral of them, or even one
> > for each axis/button.
>
> Does this happen in practice? Do you have an actual situation where three
> joystick models do exactly that?
>

dont have any joysticks at all. but i have already seen two usb mice that use 
different "data layouts" to send the same information, so there is a 
chance ... altough im sure myself that most devices stick to some kind of 
"common sense" .... well, at least i hope that ....

greets,

chris





More information about the Pd-dev mailing list