Package hid :: Class HIDDevice
[frames] | no frames]

Class HIDDevice

source code

Known Subclasses:
osx.OSXHIDDevice

absract class representing a HID device on the host computer

Instance Methods
 
__del__(self)
closes the device
source code
 
__init__(self, vendor, product) source code
 
__str__(self) source code
 
close(self)
close the device and stop the callback thread
source code
 
is_open(self) source code
 
open(self)
open this HID device for use (must be called before setting callbacks or setting reports)
source code
 
set_interrupt_report_callback(self, callback, report_buffer_size=8)
register a callback for events from the device...
source code
 
set_report(self, report_data, report_id=0)
"set" a report - send the data to the device (which must have been opened previously)
source code
Method Details

set_interrupt_report_callback(self, callback, report_buffer_size=8)

source code 

register a callback for events from the device
callback should be of form:

def mycallback(device,report_data):
    pass