Table Of Contents

Previous topic

terapy.filters package

Next topic

terapy.hardware.axes package

This Page

terapy.hardware package

Submodules

terapy.hardware.device module

Generic device driver class.

class terapy.hardware.device.Device

Generic device driver class.

ask(cmd)

Send given command to instrument and return result.

Parameters:
cmd - command (str)
Output:
instrument reply (float)
assign(*args, **kwargs)

Configure device driver prior to initialization.

Parameters:
**kwargs - keyworded values corresponding to relevant configuration entries.
configure()

Run configuration routine for device.

detect()

Detect available devices handled by device driver.

Output:
list of available devices, each entry as (address, short name, long name, axis id)
initialize()

Initialize device.

reset()

Reset device.

widget(parent=None)

Return widget for graphical device control.

Parameters:
parent - parent window (wx.Window)
Output:
widget (wx.Frame)
write(cmd)

Send given command to instrument.

Parameters:
cmd - command (str)
xml2config(xmldom)

Read configuration from XML data.

Parameters:
xmldom - minidom XML document

Module contents

Functions and classes to handle hardware devices.

Global variables:
devices - list of loaded devices
terapy.hardware.create_default_devices()

Create default devices.

terapy.hardware.get_hardware_info(doc, root, with_val=False)

Store informations on loaded devices in given XML document.

Parameters:
doc - minidom XML document root - root XML element under which to store with_val - if True, store snapshot of hardware state
terapy.hardware.get_system_state()

Create XML tree containing state of loaded instruments.

Output:
minidom XML document
terapy.hardware.get_widgets(parent=None)

Return list of widgets for loaded devices.

Output:
list of wx.Frame widgets
terapy.hardware.initiate_hardware()

Initialize loaded hardware devices.

terapy.hardware.restore_hardware_info()

Load configuration of loaded hardware devices from hardware configuration file.

terapy.hardware.scan_hardware()

Search for devices that can be handled by available modules.

terapy.hardware.store_hardware_info()

Store configuration of loaded hardware devices in hardware configuration file.