QONMetricRegistry#

Module: iqm.station_control.client.qon

class QONMetricRegistry#

Bases: object

Registry for QONMetric subclasses, mapping method names to parser classes.

Allows extensible registration of new metric parsing strategies for new methods.

Methods

get_parser

Retrieve the parser class for a given method name.

register

Decorator for registering a QONMetric subclass as the parser for one or more method names.

registered_methods

Get a list of all registered method names.

classmethod register(method_names)#

Decorator for registering a QONMetric subclass as the parser for one or more method names.

Parameters:

method_names (Iterable[str]) – One or more method names to associate with the subclass.

Returns:

The decorator function.

classmethod get_parser(method_name)#

Retrieve the parser class for a given method name.

Parameters:

method_name (str) – The method name to look up.

Returns:

The QONMetric subclass registered for the method.

Raises:

UnknownObservationErrormethod_name is not registered.

Return type:

type[QONMetric]

classmethod registered_methods()#

Get a list of all registered method names.

Returns:

List of registered method names.

Return type:

list[str]

Inheritance

Inheritance diagram of iqm.station_control.client.qon.QONMetricRegistry