msl.equipment.factory module

Establish a connection to the equipment.

msl.equipment.factory.connect(record, demo=None)[source]

Factory function to establish a connection to the equipment.

Parameters
  • record (EquipmentRecord) – A record from an Equipment-Register Database.

  • demo (bool, optional) –

    Whether to simulate a connection to the equipment by opening a connection in demo mode. This allows you to test your code if the equipment is not physically connected to a computer.

    If None then the demo value is determined from the DEMO_MODE attribute.

Returns

A Connection subclass.

msl.equipment.factory.find_interface(address)[source]

Find the interface enum.

Parameters

address (str) – The address of a ConnectionRecord.

Returns

constants.MSLInterface – The interface to use for address.