exopy.instruments.infos module

Container objects used to encapsulate info about drivers, instruments, etc

class exopy.instruments.infos.DriverInfos[source]

Bases: atom.atom.Atom

Object summarizing the information about a driver.

id

Id of the driver built on the class name and the top-level package

cls

Actual class to use as driver.

infos

Infos allowing to identify the instrument this driver is targetting.

starter

Starter id

connections

Connection information.

settings

Settings information.

valid

Flag indicating whether or not the informations stored are valid and safe to use.

validate(plugin)[source]

Validate that starter, connections, settings ids are all known.

Parameters

plugin – Instrument plugin instance holding the starters (connections, settings) definitions.

Returns

  • result (bool) – Boolean indicating if all ids are indeed known.

  • unknown (dict) – Mapping listing by categories (starter, connections, settings) the unkown ids.

class exopy.instruments.infos.InstrumentModelInfos[source]

Bases: atom.atom.Atom

Details about a particular model based on all the available drivers.

manufacturer

Instrument manufacturer (this is the real manufacturer not an alias).

model

Instrument model.

serie

Instrument serie.

kind

Instrument kind.

drivers

List of supported drivers.

connections

Supported connections (all drivers connections infos are merged).

settings

Supported settings (all drivers settings infos are merged).

id

Id of the model.

update(drivers, removed=False)[source]

Update the infos from a list of drivers.

Parameters
  • drivers (list[DriverInfos]) – List of drivers infos to use for updating.

  • remove (bool, optional) – Flag indicating whether the infos should be added or removed.

find_matching_drivers(connection_id, settings_id=None)[source]

Find the drivers supporting the right connection and settings.

Parameters
  • connection_id (unicode) – Connection id for which to for a matching driver.

  • settings_id (unicode, optional) – Settings id for which to find a matching id.

class exopy.instruments.infos.SeriesInfos[source]

Bases: atom.atom.Atom

Container object used to store series infos.

name

Name of the serie.

instruments

List of the instrument models matching the selected kind. This object should not be manipulated by user code.

kind

Expose the known instruments only of the matching kind.

update_models(drivers, removed=False)[source]

Update the known models from a list of drivers.

class exopy.instruments.infos.ManufacturerInfos[source]

Bases: exopy.instruments.infos.SeriesInfos

Container object used to store manufacturer infos.

Notes

Models are stored by series in instruments member if use_series is True

use_series

Expose the known instrument by series.

aliases

Known aliases for the manufacturer.

update_series_and_models(drivers, removed=False)[source]

Update the known series and models from a list of drivers.

kind

A member where the value can be one in a sequence of items.

class exopy.instruments.infos.ManufacturersHolder[source]

Bases: atom.atom.Atom

Container class for manufacturers.

plugin

Refrence to the instrument plugin.

manufacturers

Filtered list of manufacturers.

use_series

Expose the known instrument by series.

kind

Expose the known instruments only of the matching kind.

update_manufacturers(drivers, removed=False)[source]

Update a manufacturer infos and create it if it does not exist yet.

Parameters

drivers (list) – List of drivers.

class exopy.instruments.infos.ProfileInfos[source]

Bases: atom.atom.Atom

Details about a profile.

This is used as a cache to avoid reloading all the profile everytime.

path

Path to the .ini file holding the full infos.

plugin

Reference to the instrument plugin.

id

Profile id.

model

Supported model

connections

Dict of the connections

settings

Dict of the settings

write_to_file()[source]

Save the profile to a file.

clone()[source]

Clone this object.

classmethod create_blank(plugin)[source]

Create a new blank ProfileInfos.

exopy.instruments.infos.validate_profile_infos(infos)[source]

Make sure that a ProfileInfos is backed by a correct file.