exopy.instruments.drivers.driver_decl module

Declarator for registering drivers.

class exopy.instruments.drivers.driver_decl.Driver(parent=None, **kwargs)[source]

Bases: exopy.utils.declarator.Declarator

Declarator used to register a new driver for an instrument.

driver

Path to the driver object. Path should be dot separated and the class name preceded by ‘:’. TODO complete : ex: exopy_hqc_legacy.instruments. The path of any parent Drivers object will be prepended to it.

architecture

Name identifying the system the driver is built on top of (lantz, hqc, slave, etc …). Allow to handle properly multiple drivers declared in a single extension package for the same instrument.

manufacturer

Name of the instrument manufacturer. Can be inferred from parent Drivers.

serie

Serie this instrument is part of. This is optional as it does not always make sense to be specified but in some cases it can help finding a a driver. Can be inferred from parent Drivers.

model

Model of the instrument this driver has been written for.

kind

Kind of the instrument, to ease instrument look up. If no kind match, leave ‘Other’ as the kind. Can be inferred from parent Drivers.

starter

Starter to use when initializing/finialzing this driver. Can be inferred from parent Drivers.

connections

Supported connections and default values for some parameters. The admissible values for a given kind can be determined by looking at the Connection object whose id match. ex : {‘visa_tcpip’ : {‘port’: 7500, ‘resource_class’: ‘SOCKET’}} Can be inferred from parent Drivers.

settings

Special settings for the driver, not fitting the connections. Multiple identical connection infos with different settings can co-exist in a profile. The admissible values for a given kind can be determined by looking at the Settings object whose id match. ex : {‘lantz’: {‘resource_manager’: @py’}} Can be inferred from parent Drivers.

id

Id of the driver computed from the top-level package and the driver name

register(collector, traceback)[source]

Collect driver and add infos to the DeclaratorCollector contributions member.

unregister(collector)[source]

Remove contributed infos from the collector.

class exopy.instruments.drivers.driver_decl.Drivers(parent=None, **kwargs)[source]

Bases: exopy.utils.declarator.GroupDeclarator

Declarator to group driver declarations.

For the full documentation of the members values please the Driver class.

architecture

Name identifying the system the driver is built on top of for the declared children.

manufacturer

Instrument manufacturer of the declared children.

serie

Serie of the declared children.

kind

Kind of the declared children.

starter

Starter to use for the declared children.

connections

Supported connections of the declared children.

settings

Settings of the declared children.