MockModel

class lsst.ts.watcher.MockModel(enabled=False)

Bases: object

Methods Summary

get_filtered_topic_wrapper(topic, filter_field)

Get an existing TopicWrapper.

make_filtered_topic_wrapper(topic, filter_field)

Make a TopicWrapper, or return an existing one, if found.

Methods Documentation

get_filtered_topic_wrapper(topic, filter_field)

Get an existing TopicWrapper.

Parameters
topiclsst.ts.salobj.ReadTopic

Topic to read.

filter_fieldstr

Field to filter on. The field must be a scalar. It should also have a smallish number of expected values, in order to avoid caching too much data.

Raises
KeyError

If the wrapper is not in the registry.

make_filtered_topic_wrapper(topic, filter_field)

Make a TopicWrapper, or return an existing one, if found.

Call this instead of constructing TopicWrapper directly.

Parameters
modelModel

Watcher model. Used to add a TopicCallback to the topic, if one does not already exist.

topiclsst.ts.salobj.ReadTopic

Topic to read.

filter_fieldstr

Field to filter on. The field must be a scalar. It should also have a smallish number of expected values, in order to avoid caching too much data.