But I've discovered that these ID numbers definitely aren't unique. If you unplug a device and plug it in again, it can end up getting assigned a device ID that is the same as another device. In looking at the source code, device IDs are created by checking the size of the mGizmos map, and gizmos are deleted from this map when they're unplugged.
I use the unique ID to test whether my module should react to input events because my remote control is registered by my tuner card as a keyboard. I could test vendor and product IDs for each event, but this could get computationally expensive.
Is there any reason why GizmoDaemon.cpp can't be modified to assign completely unique device IDs?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to the API, Gizmo.getDeviceID() returns a unique ID for the device: http://gizmod.sourceforge.net/documentation/apidocs/a00027.html#30db773f6d2b2e1c0e2c068e53876d63
But I've discovered that these ID numbers definitely aren't unique. If you unplug a device and plug it in again, it can end up getting assigned a device ID that is the same as another device. In looking at the source code, device IDs are created by checking the size of the mGizmos map, and gizmos are deleted from this map when they're unplugged.
I use the unique ID to test whether my module should react to input events because my remote control is registered by my tuner card as a keyboard. I could test vendor and product IDs for each event, but this could get computationally expensive.
Is there any reason why GizmoDaemon.cpp can't be modified to assign completely unique device IDs?