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: str) Interface[source]

Find the interface for address.

Parameters:

address – The address of a ConnectionRecord.