Module ioLabs :: Class USBBox
[frames] | no frames]

Class USBBox

source code

object --+
         |
        USBBox

the USBBox itself

Instance Methods
 
__init__(self, do_reset=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__del__(self) source code
 
send_command(self, command_id, bytes='')
send a command to the box (one command_id byte and 7 data bytes)
source code
 
process_received_reports(self)
process any received reports and call registered callbacks
source code
 
clear_received_reports(self) source code
 
start_recording(self, report_ids, out_file)
whenever we read a report write it to the given file (if the id is in report_ids)
source code
 
stop_recording(self)
removes the callbacks we had in place for recording
source code
 
purge_queue(self)
purge the event queue on the box
source code
 
reset_clock(self)
reset the clock on the box (returns a key report)
source code
 
enable_loopback(self)
enable loopback (LEDs on/off with button presses)
source code
 
disable_loopback(self) source code
 
wait_for_keydown(self)
wait for a key to be pressed and returns the report
source code
 
wait_for_keyup(self)
wait for a key to be released and returns the report
source code
 
reset_box(self)
set box to some known values
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties
  device
the HIDDevice (the physical box itself)
  commands
Commands object for low-level API
  port0
Port0_2 object for "port 0" on the box
  port1
Buttons object for "port 1" on the box
  port2
Port0_2 object for "port 2" on the box
  int0
VoiceKey object for "interrupt 0" on the box
  int1
Interrupt object for "interrupt 1" on the box
  serial
Serial object for the serial port on the box
  leds
synonym for port2
  buttons
synonym for port1
  voice_key
synonym for int0
  optic_key
synonym for int1
  serial_num
read the serial number of the box
  PAC
set the PAC code (write only)
  version
get the main board version number
  voice_version
get the version number of the voice board
  clock
get the current clock value
  heartbeat
set the heartbeat rate (write only)

Inherited from object: __class__

Method Details

__init__(self, do_reset=True)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

Property Details

device

the HIDDevice (the physical box itself)
Get Method:
unreachable(self)

commands

Commands object for low-level API
Get Method:
unreachable(self)

port0

Port0_2 object for "port 0" on the box
Get Method:
unreachable(self)

port1

Buttons object for "port 1" on the box
Get Method:
unreachable(self)

port2

Port0_2 object for "port 2" on the box
Get Method:
unreachable(self)

int0

VoiceKey object for "interrupt 0" on the box
Get Method:
unreachable(self)

int1

Interrupt object for "interrupt 1" on the box
Get Method:
unreachable(self)

serial

Serial object for the serial port on the box
Get Method:
unreachable(self)

leds

synonym for port2
Get Method:
unreachable(self)

buttons

synonym for port1
Get Method:
unreachable(self)

voice_key

synonym for int0
Get Method:
unreachable(self)

optic_key

synonym for int1
Get Method:
unreachable(self)

serial_num

read the serial number of the box
Get Method:
ioLabs.USBBox._get_serial_num(self)

PAC

set the PAC code (write only)
Set Method:
ioLabs.USBBox._set_PAC(self, value)

version

get the main board version number
Get Method:
ioLabs.USBBox._get_version(self)

voice_version

get the version number of the voice board
Get Method:
ioLabs.USBBox._get_voice_version(self)

clock

get the current clock value
Get Method:
ioLabs.USBBox._get_clock(self)

heartbeat

set the heartbeat rate (write only)
Set Method:
ioLabs.USBBox._set_heartbeat(self, value)