mexHID and IOKit device matching is not always good enough. In particular, for
the 1208FS device from measurement computing.
mexHID and IOKit can match the product and vendor IDs, but can't distinguish
the sub-devices (interfaces?) within the physical device. However, it's
trivial to distinguish these in m-code by checking things like number of
elements or element report IDs.
So mexHID should be able to open and return all the matching devices and let
the Matlab user decide how to use them. On the other hand, for opening
something like a mouse, this behavior is not really desirable.
So mexHID('openMatchingDevice', ...) should take an option, whether to return
all matches or just the first one. Better yet,
mexHID('openAllMatchingDevices', ...) should return the array of matching
deviceIDs.
Internally, mexHID should call the same API. This means that
mexHIDOpenDeviceMatchingProperties should be modified to return a mxArray of
matching deviceIDs, which might be scalar, depending on an argument.
Original issue reported on code.google.com by Benjamin.Heasly on 26 Aug 2010 at 10:37
Original issue reported on code.google.com by
Benjamin.Heasly
on 26 Aug 2010 at 10:37