msl.equipment.resources package

MSL resources for connecting to equipment.

msl.equipment.resources.register(manufacturer=None, model=None, flags=0)[source]

Use as a decorator to register a resource class.

Parameters:
  • manufacturer (str, optional) – The name of the manufacturer. Can be a regex pattern.

  • model (str, optional) – The model number of the equipment. Can be a regex pattern.

  • flags (int, optional) – The flags to use for the regex pattern.

msl.equipment.resources.find_resource_class(record)[source]

Find the resource class for this record.

Parameters:

record (EquipmentRecord or ConnectionRecord) – A record type. If the properties attribute contains a resource_class_name key with a value that is equal to the name of a resource class it forces this resource class to be returned, provided that a resource class with the requested name exists.

Returns:

The Connection subclass or None if a resource class cannot be found.

Submodules

Subpackages