Package hid :: Module osx :: Class OSXHIDDevice
[frames] | no frames]

Class OSXHIDDevice

source code

HIDDevice --+
            |
           OSXHIDDevice

class representing a HID device on the host (OS X) computer

Instance Methods
 
__init__(self, hidDevice, vendor, product)
create the hid device wrapper hidDevice is a handle from the OS
source code
 
__del__(self)
closes the device
source code
 
close(self)
close the device and stop the callback thread
source code
 
is_open(self)
see if the device is open
source code
 
open(self)
open the HID device - must be called prior to registering callbacks or setting reports
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

Inherited from HIDDevice: __str__, set_interrupt_report_callback

Method Details

__init__(self, hidDevice, vendor, product)
(Constructor)

source code 
create the hid device wrapper hidDevice is a handle from the OS
Overrides: HIDDevice.__init__

__del__(self)
(Destructor)

source code 
closes the device
Overrides: HIDDevice.__del__
(inherited documentation)

close(self)

source code 
close the device and stop the callback thread
Overrides: HIDDevice.close
(inherited documentation)

is_open(self)

source code 
see if the device is open
Overrides: HIDDevice.is_open

open(self)

source code 
open the HID device - must be called prior to registering callbacks or setting reports
Overrides: HIDDevice.open

set_report(self, report_data, report_id=0)

source code 
"set" a report - send the data to the device (which must have been opened previously)
Overrides: HIDDevice.set_report