Module ioLabs
[frames] | no frames]

Module ioLabs

source code

the module for interfacing with an ioLan button box. USBBox is the main class that should be used from this module

Classes
  dict_struct
simple class that takes keyword arguments and uses them to create fields on itself
  messages
class to handle message id lookup, and packing message objects into binary
  Commands
class to handle sending reports to device and parsing incoming reports.
  Line
base class for Lines (individual parts of ports)
  Port0_2
class representing ports 0 and 2 (leds)
  Buttons
class that represents the buttons on the USBBox
  Interrupt
either int0 or int1 on the USBBox
  VoiceKey
object representing the voice input on the USBBox
  Serial
serial port on the USBBox
  USBBox
the USBBox itself
Functions
 
is_usb_bbox(device) source code
Variables
  IO_LABS_VENDOR_ID = 6588
  BUTTON_BOX_PRODUCT_ID = 1
  COMMAND_SUMMARY = {33: ('PACSET', 'BBBBBBB', ('data1', 'data2'...
  REPORT_SUMMARY = {68: ('KEYDN', 'xxBI', ('key_code', 'rtc')), ...
  COMMAND = messages(COMMAND_SUMMARY)
  REPORT = messages(REPORT_SUMMARY)
Variables Details

COMMAND_SUMMARY

Value:
{33: ('PACSET',
      'BBBBBBB',
      ('data1', 'data2', 'data3', 'data4', 'data5', 'data6', 'data7'))\
,
 38: ('PXAND', 'xBBxxxx', ('port2_bits', 'port0_bits')),
 43: ('PX_OR', 'xBBxxxx', ('port2_bits', 'port0_bits')),
 48: ('P0SET', 'Bxxxxxx', ('bits')),
 50: ('P2SET', 'Bxxxxxx', ('bits')),
...

REPORT_SUMMARY

Value:
{68: ('KEYDN', 'xxBI', ('key_code', 'rtc')),
 69: ('ERROR',
      'BBBBBBB',
      ('data1', 'data2', 'data3', 'data4', 'data5', 'data6', 'data7'))\
,
 72: ('HBREP', 'BHI', ('queue_len', 'rate', 'rtc')),
 74: ('DEBREP',
      'xBBBBBB',
...