/** Common HID script debugging function. Just to get logging with 'HID' prefix. */
HIDDebug = function(message) {
print("HID " + message)
}
/** HID Bit Vector Class
*
* Collection of bits in one parsed packet field. These objects are
* created by HIDPacket addControl and addOutput and should not be
* created manually. */
HIDBitVector = function() {
this.size = 0
this.bits = {}
}
/** Return bit offset based on bitmask */
HIDBitVector.prototype.getOffset = function(bitmask) {
for (var i = 0; i