exopy.instruments.starters.base_starter module

Tool handling initializind/finalizing a driver.

class exopy.instruments.starters.base_starter.BaseStarter[source]

Bases: atom.atom.Atom

Base class for instrument starter.

id

Id of the starter set by the declaration.

start(driver_cls, connection, settings)[source]

Fully initialize a driver and open the communication channel.

Parameters
  • driver_cls (type) – Class of the driver to initialize.

  • connection (dict) – Connection information provided by the user.

  • settings (dict) – Driver specififc settings provided by the user.

Returns

driver – Driver instance fully initilized and ready for communication.

Return type

object

Raises

InstrIOError : – If the connection to the instrument could not be opened.

check_infos(driver_cls, connection, settings)[source]

Check that the provided information and settings allow to open the communication.

Parameters
  • driver_cls (type) – Class of the driver to initialize.

  • connection (dict) – Connection information provided by the user.

  • settings (dict) – Driver specififc settings provided by the user.

Returns

  • result (bool) – Whether the system managed to open the communication.

  • msg (unicode) – Message giving details about any issue which may have occured during the test.

reset(driver)[source]

Reset the instrument state after a possible alteration by the user.

Typically this shold clear the cache of the driver and reset any notion of ownership.

stop(driver)[source]

Close the communication with the instrument.

Parameters

driver – Driver instance created previously by the starter.

class exopy.instruments.starters.base_starter.Starter(parent=None, **kwargs)[source]

Bases: enaml.core.declarative.Declarative

Object responsible initializind/finalizing a driver of a certain type.

id

Unique id identifying this starter. The usual format is top_level_package_name.starter_name

description

Description of the starter action.

starter

Starter instance to use for managing associate instruments. Note that the class must be defined in a python file not enaml file to be pickeable.