As of r375, mexHID uses integers to represent HID report types (input, output,
feature) and function status/errors.
Report types should be specified as meaningful names, as opposed to arbitrary
integers. Or, there should be a facility to resolve a number by its meaningful
name. This could be part of the mexHID mex function or an addition to the
mexHIDUsage class.
The mexHID mex function should continue to use integers for status and error
returns. But it should also have a facility to lookup a meaningful string
status/error description. This should be a basic part of the interface, in
mexHID.h/.c. It should accept any mxArray as input, including a status/error
scalar or a data array, so that any value returned from mexHID can be verified.
It might have the form
[isSuccessful, description] = mexHID('validate', mx);
Since 'validate' would not know from which sub-function returned mx, it would
be worth checking that there are no ambiguous cases.
Original issue reported on code.google.com by Benjamin.Heasly on 22 Sep 2010 at 6:15
Original issue reported on code.google.com by
Benjamin.Heasly
on 22 Sep 2010 at 6:15